Sign in to follow this  
Followers 0
alterctrlego

"Case" statement like in C++?

5 posts in this topic

I know that in C++ there is a useful statement called "Case" which is used to stop programmers from having to write:

if
    then
         if
              then
              else
          endif
    else
endif

I am writing a program that looks at a variable and does different things based on what the variable is, is there a quick way to do this in AutoIt without using endless if statements?

Help would be much appreciated,

AlterCtrlEgo,

http://www.alphahacka.com/ forum admin

Share this post


Link to post
Share on other sites



Look up

Switch .. Case..Endswitch

Select..CAse..EndSelect


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Sorry for being such a n00b, but I cannot find any information on this, are there any examples you can point me towards or any good sites?

Thanks,

AlterCtrlEgo

Share this post


Link to post
Share on other sites

Sorry for being such a n00b, but I cannot find any information on this, are there any examples you can point me towards or any good sites?

Thanks,

AlterCtrlEgo

http://www.autoitscript.com/autoit3/docs/i...conditional.htm

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Thanks very much! My script works now :P

AlterCtrlEgo

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