AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Suspend & hotkey labels

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Fuco



Joined: 21 Mar 2006
Posts: 49
Location: Slovakia, Europe :)

PostPosted: Sun Jun 24, 2007 10:25 pm    Post subject: Suspend & hotkey labels Reply with quote

Hi. I have this code

Code:
pom1 = l_ToggleState
pom2 := kKey22
if (( isLabel( pom1 ) <> 0 ) and ( pom2 <> "none" ))
   {
   hotkey , *%pom2% , %pom1%
   }


and then

Code:
l_ToggleState:
{
suspend Permit
f_ToggleState()
return
}


my question is, if its possible to mark hotkey (defined via hotkey procedure) to ignore the suspend state. It work when i use hotkey::suspend, but i really need "dynamic" ( user-defined ) hotkeys

this code didnt work for me, although i expected it to work,after reading manual description:

Quote:
Any hotkey subroutine whose first line is Suspend (except "Suspend On") will be exempt from suspension. In other words, the hotkey will remain enabled even while suspension is ON. This allows suspension to be turned off via such a hotkey.

_________________
RegExReplace("C:\Program Files\AutoHotkey", "(^C)(?=\W).{4}((?i)[GOD])\w{1,4}\s(\D)(?:\w+)*\\(?3)(u|o).*?(k).*" , "$3$4$l1$5$2")


Last edited by Fuco on Tue Jun 26, 2007 2:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
Fuco



Joined: 21 Mar 2006
Posts: 49
Location: Slovakia, Europe :)

PostPosted: Tue Jun 26, 2007 11:00 am    Post subject: Reply with quote

can some1 help me, i really need this.... ( in other words, this is a bump message ) Razz
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 2558
Location: Australia, Qld

PostPosted: Tue Jun 26, 2007 11:44 am    Post subject: Reply with quote

It seems to work if you remove the { braces }. I guess the braces prevent "Suspend toggle" from being considered the first line.

Quote:
Any hotkey subroutine whose first line is Suspend (except "Suspend On") will be exempt from suspension.
Back to top
View user's profile Send private message
Fuco



Joined: 21 Mar 2006
Posts: 49
Location: Slovakia, Europe :)

PostPosted: Tue Jun 26, 2007 12:20 pm    Post subject: Reply with quote

woot really nice...i've never thought that a { is considered as a "line". This should be written in manual imo. Razz I read it several times and didnt realize this.. Ill write into wish list section later..

THANKS lexikos.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Tue Jun 26, 2007 3:37 pm    Post subject: Reply with quote

there is a thread for documentation improvements in the bug reports forum, that's a good place.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group