arminius Posted April 16, 2008 Share Posted April 16, 2008 here is this script I'm working on, it's supposed to run in the background, but when a msgbox pops up and I click on the ok button, I want the clicking of that ok to end the script here is the coding CODEWhile 1 ; test If @MON=04 And @MDAY=17 And @HOUR=06 And @MIN=27 And @Sec=35 Then MsgBox(262144, "Reminder", "This popup is working", 1) Sleep(400) WEnd I have tried everything I can think of, adding a second then after the msg saying then exit doesn't work, have also tried some other things, so if anyone can help I will be grateful Link to comment Share on other sites More sharing options...
monoceres Posted April 16, 2008 Share Posted April 16, 2008 Use the Exit or ExitLoop keyword or do some checking at beginning of the while loop ; Example 1 While 1 ; test If @MON=04 And @MDAY=17 And @HOUR=06 And @MIN=27 And @Sec=35 Then MsgBox(262144, "Reminder", "This popup is working", 1) Exit EndIf Sleep(400) WEndoÝ÷ Ù«¢+ØìáµÁ±È)]¡¥±Ä(ìÑÍÐ)%5=8ôÀй5dôÄܹ!=UHôÀع5%8ôÈܹMôÌÔQ¡¸)5Í ½à ÈØÈÄÐаÅÕ½ÐíIµ¥¹ÈÅÕ½Ðì°ÅÕ½ÐíQ¡¥ÌÁ½ÁÕÀ¥Ìݽɥ¹ÅÕ½Ðì°Ä¤)á¥Ñ1½½À)¹%)M±À ÐÀÀ¤)]¹oÝ÷ Ù«¢+ØìáµÁ±Ì(ÀÌØí½½°õ±Í)]¡¥±9½ÐÀÌØí½½°(ìÑÍÐ)%5=8ôÀй5dôÄܹ!=UHôÀع5%8ôÈܹMôÌÔQ¡¸)5Í ½à ÈØÈÄÐаÅÕ½ÐíIµ¥¹ÈÅÕ½Ðì°ÅÕ½ÐíQ¡¥ÌÁ½ÁÕÀ¥Ìݽɥ¹ÅÕ½Ðì°Ä¤(ÀÌØí½½°õQÉÕ)¹%)M±À ÐÀÀ¤)]¹ Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
arminius Posted April 16, 2008 Author Share Posted April 16, 2008 legend so simple and yet never occured to me well I did put then exit under it, but not exit just byitself, anyway, cheers Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 16, 2008 Share Posted April 16, 2008 (edited) legend so simple and yet never occured to me well I did put then exit under it, but not exit just byitself, anyway, cheers Just for giggles, you can make that conditional on which button gets clicked by checking the numeric return value from MsgBox(): While 1 If @MON = 04 And @MDAY = 17 And @HOUR = 06 And @MIN = 27 And @SEC = 35 Then If MsgBox(32 + 4, Default, "Do you want to exit?") = 6 Then Exit EndIf Sleep(400) WEnd Edited April 16, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Achilles Posted April 17, 2008 Share Posted April 17, 2008 That's cool, I had never seen the keyword Default used... Could be useful sometime... My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] 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