Jump to content
Sign in to follow this  
kkelley

Problems with an If statement

Recommended Posts

kkelley

If $browser = "Internet Explorer" && $server = "DEV '.33'" Then
            _IEDEV()

will the && operation work? I am trying to get this to look at two separate combo-boxes and using the data to run the function.

Share this post


Link to post
Share on other sites
JLogan3o13

In fact, if you are using the full SciTE installation, it should come up with a warning just for trying to use the double &.

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
kkelley

It was giving me the error on the $browser on the dollar sign, instead of on the && operator.  Thanks for the help!

Share this post


Link to post
Share on other sites
Jos

It was giving me the error on the $browser on the dollar sign, instead of on the && operator.  Thanks for the help!

It will only give an error on $browser when that's not declared yet.

It does give an Syntax error on && :

"test.au3"(1,13) : warning: $browser: possibly used before declaration.
If $browser =
~~~~~~~~~~~~^
"test.au3"(1,36) : error: syntax error
If $browser = "Internet Explorer" &&
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"test.au3"(1,46) : warning: $server: possibly used before declaration.
If $browser = "Internet Explorer" && $server =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"test.au3"(1,13) : error: $browser: undeclared global variable.
If $browser =
~~~~~~~~~~~~^
"test.au3"(1,46) : error: $server: undeclared global variable.
If $browser = "Internet Explorer" && $server =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
test.au3 - 3 error(s), 2 warning(s)

Jos

Edited by Jos

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

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  

×