Sign in to follow this  
Followers 0
Earthquake

MsgBox (OK, Cancel) N00b question

4 posts in this topic

#1 ·  Posted (edited)

Hi Snipez,

I'm completely new to AutoIt, but I tried some little scripts:

I want to create a little GUI, wich is on top of Notepad for easy access to my scripts.

I got everything working right now (even the IniRead works fine now! :D ), but now I'm to stupid, to edit the Return values of my

MsgBox (1,"Test","Should the script start?")

Messagebox! How can I tell my script, that, if I click Ok, it should run my .exe (I understand the run("C:/test.exe") part!)?

This is really as simple as it sounds and if I get an answer, I'll sure bite myself in the ass, but right now, I dont get it! :D

AND SORRY FOR MY BAD ENGLISH :P

Edited by Earthquake

Yes, I am a noob! But at least I try to learn!Moddingtech.de - Home of the german Modding-Scene!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

#Region --- CodeWizard generated code Start ---
;MsgBox features: Title=Yes, Text=Yes, Buttons=OK and Cancel, Icon=Question
If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(33,"Test","Should the script start?")
Select
   Case $iMsgBoxAnswer = 1 ;OK

   Case $iMsgBoxAnswer = 2 ;Cancel

EndSelect
#EndRegion --- CodeWizard generated code End ---
oÝ÷ Ù«­¢+Ø(I¥½¸´´´
½]¥éɹÉѽMÑÉд´´(í5Í    ½àÑÕÉÌèQ¥Ñ±õeÌ°QáÐõeÌ°    ÕÑѽ¹Ìõe̹9¼°%½¸õEÕÍÑ¥½¸)%9½Ð%걃 ÅÕ½Ðí¥5Í  ½á¹ÍÝÈÅÕ½Ðì¤Q¡¸¥´ÀÌØí¥5Í  ½á¹ÍÝÈ(ÀÌØí¥5Í  ½á¹ÍÝÈô5Í   ½à ÌØ°ÅÕ½ÐíQÍÐÅÕ½Ðì°ÅÕ½ÐíM¡½Õ±Ñ¡ÍÉ¥ÁÐÍÑÉÐüÅÕ½Ðì¤)M±Ð(
ÍÀÌØí¥5Í ½á¹ÍÝÈôØíeÌ((
ÍÀÌØí¥5Í ½á¹ÍÝÈôÜí9¼()¹M±Ð(¹I¥½¸´´´
½]¥éɹÉѽ¹´´´(

Edited 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.

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

In SciTE... Press

Tools > CodeWizard

This can make the message boxes for you

Example

#Region --- CodeWizard generated code Start ---
;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes, No, and Cancel, Icon=Question, Miscellaneous=Top-most attribute
If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(262179,"Question","Would you like to continue?" & @CRLF)
Select
   Case $iMsgBoxAnswer = 6;Yes

   Case $iMsgBoxAnswer = 7;No

   Case $iMsgBoxAnswer = 2;Cancel

EndSelect
#EndRegion --- CodeWizard generated code End ---

8)

Awww.... too slow... but both used CodeWizard

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0