mactable Posted February 6, 2007 Share Posted February 6, 2007 hi everyone, as we known call() is only used for calling a user-defined function , but how to call for a built-in function? execept if ...endif or select...endselect, any other method? any advise is welcome. thx in advance Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 6, 2007 Moderators Share Posted February 6, 2007 hi everyone, as we known call() is only used for calling a user-defined function , but how to call for a built-in function? execept if ...endif or select...endselect, any other method? any advise is welcome. thx in advance1. Why would you want to use "Call" << Built in function itself, to call a built in function? 2. The only way I can think of is put it in its own function. Call('__MsgBox', 64, 'Information', 'Here is your text', 5) Func __MsgBox($Param1, $Param2, $Param3, $Param4) Return MsgBox($Param1, $Param2, $Param3, $Param4) EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
/dev/null Posted February 6, 2007 Share Posted February 6, 2007 but how to call for a built-in function?not possible. From help file of Call()RemarksThe function cannot be a built-in AutoIt function or plug-in function.Why would you want to do that? __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
MHz Posted February 6, 2007 Share Posted February 6, 2007 ; Calling a builtin function FileExists('c:\test.txt') ; Calling a UDF UDF() ; Use Call function to call a UDF to use special features. Call('UDF') If @error Then ; do something EndIf Exit Func UDF() MsgBox(0, 'UDF title', 'OK') EndFunc Call() is only needed under special circumstances as mentioned in the help file. Link to comment Share on other sites More sharing options...
/dev/null Posted February 6, 2007 Share Posted February 6, 2007 as we known call() is only used for calling a user-defined function , but how to call for a built-in function? I guess I understand it now. Maybe you think you have to call a user function with Call(). That's NOT the case. Func test() MsgBox(0,"","I'm in test") EndFunc ;- now just call test with it's name. No need for Call() test() __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 6, 2007 Moderators Share Posted February 6, 2007 (edited) I guess I understand it now. Maybe you think you have to call a user function with Call(). That's NOT the case. Func test() MsgBox(0,"","I'm in test") EndFunc ;- now just call test with it's name. No need for Call() test()God help us if we hadn't covered them all thus far Edited February 6, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
/dev/null Posted February 6, 2007 Share Posted February 6, 2007 Hm.. maybe we should just wait for an answer from Mr. Mac Table. __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
mactable Posted February 6, 2007 Author Share Posted February 6, 2007 thx all, i am sorry, i think i should describe my question more details. i would like to write a simple script for some automations. for example: ;software installation RunWait ("installer.exe") ;run a installer RunWait("regedit.exe /s " & "setting.reg") ;import registry ;other window operation RunWait("my_program") WinWinActivate("my_program") ControlCommand(...) ControlClick(...) but i do want to hard coding the above in .au3 script, so i would like to define those actions in an another config (.ini) file, ini key = action (function) , and ini value = function parameters which separete by "|" for example: [install_xxx] RunWait = installer.exe RunWait = regedit.exe /s "setting.reg" [other_window_operation0 RunWait = my_program WinWinActivate = my_program ControlCommand = window_tiltle | control_id | command ControlClick = window_tiltle | control_id then, my script could read this ini filem, then re-generate commands, and execute one by one. although autoit has eval() function but does not works like my expect. any idea? thx in advance! Link to comment Share on other sites More sharing options...
/dev/null Posted February 6, 2007 Share Posted February 6, 2007 (edited) but i do want to hard coding the above in .au3 script, so i would like to define those actions in an another config (.ini) file, ini key = action (function) , and ini value = function parameters which separete by "|"Hm.. read INI file, write all AU3 commands into another file and run that with /AutoIt3ExecuteScript (see help file: Autoit -> Using AutoIT -> Running Scripts). Edited February 6, 2007 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
mactable Posted February 6, 2007 Author Share Posted February 6, 2007 Hm.. read INI file, write all AU3 commands into another file and run that with /AutoIt3ExecuteScript (see help file: Autoit -> Using AutoIT -> Running Scripts).i see.do you have any suggestion how to get result (return value) from another script? by save return value to file or by system environment value? Link to comment Share on other sites More sharing options...
/dev/null Posted February 6, 2007 Share Posted February 6, 2007 i see.do you have any suggestion how to get result (return value) from another script? by save return value to file or by system environment value?many ways: Registry keys, files, Exit codes (see Exit()), ..... __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
ptrex Posted February 7, 2007 Share Posted February 7, 2007 @Mactable Look at my dynamic functions in my signature. This might give you a hint. regards ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
mactable Posted February 7, 2007 Author Share Posted February 7, 2007 thx very much everyone, all of your tips help me a lot! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now