[jawsscripts] Re: Please help

  • From: "Snowman" <snowman@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 6 Apr 2017 14:18:57 -0500

Wow, that is an ancient message.  From back when they called them macros.

I have seen this before, and it seems like it had to do with stray, 
unexpected characters in the jss file.
I think I cleared that up just by making sure to delete all blank characters 
in the neighborhood of the script name.
Then, replacing them as needed.
I'm sure you can get this running again.
If you continue to have trouble, and want me to see if I can work that magic 
again, send a copy of the JSS to me, and I'll see what I can do.
Send to:
Snowman@xxxxxxxxxxxxxxxx




+--------------------------------------------------------------------------+
Listen to The Snowman on MushroomFM.com, Saturday evenings, 8PM Eastern 
time.
----- Original Message ----- 
From: "Sébastien Joanisse" <seb2314@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Thursday, April 06, 2017 7:26 AM
Subject: [jawsscripts] Please help


Hello,

Here's my issue. I am trying to use scripts, but I can't compile them.
The thing is, these scripts were working 100% with jaws 15, however
using jaws 16 and above I get the following error message: The word
macro must be followed by a macro name
I was okay using JAWS 15, but now it's impossible since I'm on windows
10. Here are the scripts:

use "HotSpotClicker.jsb"
Include "HJConst.jsh"

globals
int kpkTaskID,
string kpkDealt,
string kpkDealFlop,
string kpkDealTurn,
string kpkDealRiver

String Function kpkExtractItem (string sText, string itemName)
var
string sItem,
string sResult,
int i,
int j

Let i = StringContains (sText, itemName)
if (i > 0) then
; item found
Let sText = StringChopLeft (sText, i + stringLength (sItem))
Let i = StringContains (sText, "(")
Let j = StringContains (sText, ")")
Let sResult = Substring (sText, i+1, (j-i)-1)
return (sResult)
endif
; otherwise, item not found
return ("")
EndFunction

Script kpkMonitorWindow ()
var
string sText,
handle h,
string sResult,
int i

Let kpkTaskID = 0
Let h = getFocus()

; if (GetWindowClass(h) != "SWT_Window0, ") then
; not our window
; return
; endif

Let sText = GetWindowText (h, 0)
; You have been dealt
Let sResult = kpkExtractItem (sText, "You have been dealt")
if (sResult) then
Let kpkDealt = sResult
endif

; The flop is
Let sResult = kpkExtractItem (sText, "The flop is")
if (sResult) then
Let kpkDealFlop = sResult
endif

;The turn is
Let sResult = kpkExtractItem (sText, "The turn is")
if (sResult) then
Let kpkDealTurn = sResult
endif

; The river is
Let sResult = kpkExtractItem (sText, "The river is")
if (sResult) then
Let kpkDealRiver = sResult
endif


EndScript

Script ForceUpdate ()
kpkMonitorWindow ()
EndScript

Script sayDealt ()
SayString (kpkDealt)
EndScript


Script SayFlop ()
SayString (kpkDealFlop)
EndScript

Script SayTurn ()
SayString (kpkDealTurn)
EndScript

Script sayRiver ()
SayString (kpkDealRiver)
EndScript


Void Function NewTextEvent(handle hwnd, string buffer, int nAttributes,
int nTextColor, int nBackgroundColor, int nEcho, string  sFrameName)
; cancel the monitor if already started
if (kpkTaskID) then
UnscheduleFunction (kpkTaskID)
endif
NewTextEvent(hwnd, buffer, nAttributes,nTextColor, nBackgroundColor,
nEcho, sFrameName)
Let kpkTaskID = ScheduleFunction ("kpkMonitorWindow", 5)
EndFunction

If I remove the script called ForceUpdate, I can compile the scripts
no problem, however I need this script to compile as well. Any help
would be greatly appreciated.
__________�

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: