Tripredacus Posted October 27, 2009 Posted October 27, 2009 Howdy doody! I just figured AutoIT could use the OR operand, but this function doesn't run! Or am I just doing it wrong? Oh also, I didn't search because I could just imagine how many results I would get looking up "or"... IF @OSVersion = "WIN_VISTA" OR "WIN_2008" Then $StartupPath = "c:\users\administrator\appdata\roaming\microsoft\windows\startm~1\programs\startup\" ElseIf @OSVersion = "WIN_XP" Then $StartupPath = "c:\docume~1\alluse~1\startm~1\programs\startup\" Else $StartupPath = "error" EndIf Oh, uh it works just fine if I take out the "OR WIN_2008" before the then. Twitter | MSFN | VGCollect
jvanegmond Posted October 27, 2009 Posted October 27, 2009 (edited) Yes, you're doing it wrong. Programming 101. IF @OSVersion = "WIN_VISTA" OR "WIN_2008" Then instead: IF @OSVersion = "WIN_VISTA" OR @OSVersion = "WIN_2008" Then And also: @StartMenuCommonDir Edited October 27, 2009 by Manadar github.com/jvanegmond
Tripredacus Posted October 27, 2009 Author Posted October 27, 2009 OK that makes sense also. I don't use that other macro because the program needs to use the absolute path. Twitter | MSFN | VGCollect
jvanegmond Posted October 27, 2009 Posted October 27, 2009 @StartMenuCommonDir is absolute path.ConsoleWrite(@StartMenuCommonDir & @CRLF)Output: C:\ProgramData\Microsoft\Windows\Start Menu github.com/jvanegmond
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