Are you programming a Window-Eyes script or using an external script? print "hello" for example. speak "hello" would make it speak, but wouldn't display on the screen. You could also keep a dialog box on the screen and change the message as the script continued, while speaking it at the same time. Look at the custom dialog box part of the scripting manual.
J.J. Meddaugh - ATGuys.com A premier Licensed Code Factory and KNFB Reader distributor ----- Original Message ----- From: David To: [email protected] Sent: Thursday, December 17, 2009 10:32 PM Subject: Re: VBS Converting strings to numbers Ok, willing to give it a try. Could you give just one example, please, just to have me started off. How would I use the PRINT command to show the message "Here we go again"? Do I need to load any objects? And, when you state, the results would depend on my platform, what exactly do you mean? Thanks alot, ----- Original Message ----- From: J.J. Meddaugh To: [email protected] Sent: Friday, December 18, 2009 3:53 AM Subject: Re: VBS Converting strings to numbers There's always the print command, which would have varying results, depending on your platform. J.J. Meddaugh - ATGuys.com A premier Licensed Code Factory and KNFB Reader distributor ----- Original Message ----- From: Chip Orange To: [email protected] Sent: Thursday, December 17, 2009 9:47 PM Subject: RE: VBS Converting strings to numbers Hi David, once you say you want it to run outside of window eyes, then all the choices I was about to mention go away, and I think you're stuck with the msgBox command. if you will make it run in window eyes only, you can use the "speak" command to say your message (or show it in braille), but not on the screen for sighted users. hth, Chip -------------------------------------------------------------------------- From: David [mailto:[email protected]] Sent: Thursday, December 17, 2009 8:55 PM To: [email protected] Subject: Re: VBS Converting strings to numbers Thanks everyone, you have been good, and my script now is up and running this far. Just have one more question: As my original sample showed you, depending on whether or not the two values equal with each other, a message is displayed - either a positive or a negative one. Only way, I fine to do this, is through a MsgBox. Problem is, that this requires the user to click the OK button all the time, which could be rqather many times through out the session (we are talking kind of a game, here; so imagine :D). I'd rather liked a message just poping up on the screen, with the feedback as to how correct the entered number is. Something like what happens when a software pops up a tooltip. Maybe I need make a GUI of some kind to accomplish that one. Anyone s to give me a kick the right way off? :) Oh, and yes, if there is a way to do this, without relying on other third-party scripts - like GwToolkit or Homer - that would be great. Not that I hold anything against any of these scripts, they are great indeed. But I kind of had a dream, that I would make the script, so that other users (who are sighted, and do not have, or don't rely on, window-eyes) would be able to enjoy the game as well. Thanks again, ----- Original Message ----- From: Chip Orange To: [email protected] Sent: Friday, December 18, 2009 2:27 AM Subject: RE: VBS Converting strings to numbers David, you can always use the typeName() function to check what type a variable is in those situations like this where things don't make sense. also, this is where the immediate mode can make your debugging much easier and faster, as you can easily keep experimenting in there until you find the answer. if you have not downloaded the script for immediate mode you should really do so. hth, Chip ------------------------------------------------------------------------ From: David [mailto:[email protected]] Sent: Thursday, December 17, 2009 2:04 PM To: Scripting List WE Subject: VBS Converting strings to numbers I have a VB script which goes like this: Taken = InputBox( "Enter a number: " ) If Taken = Number Then MsgBox "Yep! There you got it." If Taken <> Number Then MsgBox "That was a blow!" Number is a Numeric value, randomly set earlier in the script. Even if I make sure to enter the CORRECT value into the editbox - in other words into the variable Taken, the script keeps giving me the "That was a blow!" message. I can't get it to accept that the Taken and Number values are equal. I do wonder, if the returned value from the InputBox is a String format? If so, I guess I have to (somehow) convert it into a Numeric format, before I can do the comparison. Am I on the track of something? If so, how do I do the conversion of a String into a Numeric? And, first we are doing that, what is the way to convert a Numeric into a String? Hope this makes sense, and that someone could point me in the right direction. Thanks!
