Todd Bauer Posted April 29, 2004 Share Posted April 29, 2004 My current code is this... HotKeySet ("!^t","WriteTrigger") ;call the WriteTrigger fuction when Ctrl-Alt-T is pressed I wish I could do this... HotKeySet ("!^t","WriteTrigger("TriggerA")") ;call the WriteTrigger fuction with "TriggerA" parameter when Ctrl-Alt-T is pressed I tried using double quotes and stuff such as... HotKeySet ("!^t","WriteTrigger(""TriggerA"")") but it doesn't like that either. I am I having a brain problem, or is this not supported? Thanks in advance. T Link to comment Share on other sites More sharing options...
Valik Posted April 29, 2004 Share Posted April 29, 2004 It's not supported. HotKeySet (Call and AdlibEnable as well) only take the name of a callback function. Link to comment Share on other sites More sharing options...
Todd Bauer Posted April 29, 2004 Author Share Posted April 29, 2004 OK, thanks. Just wanted to make sure before I make my code overly bloated. I suppose the function can just call another function with the parameter I want. Long live AutoIt !!!! Link to comment Share on other sites More sharing options...
scriptkitty Posted April 29, 2004 Share Posted April 29, 2004 use: HotKeySet ("!^t","WriteTrigger1") while 1 sleep(10) wend func WriteTrigger($x) msgbox(1,$x,"") endfunc func WriteTrigger1() WriteTrigger("TriggerA") endfunc AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Josbe Posted April 30, 2004 Share Posted April 30, 2004 Once I did myself this question. It would not be fine that could be passed arguments? For don't create more user functions in the script. (as scriptkitty's example) AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Todd Bauer Posted April 30, 2004 Author Share Posted April 30, 2004 scriptkitty, That's exactly what I did. Defined a set of hotkeys that called a function that called the 'real' function the way I wanted it. Works great, just a few more lines of code than I want. T Long Live AutoIt !! 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