Diana (Cda) Posted May 22, 2009 Share Posted May 22, 2009 I can manage some If conditions now but if more than a couple of conditions need to be met, still getting myself into a mess <g>. I have a script that opens a folder on the hdd _and_ on the USB flash drive, if the memory stick is plugged in. To make it a tad more challenging, I don't like Windows Explorer so have a WE replacement to open folders. Since I like to overcome errors right from the get-go, one condition is to open with WE _if_ the replacement isn't available for whatever reason (i.e., after a wipe/reinstall and I haven't yet installed the replacement). But I don't know how to prevent the scripts from popping up a couple of error boxes if another condition isn't met, when the memory stick isn't plugged in. When the USB flash drive isn't available, the script should just ignore that command and close. That's where I'm stumped though. Here's the pertinent part of these types of scripts:If FileExists($WEReplacement) AND FileExists($FldrToOpenUFD) THEN ShellExecute($WEReplacement, $FldrToOpenUFD, "", "open", @SW_MAXIMIZE) Else ShellExecute($FldrToOpenUFD, "", "", "open", @SW_MAXIMIZE) EndIf I tried adding an Else If condition, as per the help file and putting in an exit code but couldn't get that to work. Thanks for any help re this! Link to comment Share on other sites More sharing options...
Aceguy Posted May 22, 2009 Share Posted May 22, 2009 (edited) if $statement=true and $statement2=true then ;do whatever elseif $statment=true and $statement2=false then ;do somethingelse elseif $statment=false and $statement2=true then ;do another thing else ;do another thing if none of the above conditions are met endif Edited May 22, 2009 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Bert Posted May 22, 2009 Share Posted May 22, 2009 Select...Case works well too The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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