執行執行檔或 dll。 如果 execute 找不到要呼叫的檔案或 dll,函數會傳回假。
第一個參數是要執行的項目的路徑。 如果是 dll 的路徑,API 函數必須在兩個冒號之後。 dll 呼叫的格式為 PATH::APIFunctionName。 dll 的「執行」只會尋找兩種函數類型中的呼叫:
int FunctionName();
int FunctionName( const char * );
如果呼叫使用指令行引數,請輸入引數或輸入空白字串。
指示指令碼是否將等待「執行檔」完成的「布林」值。 dll 呼叫會忽略此參數。
/*對下列檔案執行 notepad,myfile.txt,並等待處理結束。*/ Execute( "c:\\windows\\notepad.exe", "myfile.txt", true ); /*執行 Notepad 但不加任何參數也不等待。*/ Execute( "c:\\windows\\notepad.exe" ); /* 用參數呼叫 dll*/ Execute( "c\\windows\\Somelib.dll::CheckNetwork", "000d1");
**注意 dll PATH::APIFunctionName 的格式
Copyright © 2014 CA Technologies.
All rights reserved.
|
|