Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...