tailieunhanh - AutoI Technology Curriculum Book part 100

Tham khảo tài liệu 'autoi technology curriculum book part 100', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Remarks Please only disable break with good reason. AutoIt normally creates a tray icon when running and right-clicking this icon allows the user to pause or exit the script. If Break is disabled 0 then the user cannot terminate the script this way. Related None. Example Break 0 Disable break Function Reference Call Calls a user-defined function contained in a string parameter. Call function param1 param2 Parameters function The name of the user function to call. param Arguments that will be passed to the function being invoked. Return Value Success Returns the return value of the called function. Both @error and @extended may contain values if the called function set them. Failure Sets @error to OxDEAD and @extended to OxBEEF if the function does not exist or invalid number of parameters. Remarks The function cannot be a built-in Autolt function or plug-in function. The function can pass arguments to functions however ByRef parameters are not supported there is no way to retrieve the ByRef parameter. A special array can be passed in lieu of individual parameters. This array must have it s first element set to CallArgArray and elements 1 - n will be passed as seperate arguments to the function. If using this special array no other arguments can be passed to Call . See example for a demonstration. Both Call itself can set @error or the called function can set @error. If Call sets @error the value will be OxDEAD and @extended will also be set to OxBEEF. See the example for a demonstration of testing for a function that was not found. Related AdlibEnable Example This calls a function accepting no arguments. Call Test1 This calls a function accepting one argument and passes it an argument. Call Test2 Message from Call This demonstrates how to use the special array argument. Global aArgs 4 aArgs 0 CallArgArray This is required otherwise Call will not recognize the array as containing arguments aArgs 1 This is a string Parameter one is a string aArgs 2 47 .