TynoPrime Posted July 6, 2007 Share Posted July 6, 2007 Ok, I'm using; $Test1 = InputBox("Tester", "Type it, YEAH YEAH YEAH, we type it, YEAH YEAH YEAH... Beetles people!") If $Test1 = @error Then MsgBox(0, "Tester", "Press ok and restart the app.") Exit EndIf Now, I was expecting the "error" script to come up when I press the Cancel button, yet oddly if I press cancel, it continues, and if I press OK I get the error. x_X Any ideas? (Btw, if posting here is an annoyance, tell me and I'll just search though the help file. I'm posting here because it's significantly faster than doing just that. ) Link to comment Share on other sites More sharing options...
GMK Posted July 6, 2007 Share Posted July 6, 2007 Ok, I'm using; $Test1 = InputBox("Tester", "Type it, YEAH YEAH YEAH, we type it, YEAH YEAH YEAH... Beetles people!") If $Test1 = @error Then MsgBox(0, "Tester", "Press ok and restart the app.") Exit EndIf Now, I was expecting the "error" script to come up when I press the Cancel button, yet oddly if I press cancel, it continues, and if I press OK I get the error. x_X Any ideas? (Btw, if posting here is an annoyance, tell me and I'll just search though the help file. I'm posting here because it's significantly faster than doing just that. )Leave out the "$Test 1 = " and just use "If @error Then". Link to comment Share on other sites More sharing options...
RazerM Posted July 6, 2007 Share Posted July 6, 2007 (edited) Think of it this way; @error is set to a value, not returned. Edited July 6, 2007 by RazerM My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
TynoPrime Posted July 6, 2007 Author Share Posted July 6, 2007 YAY, thanks man. I was looking at scripts on here and the script that had a InputBox had "If $Q = @error" so I just copied it. Thanks for the help! Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2007 Share Posted July 6, 2007 (edited) YAY, thanks man. I was looking at scripts on here and the script that had a InputBox had "If $Q = @error" so I just copied it. Thanks for the help!I'd stick to the Official Autoit Helpfile. http://www.autoitscript.com/autoit3/docs Edited July 6, 2007 by Paulie Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 6, 2007 Share Posted July 6, 2007 YAY, thanks man. I was looking at scripts on here and the script that had a InputBox had "If $Q = @error" so I just copied it. Thanks for the help!Keep in mind iTripoli is selling a product in competition with the freeware AutoIt. Perhaps they don't have much motivation to make it easy to use AutoIt...? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
TynoPrime Posted July 6, 2007 Author Share Posted July 6, 2007 (edited) Yeah, well, didn't really think of that. >.< First helpful thing to come up on google, so there you go. While I'm here, would this work? Func ClickPIN using Number Or do I need to do it differently to that? Edited July 6, 2007 by TynoPrime Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 6, 2007 Share Posted July 6, 2007 Yeah, well, didn't really think of that. >.< First helpful thing to come up on google, so there you go. While I'm here, would this work? Func ClickPIN using Number Or do I need to do it differently to that? I think in AutoIt that would look like: ClickPIN($Number) Func ClickPIN($i) ControlSend("WinTitle", "Enter PIN", "Edit1", $i) ControlClick("WinTitle", "Enter PIN", "Button1") EndFunc Of course I'm just using my imagination for what the function is doing, but that shows both declaring and using the function in AutoIt. Read the help file and check out the demo script for the functions you are interested in. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
TynoPrime Posted July 6, 2007 Author Share Posted July 6, 2007 (edited) Since I KNOW you love answering my questions, I've read the help section about operators, but it doesn't give examples.$XCoordinate = (($Number * 23) + 277)Would that work? If not, how would I go about doing it?(As I said before; I could search around, but it'd take longer. If you'd prefer I did, just say so ) Edited July 6, 2007 by TynoPrime Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 6, 2007 Share Posted July 6, 2007 Since I KNOW you love answering my questions, I've read the help section about operators, but it doesn't give examples. $XCoordinate = (($Number * 23) + 277) Would that work? If not, how would I go about doing it? (As I said before; I could search around, but it'd take longer. If you'd prefer I did, just say so ) I won't deprive you of the valuable experience of TESTING IT YOURSELF! Before you ask questions like that, code your self a very short demo script to see what it DOES do. Start with just three lines: 1. Set $Number to a number 2. Do the math with your code above. 3. Pop a MsgBox to display the result... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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