zocker30 Posted May 1, 2012 Share Posted May 1, 2012 (edited) Hello, i just started a script which should do the following : 1.) inputbox , where u write one of three things ( 1,2,3 ) 2.) A If function changes the value of a variable If $inputbox = "1" then $Answer = 1 elseif $inputbox = "2" then $Answer = 2 elseif $inputbox = "3" then $Answer = 3 3.) Calculate 1 + $Answer and make a massagebox ! Thanks for your Help and Time Edited May 1, 2012 by zocker30 Link to comment Share on other sites More sharing options...
ProgAndy Posted May 1, 2012 Share Posted May 1, 2012 (edited) Here is a small example: $value = InputBox("...", "...") If Not StringIsInt($value) Then Exit MsgBox(0, "", "No integer given") MsgBox(0, "", 1 + $value) Edited May 1, 2012 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Chimaera Posted May 1, 2012 Share Posted May 1, 2012 (edited) How about this? Local $inputbox, $Answer $inputbox = "4" ; <<<<<< change this number to test Select Case $inputbox = "1" $Answer = 1 MsgBox(64, "Answer", "Answer = " & $Answer) Case $inputbox = "2" $Answer = 2 MsgBox(64, "Answer", "Answer = " & $Answer) Case $inputbox = "3" $Answer = 3 MsgBox(64, "Answer", "Answer = " & $Answer) Case Else MsgBox(64, "Answer", "Unknown Parameter") EndSelect Edited May 1, 2012 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() 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