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 

Does shortcut exist that suspends script when I dont want ?

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



Joined: 05 Feb 2006
Posts: 35

PostPosted: Mon Oct 02, 2006 11:53 pm    Post subject: Does shortcut exist that suspends script when I dont want ? Reply with quote

Does a hidden shortcut exist that can suspend the script when I dont want it too ? The only keys I currently have in my script to suspend is the scrolllock, ctrl-enter and slash key. But many times I see the script ends up suspended anyway (checkmark on suspend in toolbar icon). Noticed because pressing w,a,s,d keys all of the sudden stop responding. For a game in the heat of battle, I can not determine the exact situation that causes problem, but I know it is not one of the suspend keys I assigned. Thanks.
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Tue Oct 03, 2006 7:33 am    Post subject: Reply with quote

You may control the script by selecting the "Tray menu Item"
Suspend Hotkeys, programatically from a different script.

Example:

Code:
;Google.ahk
^#G::Run, www.google.com


The above script can be toggled between suspend/resume with following script:

Code:
DetectHiddenWindows, ON
SetTitleMatchMode, 2
^F2::PostMessage, 0x111, 65404,0,, % "ahk_id " WinExist("Google.ahk")


This might sound like an overkill, but might be a good technique for suspending/exiting/reloading many scripts at the same time.

For record, I give here the text extracted with resource hacker -
from an AutoHotkey executable:

Quote:
211 MENU
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
POPUP "&File"
{
MENUITEM "&Reload Script\tCtrl+R", 65400
MENUITEM "&Edit Script\tCtrl+E", 65401
MENUITEM "&Window Spy", 65402 MENUITEM SEPARATOR
MENUITEM "&Pause Script\tPause", 65403
MENUITEM "&Suspend Hotkeys", 65404
MENUITEM SEPARATOR
MENUITEM "E&xit (Terminate Script)", 65405
}
POPUP "&View"
{
MENUITEM "&Lines most recently executed\tCtrl+L", 65406
MENUITEM "&Variables and their contents\tCtrl+V", 65407
MENUITEM "&Hotkeys and their methods\tCtrl+H", 65408
MENUITEM "&Key history and script info\tCtrl+K", 65409
MENUITEM SEPARATOR
MENUITEM "&Refresh\tF5", 65410
}
POPUP "&Help"
{
MENUITEM "&User Manual\tF1", 65411
MENUITEM "&Web Site", 65412
}
}


Regards, Smile
_________________
URLGet - Internet Explorer based Downloader
Back to top
View user's profile Send private message Send e-mail
jtbalogh



Joined: 05 Feb 2006
Posts: 35

PostPosted: Wed Oct 04, 2006 1:28 am    Post subject: Reply with quote

Interesting. Thx. I think I am also going to look at the key history in autokey to see the latest few keystrokes when problem occurs again.
Back to top
View user's profile Send private message
Display posts from previous:   
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