dnc86 Posted May 24, 2016 Share Posted May 24, 2016 Hi, I am a beginner on AutoIT and sorry about asking very easy question like this, I appreciate all the support you give me on this road because I loved this thing. I am trying to do some copy&paste options according to my Inputs with 3 different Inputs, but my problem is, I want to stop the script if the inputs are not correct like not numpherical or if ESC pressed, basicly I want to give commands like StringIsDigit&StringIsNumber, But I a pretty sure my command structure is also not perfect, I actually want to do loops by step by step, any correctin and support is greatly appreciated. What basicly I want is, If the $LoopNumber is not Digit Numbers than I want entire script to stop with an error, same goes for If $Tracking is not number and letters (Wondering if I can limit this variable by 14 characters total in case of pressing additional character to stop the script) I want my script to double-check if we humans are smart enough to able to enter correct information to this beautiful system Here is my code; $First = 1$LoopNumber = InputBox("NUMBER OF TRACKINGS", "HOW MANY ITEMS") $Tracking = InputBox ("TRACKING NUMBER", "ENTER THE TRACKING NUMBER" ) $Carrier = InputBox ("CARRIER NAME", "ENTER THE CARRIER NAME") If StringIsDigit($LoopNumber) Then If StringIsAlNum($Tracking) Then While $First <= $LoopNumber Sleep(400) ClipPut($Tracking) Send("^v") Send("{TAB}") ClipPut($Carrier) Send("^v") Send("{ESC}") Send("{TAB}{TAB}{TAB}") $First += 1 WEnd Else MsgBox(0, "", "ITEM NUMBER IS NOT CORRECT, TRY AGAIN") EndIf EndIf 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