Vadersapien Posted November 15, 2009 Share Posted November 15, 2009 (edited) Hello everyone, I have an Issue with @OSVersion...it works fine like this: If @OSVERSION = 'WIN_VISTA' Then GUICtrlSetImage($Sync_Button, 'imageres.dll', 147, 1) GUICtrlSetImage($Settings_Button, 'imageres.dll', 114, 1) Else GUICtrlSetImage($Sync_Button, 'shell32.dll', 19, 1) GUICtrlSetImage($Settings_Button, 'shell32.dll', 330, 1) EndIf But not like this: If @OSVERSION >= 'WIN_VISTA' Then GUICtrlSetImage($Sync_Button, 'imageres.dll', 147, 1) GUICtrlSetImage($Settings_Button, 'imageres.dll', 114, 1) Else GUICtrlSetImage($Sync_Button, 'shell32.dll', 19, 1) GUICtrlSetImage($Settings_Button, 'shell32.dll', 330, 1) EndIf Edited November 15, 2009 by Vadersapien Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
Authenticity Posted November 15, 2009 Share Posted November 15, 2009 (edited) It should be >= and for less than or equal <=. Edited November 15, 2009 by Authenticity Link to comment Share on other sites More sharing options...
Vadersapien Posted November 15, 2009 Author Share Posted November 15, 2009 It should be >= and for less than or equal <=.Whoops...typo...I actually already had it like that... Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
GEOSoft Posted November 15, 2009 Share Posted November 15, 2009 > is a math operator and @OSVersion returns a string. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Vadersapien Posted November 16, 2009 Author Share Posted November 16, 2009 How would I detect if the OS version is equal to or greater that Windows Vista then? Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
BrettF Posted November 16, 2009 Share Posted November 16, 2009 If (@OS_VERSION = "VISTA") OR (@OS_VERSION = "WINDOWS_7") Then ... do stuff. Persudo of course. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 16, 2009 Share Posted November 16, 2009 I wonder how difficult it would be to get the version number. Like how XP is 5. 7 is well, 7. They've all got "core" version numbers. Link to comment Share on other sites More sharing options...
Vadersapien Posted November 16, 2009 Author Share Posted November 16, 2009 (edited) I wonder how difficult it would be to get the version number. Like how XP is 5. 7 is well, 7.They've all got "core" version numbers.Actually Windows 7 is 6.1.7600.And I wonder if there is a way to get the kernel version?If (@OS_VERSION = "VISTA") OR (@OS_VERSION = "WINDOWS_7") Then ... do stuff.Does the current stable detect Windows 7 as 7...I've heard it identifies it as Vista...Do the beta builds correctly detect 7?Also what OSes contain imageres.dll? Edited November 16, 2009 by Vadersapien Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
GEOSoft Posted November 16, 2009 Share Posted November 16, 2009 (edited) Actually Windows 7 is 6.1.7600. And I wonder if there is a way to get the kernel version? Does the current stable detect Windows 7 as 7...I've heard it identifies it as Vista... Do the beta builds correctly detect 7? Also what OSes contain imageres.dll? imageres.dll first appeared in Vista. That's why what you had worked even if the If statement was removed. Also Win 7 is correctly identified as Windows_7 in the Beta but I can't remember when that was fixed. I'm pretty sure the release version still detects it as Vista. To get the Kernel version you could always use Global Const $2K_VER = 5.0 Global Const $XP_VER = 5.1 Global Const $XP64_VER = 5.2 Global Const $VISTA_VER = 6.0 Global Const $W7_VER = 6.1 $iCurrVer = RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentVersion") If iCurrVer > $XP_VER Then ;; Do something EndIf Edit: Changed a FileGetVersion() to the RegRead() I'm sure there is a way to get the installed version from a DLL call as well but someone else will have to come along with that. Edited November 16, 2009 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 16, 2009 Share Posted November 16, 2009 Wouldn't it be easier to use @OSBuild ? .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...
rajeshontheweb Posted November 16, 2009 Share Posted November 16, 2009 thiswill help i am sure we have already discussed this earlier elsewhere too. Coz i have mostly relied on getting OS version numbers if it was for cases like xp and above ... Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
rajeshontheweb Posted November 16, 2009 Share Posted November 16, 2009 look at this Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
GEOSoft Posted November 16, 2009 Share Posted November 16, 2009 Wouldn't it be easier to use @OSBuild ?That returns the build number which I'm not sure could always be considered a reliable test. It could probably be made a bit more reliable by checking the minimum build for a given version and building another table of Constants to go along with it. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 16, 2009 Share Posted November 16, 2009 Only problem I can see is Windows Neptune, but seriously, how many uses that? .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...
GEOSoft Posted November 16, 2009 Share Posted November 16, 2009 Only problem I can see is Windows Neptune, but seriously, how many uses that?If they are using that old dog then the user has more problems than just getting the version number. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 16, 2009 Share Posted November 16, 2009 Why is Windows 7 the same version number as Vista? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 16, 2009 Share Posted November 16, 2009 Why is Windows 7 the same version number as Vista?Because it's only a minor upgrade to Vista, just like XP was to 2000.Windows 2000 = NT 5.0Windows XP = NT 5.1Windows Vista = NT 6.0Windows 7 = NT 6.1 Or did you mean something else? .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...
GEOSoft Posted November 16, 2009 Share Posted November 16, 2009 Why is Windows 7 the same version number as Vista?The major version number is the same but the Minor version differs. That is often the case and even wose is that occasional situation where both the Major and Minor are the same. Then you have to also check the build number. I think such is the case with XP 64bit and Server 2003, both show as 5.2 George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 16, 2009 Share Posted November 16, 2009 I figured that Windows 7 was named that way because it was version 7. If not, where did that number come from? Link to comment Share on other sites More sharing options...
GEOSoft Posted November 16, 2009 Share Posted November 16, 2009 (edited) I knew this discussion was coming again. Up until Win 95 came along, the numbers used in the NAME were the same as the major version number and sometimes the minor version, e.g.Windows 2 or Windows 3.1. Starting with Windows 95 they changed the naming convention to reflect the year it was (supposed to be) released. I won't get into NT naming, thats another whole ball of wax. Beginning with Windows (e)XP(erience) the names have nothing to do with either the year or the version, they are simply the NAME of the OS. Edit: Clear as mud yet? Lets just put it down to some quirky ideas by Microsoft. By the way, it gets even worse if you start looking at the project names. Edited November 16, 2009 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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