toxicdav3 Posted April 5, 2009 Posted April 5, 2009 How can I make sure that hotkeyset doesnt interrupting each other. If you press another hotkey at the same time the last one is still going through its function it will immediately start the new function. How can I make it wait? Cheers, David. Layered Networks - Hosting Solutions
exodius Posted April 5, 2009 Posted April 5, 2009 (edited) How can I make sure that hotkeyset doesnt interrupting each other. If you press another hotkey at the same time the last one is still going through its function it will immediately start the new function. How can I make it wait?Cheers,David.If you don't have a lot of hotkeys, you could unset the others and re-set them again at the end of the function...To make life simple you could just make and call a function that sets and un-sets them... Edited April 5, 2009 by exodius
Yashied Posted April 5, 2009 Posted April 5, 2009 How can I make sure that hotkeyset doesnt interrupting each other. If you press another hotkey at the same time the last one is still going through its function it will immediately start the new function. How can I make it wait? Cheers, David.Try the following code. global $IntFlag = 0 HotKeySet('^{F10}', '_MyFunc') HotKeySet('!{F10}', '_Quit') while 1 Sleep(10) wend func _MyFunc() if $IntFlag then return endif $IntFlag = 1 MsgBox(0, 'MyFunc', 'Ctrl-F10 has been pressed!') $IntFlag = 0 endfunc; _MyFunc func _Quit() exit endfunc; _Quit My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
toxicdav3 Posted April 6, 2009 Author Posted April 6, 2009 thx for your replies but i'm after a way for it to wait if possible. Layered Networks - Hosting Solutions
Yashied Posted April 6, 2009 Posted April 6, 2009 thx for your replies but i'm after a way for it to wait if possible.global $Count = 1, $Queue = 0, $IntFlag = 0 HotKeySet('^{F10}', '_Count') HotKeySet('!{F10}', '_Quit') AdlibEnable('_Queue', 100) while 1 Sleep(10) wend func _Count() $Queue += 1 endfunc; _Count func _MyFunc() MsgBox(0, 'MyFunc (' & $Count & ')', 'Ctrl-F10 has been pressed!') endfunc; _MyFunc func _Queue() if ($IntFlag) or ($Queue = 0) then return endif $IndFlag = 1 _MyFunc() $Count += 1 $Queue -= 1 $IndFlag = 0 endfunc; _Queue func _Quit() exit endfunc; _Quit My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now