gcue Posted May 6, 2008 Posted May 6, 2008 how can i accurately write an OR statment that would make for all these conditions? If $user <> "SYSTEM" Or $user <> "LOCAL SERVICE" Or $user <> "NETWORK SERVICE" Then FileWrite($file, '' &@CRLF & _ $assets[$x] & "," & $user & ", date") EndIf
Developers Jos Posted May 6, 2008 Developers Posted May 6, 2008 The Or needs to be an AND. 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.
gcue Posted May 6, 2008 Author Posted May 6, 2008 that worked.. trying to understand how that makes sense tho. it would seem that because of the AND, all conditions must be met in order for it not to FileWrite
Monamo Posted May 6, 2008 Posted May 6, 2008 how can i accurately write an OR statment that would make for all these conditions? If $user <> "SYSTEM" Or $user <> "LOCAL SERVICE" Or $user <> "NETWORK SERVICE" Then FileWrite($file, '' &@CRLF & _ $assets[$x] & "," & $user & ", date") EndIfTry AND in place of OR. Your current conditions wouldn't allow for the correct distinction between the $user value. - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]
Developers Jos Posted May 6, 2008 Developers Posted May 6, 2008 that worked..trying to understand how that makes sense tho.it would seem that because of the AND, all conditions must be met in order for it not to FileWriteIt helps when you read it out loud, but your are testing for "Not Equal To" so when you use Or it means that it is Always true since there is always one of the tests True.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.
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