Bruce, I think you're thinking of the MSAA event onTextSelectionChange, which from it's name I believe fires when you have selected text in a control such as a rich edit box, and the text which is selected changes.
So no, I don't think it applies here. Chip -----Original Message----- From: BT [mailto:[email protected]] Sent: Tuesday, May 17, 2011 6:49 PM To: [email protected] Subject: Re: Newbie scripting question: Detecting a change in text Hi Chip, This is interesting, but could someone use text change event to monitor such an event? Also, each child has it's own parent, so, the monitoring can be localized, also monitoring the change event for that specific item, so is this not the best way to do such an event monitoring? I do know that windows does do messages, but only one at a time. I guess it would be something simple, but have not done anything outside of my app to check to see how difficult it is. Just a thought, but soon will do such things myself to see how harry it gets. Bruce Sent: Tuesday, May 17, 2011 5:40 PM Subject: RE: Newbie scripting question: Detecting a change in text Hi again TJ and all following the scripting classes, TJ's question made me think about how this is a problem which comes in lots of varieties, and which has many solutions depending on what you have to work with. So, unless Doug lets me know that he wants to reschedule for this Sunday, I'm going to plan a class around how to monitor some specific text, and be made aware when it changes (not using hotspot, which I know it can do this sort of thing). we'll cover finding the correct window object, and if your text isn't in it's own window object, then we'll cover locating text via a rectangular object (such as a line). we'll cover using timers to check the text on a regular basis for change, in case there's no event which you can use. we'll cover date-time arithmetic, so you can determine how long it's been since you last reported the value, so you don't report it too often and overwhelm the user. If it happens Doug does want to reschedule for this Sunday, then I'll save this lesson plan for the following one; but I think it can be used to demonstrate a lot of the window-eyes object model. If anyone has variations of this issue they'd like to see covered, drop me a note at my email address below (where you can also ask me for the TeamTalk .tt file if you'd like to participate in the live class). Chip [email protected] -----Original Message----- From: Chip Orange [mailto:[email protected]] Sent: Tuesday, May 17, 2011 3:00 PM To: '[email protected]' Subject: RE: Newbie scripting question: Detecting a change in text Hi TJ, The way Steve suggested would be the way I'd first try. If you haven't caught up with all the class archives, there's an example in the most recent class (or actually one before the most recent), where onClipRendered is used to watch a particular window for changes. but every situation has it's own peculiarities, so it's always good to know several ways to approach it. As I recall, I wrote a couple of articles on scripting on the GW wiki, and the second one gave examples of various situations and what you might do to solve the problem given. I think one of the problems was to look at the text at a certain position of a window or of the screen. so, you may want to check out the "part 2" article of the "so you want to write a script" at the GW wiki at http://gwmicro.com/wiki in case onClipRendered isn't enough of a solution (it may tell you when something has changed, but not exactly where or what has changed). In addition, if this isn't just a learning challenge for yourself, you may want to look at the hotspot app from GW, which can solve this type of problem for you without any programming. Chip -----Original Message----- From: Tj Squires [mailto:[email protected]] Sent: Tuesday, May 17, 2011 1:47 PM To: [email protected] Subject: Newbie scripting question: Detecting a change in text Hello all, First off, Thanks a bunch, Chip, for your scripting classes. I've only been able to attend a couple, but have listened to the podcasts for the rest. One thing not been covered yet however, is what I'm having trouble with. I will outline the situation for you. In an application, just by use, I can safely say that part of a text string is static. Take for example Your name is: Tj I know that the your name is: part of the string is static, however, if I press a hot key, control down arrow, it might change the Tj that comes after the your name is, to Joe. If I tab away and shift tab back to the box then, I get your name is: Tj. How, in this case, can I get Window Eyes to watch that line (The your name is: *) the * representing the wildcard part of it. and when I press the control down arrow say "Tj", or "Joe". I know, or I can gather, by looking at the documentation, that a clip, or list of clips, would come into play. But I can't seem to figure out how to moniter just that certain line. I know this may seem like an extremely simple script, however, I'm extremely new to this, and can't figure it out! Thanks a lot for all the help you can offer, and, Chip, thanks again for your insite with the scripting classes. I'm sorry to see that the last one was canceled! Tj MSN: [email protected] Twitter: @tjsquires Visit my website! tjsquires.net
