kaytokarite Posted May 1, 2007 Posted May 1, 2007 Im making a script to play tricks with my wife, she watches to many movies and what not, so i wanted to make a script to ask her to close wmp with a yes/no msgbox, thing is i dont know how to use the return value so i can make a if then statement to close wmp if she clicks yes or if she clicks no to have another msgbox pop up laughing at her and closing it anyways. so all i need is the command to get the return value. winwaitactive("Windows Media Player") msgbox(0,"","You better close media player, if you ignore me then I will.") sleep(2000) msgbox(4,"","Click yes to close or no to ingore me.") msgbox(0,"","Fine then this is for ignoring me. HAHAHAHAHA!") winclose("Windows Media Player") this is what i have so far that gap is fo the if then statement.
Kogmedia Posted May 1, 2007 Posted May 1, 2007 Im making a script to play tricks with my wife, she watches to many movies and what not, so i wanted to make a script to ask her to close wmp with a yes/no msgbox, thing is i dont know how to use the return value so i can make a if then statement to close wmp if she clicks yes or if she clicks no to have another msgbox pop up laughing at her and closing it anyways. so all i need is the command to get the return value. winwaitactive("Windows Media Player") msgbox(0,"","You better close media player, if you ignore me then I will.") sleep(2000) msgbox(4,"","Click yes to close or no to ingore me.") msgbox(0,"","Fine then this is for ignoring me. HAHAHAHAHA!") winclose("Windows Media Player") this is what i have so far that gap is fo the if then statement. $answer = msgbox(4,"","You better close media player, if you ignore me then I will.") if $answer = 6 then do something else do somthing else endif Look at the msgbox in the help file Button Pressed Return Value OK 1 CANCEL 2 ABORT 3 RETRY 4 IGNORE 5 YES 6 NO 7 TRY AGAIN ** 10 CONTINUE ** 11 [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search
Sardith Posted May 1, 2007 Posted May 1, 2007 (edited) Winwaitactive("Windows Media Player") Msgbox(0,"","You better close media player, if you ignore me then I will.", 2); 2 seconds, then closes the message box. $Var = Msgbox(4,"","Click yes to close or no to ingore me.") If $Var = "6" Then Msgbox(0,"","Fine then this is for ignoring me. HAHAHAHAHA!") Winclose("Windows Media Player") ElseIf $Var = "7" Then Msgbox(0,"","Fine then this is for ignoring me. HAHAHAHAHA!") Winclose("Windows Media Player") EndIf #cs Button Pressed Return Value OK 1 CANCEL 2 ABORT 3 RETRY 4 IGNORE 5 YES 6 NO 7 TRY AGAIN ** 10 CONTINUE ** 11 #CE Edited May 1, 2007 by Sardith [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]
PsaltyDS Posted May 1, 2007 Posted May 1, 2007 $answer = msgbox(4,"","You better close media player, if you ignore me then I will.") if $answer = 6 then do something else do somthing else endifoÝ÷ Ûú®¢×¢çè® -¶§{ij»ZºÚ"µÍÌÍØÛÛ]ÞYÈHØÙ] ][ÝÖY[ÝÔYÙË]ÞY][ÝÊBÜ ÌÍÛÓ]ÑH[ ÌÍØÛÛ]ÞYÂRY ÌÍÛÓ]ÑKHH ][ÝÑ]ÜÙI][ÝÈ[BIÌÍÛÓ^S]ÞYH ÌÍÛÓ]ÑBBQ^]ÛÜQ[Y^YÓØ ÌÍÛÓ^S]ÞYH[IÌÍÐ[[[ÛHH ÌÍÐ[ÛÜQÛÛÙÈ BIÌÍÐÚ[Ú]][ÛHYB[ÙBIÌÍÐ[[[ÛHH ÌÍÐ[ÛÜQÛÛÙÈ MH È ÌÍÐH È ÌÍÓYÂIÌÍÐÚ[Ú]][ÛH[ÙB[Y 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
Valuater Posted May 1, 2007 Posted May 1, 2007 You forgot the next part: $colLawyers = ObjGet("YellowPages.Lawyer") For $oLawFirm In $colLawyers If $oLawFirm.Type = "Divorce" Then $oMyLawyer = $oLawFirm ExitLoop EndIf Next If IsObj($oMyLawyer) Then $Alimony = $AllWorldlyGoods * 0.5 $ChildVisitation = True Else $Alimony = $AllWorldlyGoods * 0.95 + $Arm + $Leg $ChildVisitation = False EndIf LOL.... If you use Scite, just click Tools > CodeWizard Its great for making message boxes and a lot more 8)
kaytokarite Posted May 1, 2007 Author Posted May 1, 2007 thx guys and might keep the laywer script for future reference >.>
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