創建宏我宣讀了Delphi Tools Site使用DWScript
Changes since the last SVN update are:
Added support for FreePascal-like compile-time $INCLUDE 「macros」:
%FILE% and %LINE% insert the current filename and line number into the source
%FUNCTION% inserts the current function name, or class.method name into the source
%DATE% and %TIME% allow inserting the compile date/time
本款有沒有一種方法,我們可以定義DWScript宏(除了這些功能以外)就像人在Excel中(使用VBScript)的定義macors簡單的方法,其中腳本的名稱將成爲稍後將使用的函數的名稱,而不會在執行的腳本中添加{$Include XXX}
?
N.B .:這可以通過管理寫入的腳本來保存在某個文件中來完成,該文件名爲函數例如。 (Add),然後用戶將寫入Add(1,2)以獲得結果;然後,但是我的老闆在工作中希望它能像excel中的vbscript一樣。
我沒有看到Office宏和上面概述的任何相似之處。 – OnTheFly 2012-03-13 08:24:00
從我知道這是不可能的,但嘿,你有源,看它是如何做的,修改它以適應你的需求。 – ComputerSaysNo 2012-03-13 08:24:40
@Dorin,謝謝,我喜歡有代碼... – Zeina 2012-03-13 08:37:38