[jawsscripts] Re: Maximize Window Scripting Problem

  • From: "Matthew2007" <matthew2007@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 12 Oct 2007 01:37:49 -0700

Hi John Greer and Daniel Dalton,

Firstly, sorry for using the high priority flag on this message, I didn't want anyone else to read through previous messages and type up a whole long reply when I've already solved this scripting problem.

Thank you both very much for your help. John, your "space" suggestion worked beautifully. Daniel, your great attention to detail assisted me in insuring I included all quotation marks in their proper places. I can't believe I missed that as many times as I went through the text. ...Yet, these 2 suggestions didn't quite complete the job.

Now you guys might think this is completely nuts, but out of complete desperation I deleted all quotation marks and retyped them in their respective sequence, and I hit the compile hotkey to find that my scrip compiled beautifully. I launched Google and tested my script and it worked consistently and reliably--perfect! Is it possible that I might have had two left quotation marks and such within my SayformattedMessage script statements? It doesn't seem possible, but like I stated, I retyped them and all was fine.

...Another real life example to testify that my College Algebra professor's disparaging comments regarding VooDoo mathematics is not BS and is actually a scientific manner of doing math and problem solving. (Dumb complacent smile)

I'll catch you later as I've got a stack of crap to wade through before tmr,

Thank you both very much,

Matthew

Matthew

---- Original Message ----- From: "Daniel Dalton" <daniel.dalton47@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Friday, October 12, 2007 12:48 AM
Subject: [jawsscripts] Re: Maximize Window Scripting Problem


On 12/10/2007 5:14 PM, Matthew2007 wrote:
One of the lessons to be learned from this task was to write this script so that jaws will audibly verbalize to the user that in fact the window is already maximized if I try to maximize it and its already maximized. This single message doesn't seem to be manifesting itself, and I'm given an error message in this script stating: "compile error, incorrect parameter format. The statement with the error is as follows: SayFormattedMessage (OT_MESSAGE, "Window Maximized", Maximized"). If I

Text strings should always be placed between quotes.
So some examples include:
let x ="hello"
X must be a variable of type string.
I guess you can do the same with constants but I am not to good with jaws scripting. But remember a constant stays the same value In other words you can only give it a value once when you define it. But this isn't related to your question really.

saystring(hello) it will voice the string assigned to the variable hello.
Obviously you will get compile errors if hello is not of type string.
And if it doesn't exist it won't compile either.

Anyway you were missing a quote.
Here is a corrected line:
SayFormattedMessage (OT_MESSAGE, "Window Maximized", "Maximized")

place a semicolon at the beginning of this SayFormattedMessage statement, my entire script will compile just fine, but I won't hear the "maximized" message. Again, if I use a semicolon to block this statement the script works as I can hit my maximize hotkey and any page within IE will maximize as if I hit alt plus space then letter x. The problem of course is that I should be hearing the SayFormattedMessage statement audibly verbalizing the fact that my window is already maximized. I will paste below the code the scripting manual states should work but actually doesn't. Maybe you can give it a try and see if it will somehow work for you. Don't forget to include the TypeKey (cKSSpace) solution you gave me.

Did you expect to hear the message when you commented it out? You correctly worked out that was the problem but commenting something out might make it work but you won't have that code that is commented out executed. Did you know that anything to the right of a ; is ignored by the compiler? So a comment? (Different in other languages like c)

Are you copying and pasting from the manual? Because I don't think the manual would miss out a quote.


--
Daniel Dalton

http://members.iinet.net.au/~ddalton/
daniel.dalton47@xxxxxxxxx
__________ View the list's information and change your settings at http://www.freelists.org/list/jawsscripts


__________ NOD32 2587 (20071011) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com



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

Other related posts: