Jump to content
Sign in to follow this  
the_lord_mephy

macro for input box

Recommended Posts

the_lord_mephy

hey again, lol

can someone tell me how to do an if statement if an input box macro = 1, i tried

If $input = @macro(1) then

EndIf

but it didnt work, plz help


My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites
Jos

hey again, lol

can someone tell me how to do an if statement if an input box macro = 1, i tried

If $input = @macro(1) then

EndIf

but it didnt work, plz help

<{POST_SNAPBACK}>

@macro is an invalid statement...

What's an "input box macro " ?

Do you mean testing the @error of an InputBox() statement ?


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
the_lord_mephy

omg sry i messed up i meant

If $input = @error(1) then

EndIf

what i wanted to know was how can i do an If input error = 1 then ...

sry


My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites
Matt @ MPCS

There is not an input box macro, are you trying to get the return from an input box? If so,

If( InputBox("Example Title", "Example Message:") = "Test" ) Then
   
   MsgBox(0, "", "The User Entered: Test")

EndIf

Or if you are trying to get the @error macro value you can do:

$Input = InputBox("Example Title", "Example Message:")

Select
   Case @error = 0; The string returned is valid
      MsgBox(0, "", "The User Entered: " & $Input)
   Case @error = 1; The cancel button was pushed
      MsgBox(0, "", "Cancel Pushed!")
   Case @error = 2; Time out time was reached
      MsgBox(0, "", "InputBox Timed Out!")
   Case @error = 3; InputBox failed to open
      MsgBox(0, "", "InputBox failed, due to incorrect arguements.")
EndSelect

I hope this helps!

*** Matt @ MPCS

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  

×