crislivinitup Posted March 27, 2007 Share Posted March 27, 2007 Is there anyway I can call a function from a guictrlsetonevent or hotkeyset command that will also have parameters? I tried this: HotKeySet("^a","add("&2&","&4&")") while 1 sleep(100) WEnd Func add($a,$B) msgbox(0,"",$a+$B) EndFunc This however doesn't work. Anyone have any ideas or knowledge on the subject? Link to comment Share on other sites More sharing options...
BrettF Posted March 27, 2007 Share Posted March 27, 2007 (edited) The called function can not be given parameters. They will be ignored. So that answers you first question. An alternitave would be _IsPressed (). An Example: #Include <Misc.au3> While 1 Select Case _IsPressed(12 + 41); Checks if Alt + A is pressed Add(2, 4) ;Runs func "add" Case Else Sleep(100) EndSelect WEnd Func Add($a, $B) MsgBox(0, "", $a + $B) EndFunc --------------------------------------------------------------------------------------- 10 Days, 7 hours..... Jeez this is too hard.... Edited March 27, 2007 by bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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