[jawsscripts] Re: An ini value retrieval problem

  • From: Jitendra <jeet.invincible@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sat, 22 Aug 2009 09:10:22 +0530

 
Martin Slack wrote: Hi Jitendra, Immediately before the line: If
IniReadInteger ("1by1", "eq_enable", 1, Spath) == 1 then if you arrange to
speak, spell or print out the value of the variable Spath, do you get the
exact path you expect? Yes, since program files is the big name, it gets
shortened, and 1by1 are only 4 characters, they are as-it-is, and I get the
full path to the ini file. You say the ini file contains the current values
for the program, yet the line I have quoted above is checking for the
defaultvalue (only returned if the actual values cannot be retrieved). Are
you sure that the actual values are not being returned, thus activating the
'false' leg of the if statement every time? I don't know. Also the script
ToggleEq does not appear to change anything, unless TypeCurrentScriptKey
alternately overwrites the ini file with the default value and the current
one. Is this the case? no, but changing from the ini file does not tell the
program to behave accordingly, type current script key is used that's why.
hth Thank you, Jitendra. Martin ----- Original Message ----- From:
"Jitendra"<jeet.invincible@xxxxxxxxx>[1] To: <jawsscripts@xxxxxxxxxxxxx>[2]
Sent: Friday, August 21, 2009 7:36 PM Subject: [jawsscripts] An ini value
retrieval problem Hello friends, I have an ini values problem, where I am
unable to get the value from the external file, the file holds the current
values for the program and is located in the program's installation folder.
see the code, it may however is a bit longer, but do help me please. Thank
you, Jitendra. ;code start. Include "HjGlobal.jsh" ; default HJ global
variables Include "hjconst.jsh" ; default HJ constants Include "common.jsm"
;message file Include "1by1.jsm" ;Message file for 1by1 ;special thanks for
doug lee for creating and providing the following modules for free. include
"olchar.jsl" ; Character to/from ANSI value converter, required by xlist.jsl
include "olstring.jsl" ; String manipulation utilities include "olutil.jsl"
;Miscellaneous utility functions Void Function AutostartEvent () SayString
(Autostart_L) EndFunction int Function IsEquOn () Var String sPath, String
Sname, Object fso, Object File Let Spath = GetAppFilePath () Let Sname =
GetAppFileName () Let Spath = stringChopRight (Spath, 9) Let Spath =
shortenFolderPath (FSO, Spath) Let Sname = stringChopRight (Sname, 3)+"ini"
Let Spath = Spath+"\\"+Sname If IniReadInteger ("1by1", "eq_enable", 1,
Spath) == 1 then Return true Else Return False EndIf EndFunction Script
ToggleEq () if IsEquOn () then TypeCurrentScriptKey () SayString ("off")
ElseTypeCurrentScriptKey () SayString ("on") EndIf EndScript string Function
shortenFolderPath (object ByRef fso, string fname) ; Convert long folder
paths (names containing components not adhering to the old DOS 8.3 format)
toshort (8.3-compatible) paths. ; Used by CompileSkypeScripts below to avoid
numerous problems with passing space-containing file paths through batch
files. var object oFolder if !fso then let fso = olGetFSObject() if !fso
then; Can't shorten, so return what we got. return fname endIf endIf let
oFolder = fso.getFolder(fname) if !oFolder then return fname endIf return
oFolder.shortPath EndFunction ;code end. __________ Visit and contribute to
The JAWS Script Repository http://jawsscripts.com[3] View the list's
information and change your settings at
http://www.freelists.org/list/jawsscripts[4]
----------------------------------------------------------------------------
---- No virus found in this incoming message. Checked by AVG -
www.avg.com[5]Version: 8.5.409 / Virus Database: 270.13.63/2317 - Release
Date: 08/21/09 06:04:00 __________  Visit and contribute to The JAWS Script
Repository http://jawsscripts.com[6] View the list's information and change
your settings at http://www.freelists.org/list/jawsscripts[7] 


--- Links ---
   1 mailto:jeet.invincible@xxxxxxxxx
   2 mailto:jawsscripts@xxxxxxxxxxxxx
   3 http://jawsscripts.com
   4 http://www.freelists.org/list/jawsscripts
   5 http://www.avg.com
   6 http://jawsscripts.com
   7 http://www.freelists.org/list/jawsscripts
__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts: