As I pointed out to David off-list (and, with his encouragement, I repost here), this is actually backwards. While it very well may (quite likely will) work 99.9% of the time, good scripting practice says that you should always place a function ahead of the first place in the .jss file where the function is called. Thus, the order should be:

void Function AutoMaximize ()
var string StatusSymbol
SaveCursor ()
FindGraphic (GetAppMainWindow (GetCurrentWindow ()), "maximize symbol", s_top, s_unrestricted)
let StatusSymbol=GetWord()
If StatusSymbol == "Maximize Symbol" Then
   LeftMouseButton ()
EndIf
RestoreCursor ()
Pause()
EndFunction

Void Function AutoStartEvent ()
AutoMaximize ()
EndFunction

Also, it's no longer really required that the ResporeCursor () function be called after a SaveCursor () function or a function that changes the cursor from one type to another is issued. The EndScript now forces this to occur. Including it won't hurt anything, but it's just a line of superfluous code.

----- Original Message ----- From: "David Ferrin" <[EMAIL PROTECTED]>
To: <jaws-users-list@googlegroups.com>
Sent: Thursday, January 18, 2007 10:07 AM
Subject: [JAWS-Users] sample note pad script


Void Function AutoStartEvent ()
AutoMaximize ()
EndFunction

void Function AutoMaximize ()
var string StatusSymbol
SaveCursor ()
FindGraphic (GetAppMainWindow (GetCurrentWindow ()), "maximize symbol",
s_top, s_unrestricted)
let StatusSymbol=GetWord()
If StatusSymbol == "Maximize Symbol" Then
LeftMouseButton ()
EndIf
RestoreCursor ()
Pause()
EndFunction

Everything above this line of text if placed in your note pad script file
will serve to automatically maximize note pad everytime it is open or gains
focus.  Well at least it works on my system your results may vary, enjoy
experimenting with it.  I picked note pad because there's nothing you can do
to hurt it under normal conditions.

David Ferrin


--~--~---------~--~----~------------~-------~--~----~
Visit the JAWS Users List home page at:
http://www.jaws-users.com
Address for the list archives:
http://www.mail-archive.com/jaws-users-list%40googlegroups.com/
Address to contact the management team:
[EMAIL PROTECTED]
 You received this message because you are subscribed to the Google Groups "JAWS 
Users List" group.
To post to this group, send email to jaws-users-list@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jaws-users-list?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to