endy Posted February 22, 2006 Share Posted February 22, 2006 Hi, everybody! I think I am the most junior user of the AutoIt. Though have not fully familiarized yet, I have really liked its idea. Well, I started using AutoIt just yesterday, and already became fond of it! Well, here is my question. Could anybody advise me on how to write a script for the MsgBox return value operation. That is, if "yes" (or "cancel") button is pressed on the message box, then how to make a certain command to be exectuted. Sorry for bothering with this really basic question. My great thanks for the developers of this excellent pro! Looking forward for your advice. Link to comment Share on other sites More sharing options...
GaryFrost Posted February 22, 2006 Share Posted February 22, 2006 (edited) just put what you want to do in the case depending on the return #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Question If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36,"Test Message Box","This is a test of the return value") Select Case $iMsgBoxAnswer = 6;Yes Case $iMsgBoxAnswer = 7;No EndSelect #EndRegion --- CodeWizard generated code End --- Edited February 22, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 22, 2006 Share Posted February 22, 2006 HI, another simple example would be $var = MsgBox(1, "Example", "Press a button :-)") If $var = 1 Then MsgBox(0, "OK", "You pressed OK!", 3) ElseIf $var = 2 Then MsgBox(0, "Cancel", "You pressed Cancel!", 3) EndIf So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
NegativeNrG Posted February 22, 2006 Share Posted February 22, 2006 you can also check the return values, in the helpfile under Msgbox(). [size=20]My File Upload[/size]Register at my site and upload. Link to comment Share on other sites More sharing options...
endy Posted February 22, 2006 Author Share Posted February 22, 2006 Dear friends, thanks a lot! I have successfully adopted your advices! AutoIt works great! By the way, I was thinking to automate some operations related to internet browsing, downloading, etc (I use Internet Explorer). Could you advise if there any info or manual I could refer to? Thanks again! All the best! Link to comment Share on other sites More sharing options...
pecloe Posted February 22, 2006 Share Posted February 22, 2006 if using beta do a search for Inet.au3 (in this forum) all sorts of functions are available phil Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 22, 2006 Share Posted February 22, 2006 (edited) if using beta do a search for Inet.au3 (in this forum) all sorts of functions are availablephilHi, or search for IE.au3. --> http://www.autoitscript.com/forum/index.ph...pe=post&id=3370So long,Mega Edited February 22, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
endy Posted February 22, 2006 Author Share Posted February 22, 2006 Thanks a lot! This is extremely helpful! 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