[jawsscripts] Re: Changing the synth volume

  • From: Gordon Luke <Gordon.Luke@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Mon, 8 Nov 2010 11:48:50 +0000

Hi

I just went into my Default.JKM using Notepad and added a couple of lines
to the common keys section e.g.

[Common Keys]
Control+Windows+F11=VoiceSofter
Control+Windows+F12=VoiceLouder

Hope this helps.

Gordon Luke
Capita IT (CAIM)


                                                                           
             "Andre Williams"                                              
             <andre.williams.1                                             
             965@xxxxxxxxx>                                             To 
             Sent by:                  <jawsscripts@xxxxxxxxxxxxx>         
             jawsscripts-bounc                                          cc 
             e@xxxxxxxxxxxxx                                               
                                                                   Subject 
                                       [jawsscripts] Re: Changing the      
                                       synth volume                        
                                                                           
             08/11/2010 10:32                                              
                                                                           
             Please respond to                                             
             jawsscripts@freel                                             
                 ists.org                                                  
                                                                           
                                                                           




Gordon. Hopefully you or someone else can walk me through the process of
attaching a hotkey to the script below.
I have taken the script text below and copied and pasted into my jaws 11
default.jss file.
I compiled and all went well.
I launched jaws 11 and went into the keyboard manager to assign a hotkey
but
I couldn't find the script: VoiceLouder().
What's my next step to test this script?
T-Y.
Andre
----- Original Message -----
From: "Gordon Luke" <Gordon.Luke@xxxxxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, November 08, 2010 2:05 AM
Subject: [jawsscripts] Re: Changing the synth volume


Found this in my list of useful e-mails from the past.  Hoped it might help
with the current desire though I know it's not exactly what you want.

Gordon Luke
Capita IT (CAIM)



             Jamal Mazrui
             <empower@xxxxxxxx
             t>                                                         To
             Sent by:                  JAWSScripts@xxxxxxxxxxxxx
             jawsscripts-bounc                                          cc
             e@xxxxxxxxxxxxx
                                                                   Subject
                                       [jawsscripts] Re: Changing the
                                       synth volume

             17/08/2010 15:53

             Please respond to
             jawsscripts@freel
                 ists.org






Below is code from the Homer script library,
http://EmpowermentZone.com/kitsetup.zip

There are scripts to change speech volume and rate, up or down.

Hope this helps,
Jamal

Void Function VoiceSaveSetting(String sSetting, Int iLevel)
;Save an Eloquence voice setting
Var
Int iLoop,
String sJcf, String sVoice, String sVoiceList

Let sJcf = GetActiveConfiguration() + ".jcf"
Let sVoiceList =
"Global|Error|Keyboard|Screen|PCCursor|JAWSCursor|Message"
Let iLoop = 1
While iLoop
Let sVoice = StringSegment(sVoiceList, "|", iLoop)
If StringIsBlank(sVoice) Then
Let iLoop = 0
Else
Let sVoice = "eloq-" + sVoice + "Context"
IniWriteInteger(sVoice, sSetting, iLevel, sJcf)
Let iLoop = iLoop + 1
EndIf
EndWhile
EndFunction

Script VoiceLouder()
;make voice 5% louder
Var
Int iLevel, Int iMax, Int iMin,
String sSetting

SayString("Volume louder")
Let sSetting = "Volume"
Let iLevel =GetVoiceVolume(VCTX_GLOBAL , True)
GetVoiceVolumeRange(iMin, iMax)
Let iLevel =GetSystemVolume()
GetSystemVolumeRange(iMin, iMax)
If iLevel ==iMax Then
SayString("Top")
Else
Let iLevel =iLevel +(5 *(iMax -iMin) /100)
Let iLevel =Min(iLevel, iMax)
SetVoiceVolume(VCTX_GLOBAL , iLevel)
SetSystemVolume(iLevel)
VoiceSaveSetting(sSetting, iLevel)
SayString(IntToString(100 *(iLevel -iMin)/(iMax -iMin)) +" percent")
EndIf
EndScript

Script VoiceSofter()
;Make voice 5% softer
Var
Int iLevel, Int iMax, Int iMin,
String sSetting

SayString("Volume softer")
Let sSetting = "Volume"
Let iLevel =GetVoiceVolume(VCTX_GLOBAL , True)
GetVoiceVolumeRange(iMin, iMax)
Let iLevel =GetSystemVolume()
GetSystemVolumeRange(iMin, iMax)
If iLevel ==iMin Then
SayString("Bottom")
Else
Let iLevel =iLevel -(5 * (iMax -iMin) /100)
Let iLevel =max(iLevel, iMin)
SetVoiceVolume(VCTX_GLOBAL , iLevel)
SetSystemVolume(iLevel)
VoiceSaveSetting(sSetting, iLevel)
SayString(IntToString(100 *(iLevel -iMin)/(iMax -iMin)) +" percent")
EndIf
EndScript

Script VoiceFaster ()
;Make voice 5% faster
Var
Int iLevel, Int iMax, Int iMin,
String sSetting

SayString("Speed faster")
Let sSetting = "Speed"
Let iLevel =GetVoiceRate(VCTX_GLOBAL , True)
GetSynthRateRange(iMin, iMax)
If iLevel == iMax Then
SayString("Top")
Else
Let iLevel = iLevel +(5 *(iMax -iMin) /100)
Let iLevel =Min(iLevel, iMax)
SetVoiceRate(VCTX_GLOBAL , iLevel)
;GetVoiceRate(VCTX_GLOBAL, True)
VoiceSaveSetting(sSetting, iLevel)
SayString(IntToString(100 *(iLevel -iMin)/(iMax -iMin)) +" percent")
EndIf
EndScript

Script VoiceSlower ()
;Make voice 5% slower
Var
Int iLevel, Int iMax, Int iMin,
String sSetting

SayString("Speed slower")
Let sSetting = "Speed"
Let iLevel =GetVoiceRate(VCTX_GLOBAL , True)
GetSynthRateRange(iMin, iMax)
If iLevel == iMin Then
SayString("Bottom")
Else
Let iLevel =iLevel -(5 * (iMax -iMin) /100)
Let iLevel =max(iLevel, iMin)
SetVoiceRate(VCTX_GLOBAL , iLevel)
;GetVoiceRate(VCTX_GLOBAL, True)
VoiceSaveSetting(sSetting, iLevel)
SayString(IntToString(100 *(iLevel -iMin)/(iMax -iMin)) +" percent")
EndIf
EndScript


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Patrik Johansson
Sent: Tuesday, August 17, 2010 5:45 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Changing the synth volume

Hi!

Nobody having tips for this?
What I want to do is a script that adjusts the volume of the speech and
makes the change global to all applications.

The line:
SetVoiceVolume(vctx_global,50)
Changes the volume to 50, but when switching to another application the
volume goes back to what it was before.
How do I avoid this and make the change permanent and global to all
applications?

Best regards,
Patrik Johansson
Polar Print, Sweden
-----Ursprungligt meddelande-----
Frn: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] Fr jaws tech
Skickat: den 12 augusti 2010 01:35
Till: jawsscripts@xxxxxxxxxxxxx
mne: [jawsscripts] Re: Finding DOM element at the virtual cursor

O.K. guys.  Here is what I came up with. It works for what I wanted and
that was a quick way to jump into the DOM for wherever the virtual cursor
is located.  It was a little tricky going between the output from the JAWS
GetTagIndex() function (only returns visible elements) and the collection
returned in the DOM (includes both visible and hidden elements) but it was
only a couple lines of code to deal with that.
Thanks for all your input.



Object Function GetCurrentElement ()

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This function returns an object pointer to the element at the virtual
cursor's current position ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

var
string tagname,
int jawstagindex,
object oIE,
object oElement,
object oTags,
int i,
int iIndex

PCCursor()
If Not IsVirtualPCCursor () then
     TurnOffFormsMode()
endif
let oIE=IEGetCurrentDocument () ;; document object let
tagname=StringSegment(GetElementDescription (1, TRUE),"\n",1) let
oTags=oIE.body.GetElementsByTagName(tagname) ;;collection of elements with
common tagname (includes hidden elements) let jawstagindex=GetTagIndex
(tagname) ;; index of current element within collection of visible
elements of same tag let iIndex=0

;;;;;; Loop through collection of all elements (including hidden) to find
the one that corresponds to the index ;;;;;; returned by GetTagIndex()
function (only visible elements). Also corrects for fact that DOM
collection is ;;;;;; zero-based

For i=0 to oTags.length-1
    If stringcompare(oTags(i).type,"hidden") then ;; a visible element
       let iIndex=iIndex+1
    endif
    If iIndex==jawstagindex then
       oElement=oTags(i)
    endif
EndFor
Return oElement

EndFunction


On Wed, Aug 11, 2010 at 12:44 PM, Homme, James
<james.homme@xxxxxxxxxxxx>wrote:

> Hi Travis,
> You are right about the line number thing. It reflects the number of
> lines in the virtual buffer. It has nothing to do with the document
> structure, unless the document forces the virtual buffer to display a
new line.
>
> Jim
>
> Jim Homme,
> Usability Services,
> Phone: 412-544-1810. Skype: jim.homme
> Internal recipients,  Read my accessibility blog. Discuss
> accessibility here. Accessibility Wiki: Breaking news and
> accessibility advice
>
> -----Original Message-----
> From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:
> jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Travis Roth
> Sent: Wednesday, August 11, 2010 9:08 AM
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: Finding DOM element at the virtual cursor
>
> If the GetTag functions return an index which represents the number of
> the tag as it occurs in the document, perhaps you can loop through
> until you find the element of that number in the document?
> I don't know if that's how the index works... But it seems a better
> chance than the column and row count which I think is just a JAWS
> thing. I
suspect
> if you use the verbosity settings to change the line length of the
> virtual buffr you will find those numbers change which would indicate
> its just a JAWS stat.
>
> So that'd leave hoping a tag index works. Or doing some serious
> hacking such as with GreaseMonkey scripts in Firefox to add an ID to
> every element...
>
>
> -----Original Message-----
> From: jawsscripts-bounce@xxxxxxxxxxxxx
> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of jaws tech
> Sent: Tuesday, August 10, 2010 10:48 PM
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: Finding DOM element at the virtual cursor
>
> I need a generic way to do this because the element that I am on may
> not have unique id or name information.  In fact the only thing that
> may come up for the elements I'm after are colspan=1 and one other one
> that I don't remember.  But those are not unique values.
> The GetTag functions only return an index not an object reference to
> an element.  I need to get an element as an object variable so I can
> then
work
> within DOM functions.  Something like:
>
> oElement=insert code that I'm looking for
> saystring(oElement.innertext) (or some other DOM method/property)
>
> Like I said I prefer working in the DOM.  It is much more
powerful/flexible
> than working with the JAWS functions.
>
> I was originally thinking of using the virtual cursor column position
> if that were in fact the sourceindex and then use code such as:
>
> iCol=GetCursorcol()
> oIE=IEGetCurrentDocument()
> oElement=oIE.all(iCol)
>
> But this wasn't working for some reason.  In fact, I don't even think
> I
was
> succeeding in getting the "all" collection.  And as I alluded to in my
> original post, I don't know if the virtual cursor column represents
> the sourceindex of the document or not.
>
> Any other ideas??
>
>
>
> On Tue, Aug 10, 2010 at 9:53 PM, Chad Foster <chad.foster@xxxxxxxxxx>
> wrote:
>
> > Check out the GetTag functions. They can help you locate tags and
> > corresponding indices.
> >
> > On 8/10/10, Travis Roth <travis@xxxxxxxxxxxxxx> wrote:
> > > I've not tried it, but I'd suggest looking at the
> > > GetElementDescription() function and seeing if you can parse out
> > > the
ID
> or name attribute.
> > > If an element doesn't have either of those its going to be
> > > difficult to
> > find
> > > in the DOM with JavaScript...
> > >
> > >
> > > -----Original Message-----
> > > From: jawsscripts-bounce@xxxxxxxxxxxxx
> > > [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of jaws tech
> > > Sent: Tuesday, August 10, 2010 5:45 PM
> > > To: jawsscripts@xxxxxxxxxxxxx
> > > Subject: [jawsscripts] Finding DOM element at the virtual cursor
> > >
> > > Hi All.
> > > I would like to find a reliable way to find the DOM element
> > > corresponding
> > to
> > > the current virtual cursor position.  I like to jump into the DOM
> > > when
> > doing
> > > IE scripting instead of the JAWS functions and I need a way to
> > > grab the current element.  As most of you already know the
> > > GetFocusedElement() functions just grab wherever the PC cursor is
> > > and have nothing to do with JAWS'
> > > virtual buffer.  Also, can someone explain the significance of the
> > > row
> > and
> > > column output of the Virtual cursor's position.  The column
> > > position
> > seems
> > > to correspond to the source index but I'm not sure what the row
> > > might represent??  Understanding this might shed some light on
> > > getting into the DOM.
> > >
> > > Thanks
> > >
> > >
> > > __________
> > >
> > > 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
> > >
> > >
> >
> >
> > --
> > Chad Foster
> > Access Technology Solutions
> > Leveling The Playing Field Through Technology
http://www.GO-ATS.net<http://www.go-ats.net/>
> > __________
> >
> > 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
>
>
> __________
> O
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>
>
> This e-mail and any attachments to it are confidential and are
> intended solely for use of the individual or entity to whom they are
> addressed.  If you have received this e-mail in error, please notify
> the sender
immediately
> and then delete it.  If you are not the intended recipient, you must
> not keep, use, disclose, copy or distribute this e-mail without the
> author's prior permission.  The views expressed in this e-mail message
> do not necessarily represent the views of Highmark Inc., its
> subsidiaries, or affiliates.
>  __________
>
> 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


__________

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


__________�

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



This email is confidential and should not be used by anyone who is not
the original intended recipient. Prudential cannot accept liability
for statements made which are clearly the sender's own and not made
on behalf of the Prudential. In addition, no statement should be
construed as giving investment advice within or outside the United
Kingdom

Prudential plc, incorporated and registered in England and Wales.
Registered Office at Laurence Pountney Hill, London, EC4R 0HH.
Registered number 1397169. Prudential plc is a holding company,
subsidiaries of which are authorised and regulated by the Financial
Services Authority (FSA)

'Prudential' is a trading name of The Prudential Assurance Company
Limited, which is incorporated and registered in England and Wales.
Registered Office at Laurence Pountney Hill, London, EC4R 0HH.
Registered number 15454. Authorised and regulated by the Financial
Services Authority. 'Prudential' is also used by other companies within
the Prudential Group, which between them provide a range of financial
products including life assurance, pensions, savings and investment
products

'Prudential' is also a trading name of Prudential Distribution Limited,
which is incorporated and registered in Scotland.  Registered Office at
Craigforth, Stirling, FK9 4UE.  Registered number SC212640. Authorised
and regulated by the Financial Services Authority.

A list of other Prudential companies together with their registered
statutory details can be found in 'About Prudential' on </font><a
href="http://www.prudential.co.uk/prudential-plc/aboutpru/groupcompanies/";
style="color: blue; text-decoration: underline; text-underline:
single"><span style="font-size:
9pt">http://www.prudential.co.uk</span></a></span></p>

An email reply to this address may be subject to interception or
monitoring for operational reasons or for lawful business practices.

__________�

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



This email is confidential and should not be used by anyone who is not
the original intended recipient. Prudential cannot accept liability
for statements made which are clearly the sender's own and not made
on behalf of the Prudential. In addition, no statement should be
construed as giving investment advice within or outside the United
Kingdom

Prudential plc, incorporated and registered in England and Wales.
Registered Office at Laurence Pountney Hill, London, EC4R 0HH.
Registered number 1397169. Prudential plc is a holding company,
subsidiaries of which are authorised and regulated by the Financial
Services Authority (FSA)

'Prudential' is a trading name of The Prudential Assurance Company
Limited, which is incorporated and registered in England and Wales.
Registered Office at Laurence Pountney Hill, London, EC4R 0HH.
Registered number 15454. Authorised and regulated by the Financial
Services Authority. 'Prudential' is also used by other companies within
the Prudential Group, which between them provide a range of financial
products including life assurance, pensions, savings and investment
products

'Prudential' is also a trading name of Prudential Distribution Limited, 
which is incorporated and registered in Scotland.  Registered Office at 
Craigforth, Stirling, FK9 4UE.  Registered number SC212640. Authorised 
and regulated by the Financial Services Authority.

A list of other Prudential companies together with their registered
statutory details can be found in 'About Prudential' on </font><a 
href="http://www.prudential.co.uk/prudential-plc/aboutpru/groupcompanies/"; 
style="color: blue; text-decoration: underline; text-underline: single"><span 
style="font-size: 9pt">http://www.prudential.co.uk</span></a></span></p>

An email reply to this address may be subject to interception or
monitoring for operational reasons or for lawful business practices.

__________�

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

Other related posts: