 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
fmate14
Joined: 28 Oct 2007 Posts: 75 Location: Hungary, Érd
|
Posted: Sun Mar 08, 2009 10:01 am Post subject: OS Version with integer type |
|
|
The new Autohotkey has very good features, for example support WheelRight. It requires at least Windows Vista. But AutoHotkey doesn't support “at least” os version check, I must use
| Code: | | if ( A_OSVersion == "WIN_VISTA" ) |
and update it if a new windows released, or I can use
| Code: | | if A_OSVersion in WIN_NT4,WIN_95,WIN_98,WIN_ME,WIN_2000,WIN_XP,WIN_2003 |
and it is maybe a little slow.
So, it can be easier:
| Code: | | if ( A_OSVersionInteger >= 8 ) |
_________________ Portable Keyboard Layout
Happy Sunday |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7294 Location: Australia
|
Posted: Sun Mar 08, 2009 1:17 pm Post subject: |
|
|
An alternative:
| Code: | A_OSMajorVersion := DllCall("GetVersion") & 0xff
A_OSMinorVersion := DllCall("GetVersion") >> 8 & 0xff
MsgBox % A_OSMajorVersion "." A_OSMinorVersion
|
For A_OSVersion >= WIN_VISTA:
| Code: | | if A_OSMajorVersion >= 6 | See MSDN: Operating System Version
Note that if compatibility mode is in effect for AutoHotkey.exe, A_OSVersion and GetVersion() report the "fake" version number, but WheelLeft/WheelRight may still be supported if the script is really running on Vista+. |
|
| Back to top |
|
 |
fmate14
Joined: 28 Oct 2007 Posts: 75 Location: Hungary, Érd
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|