[jawsscripts] Re: RUN function in JAWS Basic

  • From: "Paul Magill" <magills@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sat, 16 Nov 2013 23:09:21 +1100

Hi Csaba,

I think that the file paths in the .INI file being read by your script, will
not need double backslashes.

It is my understanding that, only quoted file paths being directly read by
the script compiler need double backslashes.
That is, those within script or function bodies, or in constants or globals
within the .JSS, JSM or .JSH files.

File paths read from an .INI file for example, are read at runtime, & not by
the compiler, so do not need double backslashes. 

See the sample .INI file below the following script:

Script TestOnF9 ()
VAR
string TestPath

let TestPath = IniReadString ("sample paths", "path1", "", "h:\\sample.ini")

run ("\"" + TestPath  + "\"")
EndScript

The sample.ini file:
[sample paths]
path1=C:\Program Files\Freedom Scientific\FSReader\2.0\FSReader.exe

Regards,
Paul from Australia

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Csaba Godo
Sent: Saturday, 16 November 2013 4:32 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: RUN function in JAWS Basic


Thanks, Doug! The solution you have proposed me works well, so the following
lines are enough to get the right path to pass to the RUN
function:

sPath = IniReadString (gsSection, "Path", "", gsIniFile) sPath = "\"" +
sPath + "\""
Run (sPath)

So the user can simply save the desired pathes into the INI file with double
backslashing and the spaces in the path have no importance.

Csaba


__________�

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

Other related posts: