Paradigm Posted July 7, 2006 Share Posted July 7, 2006 (edited) I just started with AutoIt and I've searched the forums/helpfiles but I can't seem to fin the answer to this simple question... It's probably fight under my nose and I can't see the forest for the trees... :"> Here's my script (it's very simple): MsgBox( 4, "What should I open?", "'Yes' opens notepad and 'no' opens media player") If Return = 6 Then Run("notepad.exe") ElseIf Return = 7 Then Run("wmplayer.exe") EndIf I get the error: If Return = 6 Then If ^ ERROR Error: Error in exp[b][/b]ression. If I take out the "Return =", both buttons execute notepad. I know it has to be something obvious... I just can't see it. (prolly thinking too hard...) Edited July 7, 2006 by Paradigm Link to comment Share on other sites More sharing options...
Developers Jos Posted July 7, 2006 Developers Share Posted July 7, 2006 $rc = MsgBox( 4, "What should I open?", "'Yes' opens notepad and 'no' opens media player") If $Rc= 6 Then Run("notepad.exe") ElseIf $rc = 7 Then Run("wmediaplayer.exe") Else ; something else was clicked EndIf SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Paradigm Posted July 7, 2006 Author Share Posted July 7, 2006 Thanks! I knew it had to be something absurdly simple... what a way to enter the forums... 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