[jawsscripts] Re: Script error Jaws 12 Quicken 2003 script

  • From: Jackie McBride <abletec@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sat, 13 Nov 2010 10:57:31 -0700

Try this, Lenny:
String Function MakeDelimitedList (string sIn, string sDelimiter, int
iBlanksAllowed)
var
        int i,
        int l,
        string c,
        string sOut

Let l = StringLength (sIn)
Let sOut = SubString (sIn, 1, 1)
Let i = 2
While (i <= l)
        Let c = SubString (sIn, i, 1)
        if (c != " ") then
                Let sOut = sOut + c
        else
                ; found a blank
                ; are there two or more blanks in a row?
                if (SubString (sIn, i+iBlanksAllowed, 1) == " ") then
                        ; found a break, 2 spaces or more
                        let sOut = sOut + sDelimiter
                        ; now find the next non-blank
                        while ((i <= l) && (SubString (sIn, i, 1) == " "))
                                Let i = i+1
                        EndWhile
                        Let i = i-1
                else ; no the next was not also a blank
                        Let sOut = sOut + " "
                endif
        endif ; c was a blank
        Let i = i+1
EndWhile
return (sOut)
EndFunction

I changed most variable names to be more in conformity w/FS's standards.

On 11/13/10, Martin Slack <m.g.slack@xxxxxxxxxxxx> wrote:
> What the compiler is saying is that the word "in" is now a keyword in the
> scripting language, and is therefore not available for use as a variable
> name.  Just replace all the occurrences of this word with another one.  For
> example you could use sin, or the word in prefixed by the letter s, to
> remind users that this is a string variable.  Then recompile and see if any
> more words suffer from a similar problem.
>
>   hth
>
> Martin
>
>
>
> ----- Original Message -----
> From: "Lennie" <lennie_r@xxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Saturday, November 13, 2010 5:42 PM
> Subject: [jawsscripts] Script error Jaws 12 Quicken 2003 script
>
>
>> Hi,
>> I am using Jaws 12 with Quicken 2003. There was a change somewhere
>> from Jaws 11 that caused Quicken split transactions screen not to
>> work correctly in Jaws 12. The problem is that when you do a split
>> transaction, CTRL+S, Jaws does read the heading Category, memo and
>> amount, but it cannot read each of the entry in those fieleds and
>> entering any of those items does not say what I typed unless I use
>> the Jaws cursor. Insert+home will read each field one at a time.
>>
>> I copied Quicken scripts from the Jaws users group and pasted them
>> into Jaws 12 my settings ENU. That did not correct the problem.
>>
>> I attempted to recompile the script, but I got the following error:
>>
>> Compile Error
>>  The word "in" cannot be used as a variable name
>> OK
>>
>> Here is the script below with the error. I can only do very, very
>> basic scripting and I have no idea how to correct this problem. I
>> appreciate any guidance and help so that I can successfully use Jaws
>> 12 for my Quicken 2003 which is no longer supported by Freedom
>> Scientific. I do not want to jump back and forth between Jaws 11 and
>> Jaws 12 every time that I use Quicken.
>>
>> The complete script can be found under the heading Quicken at:
>>
>> http://www.jaws-users.com/scripts/
>>
>> I appreciate any help . Take care,
>>
>> Lennie
>>
>> String Function MakeDelimitedList (string in, string delimiter, int
>> BlanksAllowed)
>> var
>>         int i,
>>         int l,
>>         string c,
>>         string out
>>
>> Let l = StringLength (in)
>> Let out = SubString (in, 1, 1)
>> Let i = 2
>> While (i <= l)
>>         Let c = SubString (in, i, 1)
>>         if (c != " ") then
>>                 Let out = out + c
>>         else
>>                 ; found a blank
>>                 ; are there two or more blanks in a row?
>>                 if (SubString (in, i+BlanksAllowed, 1) == " ") then
>>                         ; found a break, 2 spaces or more
>>                         let out = out + delimiter
>>                         ; now find the next non-blank
>>                         while ((i <= l) && (SubString (in, i, 1) == " "))
>>                                 Let i = i+1
>>                         EndWhile
>>                         Let i = i-1
>>                 else ; no the next was not also a blank
>>                         Let out = out + " "
>>                 endif
>>         endif ; c was a blank
>>         Let i = i+1
>> EndWhile
>> return (out)
>> EndFunction
>>
>>
>>
>> __________�
>>
>> 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
>
>


-- 
Change the world--1 deed at a time
Jackie McBride
Scripting Classes: http://jawsscripting.lonsdalemedia.org
homePage: www.abletec.serverheaven.net
For technophobes: www.technophoeb.com
__________�

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

Other related posts: