[jawsscripts] HotSpotClicker IsSameScript question

  • From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sun, 5 Aug 2012 04:16:43 +1000

Hi Dang.

...Firstly, sorry for taking ages to respond to this queery, hope it's not 
useless info for you by now.  but my laptop was down for few days this week, 
so, ... yeah,
kinda tricky to get to everything in the meantime.

Ok, Firstly, to my admittedly non-exhaustive knowledge on this, there's no 
builtin way in HotSpotClicker, of being able to execute different 
hotspots/functionality  depending on number of times key is pressed, within 
a hotspot definition.
Although it is indeed a very interesting idea!

However, ways would have to be thought of to get around the fact, that 
sometimes, hotspots are not executed by hotkeys, but simply by arrowing to 
them in a list and hitting enter.  so, yeah, would take some design thought 
re any future implementation of such a feature.

So, your second desired alternative, was to know how you could make your own 
script, then attach it to a single key, which triggers one hotspot if 
pressed once, then if pressed twice quickly, executed a different Hotspot, 
to facilitate, as an example, speaking text at the first press, and clicking 
the mouse at that spot if user presses key twice, via an alternatively 
programmed second hotspot.
Is that correct?

Well, as perhaps a very simple example, you might accomplish something like 
this with the following example test code:

oh BTW, the magic Run HotSpot primary function your looking for, to 
incorporate into a script when desired, as in this case, is
HSCLookupKey ()

And what a doozy it is! Check out the number of variables in that puppy!
hahaha.

; note: be aware that to my understanding, pressing the Script's key twice, 
thus making IsSameScript true, does,not, prevent the SinglePress Script from 
fully executing, as you might initially expect. It will interrupt speech, if 
the SinglePress is only speaking text, as in this case, but one would need 
to take care not to make the SinglePress, Else condition, a leftClick action 
in the hotspot attached to that.
There's probably a way to do that, but I'm not aware of what it would be.

Script ReadClickScreenArea1 ()
; Reads ScreenArea1 if ScriptKey is pressed once, clicks there to bring 
focus if pressed twice.
var
int iTimesPressed

let iTimesPressed = IsSameScript ()
if iTimesPressed == 1 then
; We know if the IsSameScript function is true, i.e. if it equals 1, that 
the key of this script has actually been pressed twice. even though 
iTimesPressed value is 1. don't get confused by that.
; so carry out desired Double-press functionality,  I.e. run second 
LeftClick hotspot.
HscLookUpKey ("MyLeftClickHotSpot'sKeyName") ; E.g. "Alt+1" etc.
; note: if the Hotspot you wish to run as Parameter to the HSCLookUpKey 
function, does not have a key assignment because you wish to save Key 
RealEstate, replace the KeyName inside quotation marks above, with the 
actual name/label of the Hotspot instead.
; I.e. alternatley:
;HscLookUpKey ("MyLeftClickHotSpot'sLabel")
else ; key has only been pressed once so carry out the hotspot to speak text
HscLookUpKey ("MyReadTextHotSpot'sKeyName")
EndIf
EndScript

hth.

----- Original Message ----- 
From: "Dang Manh Cuong" <dangmanhcuong@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Tuesday, July 31, 2012 6:28 PM
Subject: [jawsscripts] scripts question


> Hi listers
> Anyone who use hotspot clicker, please help me
> I'd like to create a spot set that will read the info at the cursor 
> position, but I want to set focus to that position when the key press 
> twice.
> The first method I thought that create two spot set, one for reading info, 
> one for setting focus, then write a script, and add condition for calling 
> these spot set. However I didn't know the way to call these. So I wonder 
> if you can show me one of the way to:
> 1. Create a spot set and add condition if user activate it twice.
> 2. Create two sets, and write script for calling it.
> Thanks for any help.
> ________________
> Dang Manh Cuong
> HCMC University of Pedagogy:
> The Psychology and education
> Mobile: +84 902-572-300
> E-mail: dangmanhcuong@xxxxxxxxx
> Yahoo! ID: manhcuong0312
> Skype name: dangmanhcuong
> facebook: http://facebook.com/dangmanhcuong
> Blog: http://vi.netlog.com/Cuong_littlecat
> Website: http://ngoisaodanduong.com
> http://www.saomaicenter.org
> Projec-Website: http://dangmanhcuong.googlecode.com
> __________�
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
> 

__________�

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

Other related posts: