KurogamineNox Posted September 18, 2010 Posted September 18, 2010 Okay, something is fishy. My code just refuses to work. if Not $version = "1.1" Then MsgBox(4096, "Update", "Update Available, Must Download Update Version. Program Shutting Down") ShellExecute("http://halconknights.webs.com/") Exit EndIf When it gets the version number it is 1.2, yet the if Not statement just refuses to work. Since $version = 1.1 is not true, the not statement should work, or am I just mistaken?
wakillon Posted September 18, 2010 Posted September 18, 2010 Try $version='1.2' if $version <> "1.1" Then MsgBox(4096, "Update", "Update Available, Must Download Update Version. Program Shutting Down") ShellExecute("http://halconknights.webs.com/") Exit EndIf AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
AdmiralAlkex Posted September 18, 2010 Posted September 18, 2010 You are using Not the wrong way. To do what you want you need: $iVersion = "1.2" If Not ($iVersion = "1.1") Then ConsoleWrite(Random() & @CRLF) EndIf Or even better, the "not equal" sign: $iVersion = "1.2" If $iVersion <> "1.1" Then ConsoleWrite(Random() & @CRLF) EndIf So why didn't your code work? Run this and you should get it: ConsoleWrite((Not $iVersion) & @CRLF) ConsoleWrite((False = "1.1") & @CRLF) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
KurogamineNox Posted September 18, 2010 Author Posted September 18, 2010 Alright thanks. Ill have to look into more on the Not stuff then. Changing the = into <> worked. So thanks again.
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