[jawsscripts] Re: script hot key not working

  • From: "Ann Medlar" <amedlar1@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Mon, 02 Mar 2009 12:53:37 -0500

Hi all,
Below is my script which I have compiled on PC.  I am using Windows XP and
Jaws 10.x.
I compiled script below but when I launch AVG and press control+m to invoke
script I just get a beep from windows and do not get message press
escape to close.
Any help is appreciated.
;;Jaws 10

;Scripts of AVG version 8.0

;32009 by Ann Marie Medlar

include "hjconst.jsh"

include "hjglobal.jsh"

include "common.jsm"

include "AVG.jsm"



Script ScriptFileName ()

ScriptAndAppNames (MsgAVGName )

EndScript



String Function RetrieveStaticText ()

Var

Handle hWnd,

string sText

Let hWnd = GetFocus ()

Let hWnd = GetFirstWindow (hWnd)

Let sText = GetTextInRect (GetWindowLeft (hWnd), GetWindowTop (hWnd),
GetWindowRight (hWnd), GetWindowBottom (hWnd), 0, IgnoreColor, IgnoreColor,
True, False)

Let sText = stringChopLeft (sText, 0)

Return sText

EndFunction


Script SayStaticText ()


;Hotkey ctrl + m

Var

Handle hWnd,

String sText

If UserBufferIsActive () Then

UserBufferDeactivate ()

Endif

Let hWnd = GetFocus ()

If GetWindowSubtypeCode (GetFirstWindow (hWnd)) == WT_READONLYEDIT Then ;=43

return

Endif

Let sText = RetrieveStaticText ()

SayFormattedMessage (OT_USER_BUFFER, sText + "Hit escape to close window")

EndScript


__________ 
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: