Jump to content
Sign in to follow this  
Todd Bauer

Hotkeyset: Can I Pass A Parameter To The Function?

Recommended Posts

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

Share this post


Link to post
Share on other sites

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 !!!!

Share this post


Link to post
Share on other sites

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 !!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...