olirav Posted August 1, 2010 Share Posted August 1, 2010 I am running several if statements, and I need to test if they are all true. See Example Below If FileExists("C:\1") And If FileExists("C:\2") And If FileExists("C:\3") Then Is this possible or do I have to put then inside each other If FileExists("C:\1") Then If FileExists("C:\2") Then If FileExists("C:\3") Then Then The first example is so much easier to manage problems with is there any way to make it work. Link to comment Share on other sites More sharing options...
Developers Jos Posted August 1, 2010 Developers Share Posted August 1, 2010 If FileExists("C:\1") And FileExists("C:\2") And FileExists("C:\3") Then 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. Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 1, 2010 Share Posted August 1, 2010 Local $a = 1, $b = 1, $c = 1 If $a And $b And $c Then ConsoleWrite("all true" & @CRLF) Else ConsoleWrite(">= 1 false" & @CRLF) EndIf Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
olirav Posted August 1, 2010 Author Share Posted August 1, 2010 Nevermind I've worked it out - it all has to be on one line Link to comment Share on other sites More sharing options...
Developers Jos Posted August 1, 2010 Developers Share Posted August 1, 2010 Nevermind I've worked it out - it all has to be on one line no it doesn't but you will have to use the continuation character If FileExists("C:\1") _ And FileExists("C:\2") _ And FileExists("C:\3") Then 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now