AutoHotkey Community

It is currently May 27th, 2012, 12:41 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: September 22nd, 2005, 12:49 am 
Offline

Joined: April 16th, 2005, 1:05 am
Posts: 28
I have a hotkey for all of the F keys and i still have them do the normal function. for this i had to suspend the hotkey, send the F key, and unsuspend the hotkey. well to make the code more effecent i put a function in that does all that. the problem is that the when the hotkey gets to the suspend function there is nothing in the key varable.

Code:
F1::
.
.
else
{
   suspend(F1)
}

suspend(key)
{
   Suspend, On
   Send, {%key%}
   Suspend, Off
}

i can do a global varabile in the suspend function and then it will work.
Code:
key = F1
suspend(key)
.
.
.
   global key
   Suspend, On
   Send, {%key%}
   Suspend, Off

is this a flaw or is my code wrong?

_________________
cstone


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 22nd, 2005, 1:33 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
To pass a literal string such as F1 to a function, enclose it in quotes; i.e. "F1". This is because function-calls are expressions.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: chaosad, jrav, Yahoo [Bot] and 21 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group