Automating day to day work using jaws scripts
Recently, I was little bit out of jaws scripting business, as there were some other task which were on higher priority. Any which ways those task got over
and again I am thinking about jaws scripting, making my exodus and other nonaccessible applications usage more smooth.
But in last few months while I was working, I found some task which were performed repeatedly like getting files from the repository and committing files to
repository. I thought of writing some sort of script to do this. I could have done this using any scripting language, but then i have to go to command prompt
and execute those scripts. Well suddenly a thought came to my mind that hey, I can also do this using jaws script engine. That's it, I simulated my actions
on those files and wrote them in jaws script to do it for me every time.
This script was actually activating the "APPLICATION" (context menu) key, looping through the options available in the menu, if found the desired option then
activating that menu by sending the "ENTER" key.
Here is the code that I wrote:
Script SVNUpdate ()
var
int IsMenuSVNUpdate,
string CurrentMenu,
int loopSafety
TypeKey ("F5")
SaveCursor ()
TypeKey ("SHIFT+F10")
RouteJAWSToPc ()
While (!IsMenuSVNUpdate && loopSafety<20)
Let CurrentMenu=GetLine ()
If (CurrentMenu=="SVN Update") then
RouteJAWSToPc ()
let IsMenuSVNUpdate=1
Let loopSafety=20
LeftMouseButton ()
Else
NextLine ()
EndIf
let loopSafety=loopSafety+1
EndWhile
TypeKey ("ALT")
RestoreCursor ()
EndScript
Script SVNCommit ()
var
int IsMenuSVNUpdate,
string CurrentMenu,
int loopSafety
TypeKey ("F5")
SaveCursor ()
TypeKey ("SHIFT+F10")
RouteJAWSToPc ()
While (!IsMenuSVNUpdate && loopSafety<20)
Let CurrentMenu=GetLine ()
If (CurrentMenu=="SVN Commit...") then
RouteJAWSToPc ()
let IsMenuSVNUpdate=1
Let loopSafety=20
LeftMouseButton ()
Else
NextLine ()
EndIf
let loopSafety=loopSafety+1
EndWhile
TypeKey ("ALT")
RestoreCursor ()
EndScript
Yes script is very simple and is not refactored properly, but what I want to convey through this post is jaws scripting can also make life easier for tasks
that have to be performed repeatedly.
"Make nonaccessible application more accessible and accessible applications more usable"
Sunday, July 20, 2008
Subscribe to:
Posts (Atom)