[jawsscripts] Re: JAWS Script Detecting for windows XP

  • From: "John Martyn" <johnrobertmartyn@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 16 Mar 2012 11:21:20 -0700

I found an easier way to detect for XP and lower.
var
string sysDir
let sysDir = GetUserSettingsDirectory ()
if StringSegmentCount (sysDir, "\\") == 10 || IsWinVista () then
let iTunesApp = CreateObjectEx ("iTunes.application", 2)
else
let iTunesApp = CreateObject ("iTunes.application")
endif
This was able to detect that XP and lower have a file path of 9 folders
including the root, while Vista and windows 7 have 10 to the user profile
directory.
I just tested this and it works nicely.
John
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jim Bauer
Sent: Friday, March 16, 2012 10:31 AM
To: jawsscripts@xxxxxxxxxxxxx; scripts@xxxxxxxxxxxxxxxxxxxxx
Subject: [jawsscripts] Re: JAWS Script Detecting for windows XP

XP boots using the 3 files "ntldr", "ntdetect.com", and "boot.ini", all
found in the root of the OS install drive (c:, d:, etc). These won't be
present on a 7 machine unless specifically created by the user.
You could loop through these file names, checking each one for existence
using the JAWS FileExists() built-in. Something like:
Let osRoot = stringLeft(stringContains(getWindowsSystemDirectory(),
":\\")+1) If !fileExists(osRoot+"<Specific_file_here>") then
        Return
endIf
...
endWhile

As I said, you can subvert this, but I think any additional validity checks
would be overkill here.


On Fri, Mar 16, 2012 at 11:42:51, John Martyn wrote:
> 
> Hi,
> As trying not to exclude JAWS 10 from my scripts, I have a pickle. 
> JAWS 10 doesn't recognize isWindows7 function. But it also doesn't 
> have isWindowsXP available.
> 
> I was doing a line such as:
> 
> If isWindows7 || isWinVista then
> 
> Do something
> 
> Else
> 
> ;assuming XP and lower
> 
> Endif
> 
> As an attempt to keep JAWS 10 compatible, I was thinking I could get 
> the user setting directory and detect for App Data instead of 
> Application Data, but I don't know how this would affect different 
> languages of operating systems and probably not a good idea.
> 
> The function GetWindowsOS returns 3 on windows 7 and XP so that 
> doesn't do me any good.
> 
> Is there some way I can detect for windows XP?
> 
> If not, I'll have to abandon JAWS 10.
> 
> Thanks for any suggestions,
> 
> John Martyn
> 
> 
> 
> __________�
> 
> View the list's information and change your settings at 
> //www.freelists.org/list/jawsscripts




__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: