KurogamineNox Posted September 18, 2010 Share 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? Link to comment Share on other sites More sharing options...
wakillon Posted September 18, 2010 Share 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.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted September 18, 2010 Share 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 Link to comment Share on other sites More sharing options...
KurogamineNox Posted September 18, 2010 Author Share Posted September 18, 2010 Alright thanks. Ill have to look into more on the Not stuff then. Changing the = into <> worked. So thanks again. 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