Jump to content

Problems with an If statement


Go to solution Solved by Jfish,

Recommended Posts

Posted

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.

  • Developers
Posted (edited)

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...