Sign in to follow this  
Followers 0
TynoPrime

Another quick question

10 posts in this topic

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. :whistle:)

Share this post


Link to post
Share on other sites



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. :whistle:)

Leave out the "$Test 1 = " and just use "If @error Then".

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Think of it this way; @error is set to a value, not returned.

Edited 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.

Share this post


Link to post
Share on other sites

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. :whistle: Thanks for the help!

Share this post


Link to post
Share on other sites

#5 ·  Posted (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. :lmao: Thanks for the help!

I'd stick to the Official Autoit Helpfile. :whistle:

http://www.autoitscript.com/autoit3/docs

Edited by Paulie

Share this post


Link to post
Share on other sites

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. :lmao: 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...?

:whistle:


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

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by TynoPrime

Share this post


Link to post
Share on other sites

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.

:whistle:


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

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 :whistle:)

Edited by TynoPrime

Share this post


Link to post
Share on other sites

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!

:whistle:

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...

:lmao:


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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0