Jump to content

Recommended Posts

Posted

hi, first, i am gonna write these

MsgBox(4096+1, "Notice", "You are attempting to start Warcraft III")

well, if i select ok, then how i write things that allow the AutoIt to open the .exe file?

and if i select cancel, then how i write things that will cancel the whole activity?

is it that i need to use the If...ElseIf...Else...EndIf or the If...Then

i am stuck in here.... pretty sad for me

Posted

is it that i need to use the If...ElseIf...Else...EndIf or the If...Then

Yes!

Use the return value of the function.

Other things you may look up:

Exit

Run()

Look at AutoIt 1-2-3 in my sig. It's a guide that teaches you how to use AutoIt.

#)

Posted (edited)

If you have installed the autoit SciTE installation you will probably like the functionpopup help (ALT+F1). Arrgh, SHIFT+F1 That is :)

Edited by Uten
Posted

Look at AutoIt 1-2-3, a guide to AutoIt. Can be found here: http://www.autoitscript.com/forum/index.php?showtopic=21048

Go through it's tutorials.

#)

P.S.: Involving your current problem:

$iMsgBoxAnswer = MsgBox(4,"Notice", "You are attempting to start Warcraft III")
Select
   Case $iMsgBoxAnswer = 6;Yes
      Run("warcraft")
   Case $iMsgBoxAnswer = 7;No
      Exit
EndSelect
Posted (edited)

erm, can i ask something? y there is numbers (6 and 7) b4 the Yes and No? wat is those numbers for?

Case $iMsgBoxAnswer = 6;Yes

Run("warcraft")

Case $iMsgBoxAnswer = 7;No

Edited by peppermint
Posted (edited)

from the help file>msgbox

Button Pressed Return Value

OK 1

CANCEL 2

ABORT 3

RETRY 4

IGNORE 5

YES 6

NO 7

TRY AGAIN ** 10

CONTINUE ** 11

Edited by pecloe
Posted

the ;Yes and ;No at the end are comments :think:

When you put the semicolon (the ; character) it interprets everything after that semicolon as a comment!

;This is a comment
MsgBox("","title","text",5);This is another comment

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
×
×
  • Create New...