Insolence Posted December 26, 2004 Share Posted December 26, 2004 While $vDelay > 0 AND $Continue = 1 $vDelay = $vDelay - 100 Sleep(100) WEnd Is inside a function I made, which should allow commands to still be sent to the GUI right? The entire GUI is rendered useless in this state. No buttons can be used at all, I don't know much about the GUI and I can't find anything else that can help me in the help file. I tried searching for 'recieve message while sleeping' as I thought that may be the problem... no results really. "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
layer Posted December 27, 2004 Share Posted December 27, 2004 (edited) i think i know what ur talking about... heres an example #include <GUIConstants.au3> GUICreate ("Test") $button= GUICtrlCreateButton ("Test", 20, 20) GUISetState () While 1 $get= GUIGetMsg () Select Case $get= $button MsgBox (0, "You just...", "You just hit this button") Case $get= $GUI_EVENT_CLOSE;or -3 Exit Endselect Wend i had the same problem when i was new, just try that and hit the button and study the code! bye! is that what ur looking for? Edited December 27, 2004 by layer FootbaG Link to comment Share on other sites More sharing options...
Insolence Posted December 27, 2004 Author Share Posted December 27, 2004 Didn't fix it. Hotkeys work fine... "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
cprz Posted January 2, 2005 Share Posted January 2, 2005 that should work i see nothing wrong with his example script Link to comment Share on other sites More sharing options...
CyberSlug Posted January 2, 2005 Share Posted January 2, 2005 While $vDelay > 0 AND $Continue = 1 $vDelay = $vDelay - 100 Sleep(100) WEndIs inside a function I made, which should allow commands to still be sent to the GUI right?Probably not. Consider the following example:Opt("TrayIconDebug", 1) #include <GUIConstants.au3> GUICreate ("Test") $button= GUICtrlCreateButton ("Test", 20, 20) GUISetState () While 1 $get= GUIGetMsg() Select Case $get= $button Foo() MsgBox(4096,"Notify", "You clicked the button") Case $get= $GUI_EVENT_CLOSE ExitLoop Endselect Wend Exit Func Foo() While 1 sleep(10) WEnd EndFuncIf you hover your mouse over the tray icon, you will notice that the program spends most of its time on Line 7: $get = GuiGetMsg(). However, after clicking the button, the program gets stuck in function Foo. Since GuiGetMsg is no longer being processed, the GUI will not respond to any events until you break out of that loop....Hope that helps Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Insolence Posted January 2, 2005 Author Share Posted January 2, 2005 I tried it inside the while loop, like so: While $vDelay > 0 AND $Continue = 1 $Get= GUIGetMsg() If $Get = $End Then _Stop() EndIf $vDelay = $vDelay - 100 Sleep(100) WEnd ;Function: Func _Stop() $Continue = 0 _MsgBox(1,"iSpam stopped!", "Sucessfully stopped.") EndFunc Is that what you meant? (didn't work either) "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
the_lord_mephy Posted January 3, 2005 Share Posted January 3, 2005 I had that problem. Do you think it'd be possible to use AdlibEnable? For example:AdlibEnable("myadlib", "100")Your codeFunc myadlib()$vDelay = $vDelay - 100EndFunc My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
Insolence Posted January 3, 2005 Author Share Posted January 3, 2005 Ah, that just might be possible, great idea I'll try it when I'm not about to flop over and die from lack of sleep "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
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