terrypin Posted January 28, 2009 Report Share Posted January 28, 2009 I used to follow any Text Type with a Delay (typically 100 ms) and seemed to get fair results. But recently, reasoning that it should be even better (possibly infallible), I've switched to using Wait for Text Playback. However, I seem to be getting erratic results. With a simple test macro such as Text Type (Simulate Keystrokes): <ARROW DOWN> // Move down to next line Wait for Text Playback frequently it will continue running indefinitely. But on the next run it might work OK. Anyone else having similar behaviour please? Or able to confirm my tests? Or perhaps I've misunderstood the capabilty or purpose of this command? Come to think, why wouldn't such a command be built-in to every Text Type anyway? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
stevecasper Posted January 28, 2009 Report Share Posted January 28, 2009 I used to follow any Text Type with a Delay (typically 100 ms) and seemed to get fair results. But recently, reasoning that it should be even better (possibly infallible), I've switched to using Wait for Text Playback. However, I seem to be getting erratic results. With a simple test macro such asText Type (Simulate Keystrokes): <ARROW DOWN> // Move down to next line Wait for Text Playback frequently it will continue running indefinitely. But on the next run it might work OK. Anyone else having similar behaviour please? Or able to confirm my tests? Or perhaps I've misunderstood the capabilty or purpose of this command? Come to think, why wouldn't such a command be built-in to every Text Type anyway? -- Terry, East Grinstead, UK I'm not able to duplicate the problem you describe. Honestly, I've never used delays or Wait for Text Playback before, because the wait seems to be built in, making the command itself superfluous. However, in fairness to your problem, I built the following very simple macro: Window Activate: Untitled - Notepad Variable Set Integer %N[1]% to 1 Repeat Start (Repeat 15 times) Text Type (Simulate Keystrokes): Here is test number %N[1]%. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. Done %N[1]% Variable Modify Integer %N[1]%: Increment Wait for Text Playback End Repeat It repeated all 15 times without fail, and finished after the 15th iteration. However (notice the stress), when I disabled the Wait for Text Playback command I got one of the strangest errors I've ever seen. Iterations 1, 2, and 3 each typed out perfectly, but here is what 4 looked like: Done 3Here is test number 4. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Large Quantity of Text. And a Lar ATITYF TT>NAA AITF et. ANA e anty T> N e antit ofTETN arUNT T. d ARuay T>AD A UITOFEX RGattoxt. nd g antt f xt.a reatty oX D reUITY TEX> ANDAE TT Oe. AGEUATYF Xd aagti o t. d e nty oET> a agAITF ext. AndaG atty of XT> D ARGEQANTT . A GEATTYOX D RE ANTYFT D RANT TT> ND rUNTIY T> D REUATY OF XTA RGny fx reatyoET nd a geUNI Fx.N r TI Ox darutiof t. d R TIOx.ND A agQuiyof TET> dA ntity ofX leATTF . reany t Ad AR ut o n EQNTTOFT>N ARE NT OE D RG NIOFx a rguay ox.N LE NTITOFT D R TIOFEX AARGUTIOFX>aGNTTY . d reattyoE> NE$HR IS BR AGENTTY OF > d LG ANTYEXT DAE UTIYFT>N LGENTTOFXT A AAREatty t d r UANTITY OFX AARGait ex d NTTF T ND LE TIT OF.N E ATITY OF x RE TTOFXT DAAGny o T> D AAR QTI OE> D r NTY FET AAGQNTT OF TXTd a Lrge ITOFXT AND A RE QUNY X a r ti oET N LGEantity f t d ar QAITF XT a geuaito TE> ND E ANI O XT A e tiof ET D e QUANY T>Narntt oftd e aito t.GEatty oeta rgITOFXT AARG ANI Ox A Lrge utio x. daG ATY E Ad LGEANTY T> a arge UNTY aG uti oxt A R NTTYOET AD A AGEUN Ot LG ANI OFx daar qnttof. d rgany T dAGANT E> D aeNI Ox DA RGEANTY TT N reuatty T>d Raty EX> A eANTY OFE> And e NTTYOx. ANDALG UANY X AARGUANTITYFTXT AAGnt oex A AAGUNIY x a gatyof xt A RG NTIOFXTa raty T> All the rest look like that gibberish, too (without the successfull first couple of lines). This isn't the first time I've seen this error in ME Pro, but it is the first time I've mentioned it (I don't remember exactly what I was doing when I got it the first time, but it was something similar to this). I'll try to duplicate it a couple of more times then edit this post estimating the rate of recurrence. EDIT Ok, after 5 tests, I received 100% failure at approximately the same point in the macro. Several lines into Repeat number 4 the gibberish starts up. On test number 3 I noticed the Running Man icon disappears at approximately Repeat number 5 (hard to say exactly). I presume that is because the macro continued to play out and finished "typing" faster than Notepad could keep up, which resulted in the running man disappearing at the end of the macro rather than at the end of the typing. This is supported by a 6th test where I right-clicked the running man during Repeat 1 and the text continued typing until reaching some point near the end of Repeat 2. EDIT 2 Well, for a 7th test I added a Wait for Key Press: ENTER at the end of the script, to keep the running man up until after the entire macro had run and then keep it running until I decided it was finished (this to test my theory from the previous Edit. No joy. He disappeared at about Repeat 5 (-ish), and when the repeats had completed, the macro was done, no need to press ENTER. This is a messy bug to report, because I'm not exactly sure what to say If anybody else is able to duplicate this problem, please let me know. Quote Link to comment Share on other sites More sharing options...
stevecasper Posted January 28, 2009 Report Share Posted January 28, 2009 As a Third Edit, but in a new post: The error occurs with small strings of text as well: Window Activate: Untitled - Notepad Variable Set Integer %N[1]% to 1 Repeat Start (Repeat 500 times) Text Type (Simulate Keystrokes): Here is test number %N[1]%. And a Small Quantity of Text. Done %N[1]% Variable Modify Integer %N[1]%: Increment End Repeat Wait for Key Press: ENTER I had to increase the Repeats to get the error, but it hit at about Repeat 86: Here is test number 84. And a Small Quantity of Text.Done 84 Here is test number 85. And a Small Quantity of Text. Done 85 Here is testner. ama TI OxDOE *^ HRE EUB*>D lATY > O & r iesubr D SLLUNY exDN** EETTR daall ay . on89 Also, as a side note: The Wait for Key Press: ENTER command doesn't work, even when I don't get this gibberish error. With a repeat of only 50, the gibberish never happens, but the running man is gone by line 18. In fact, if I place the Wait for Key Press: ENTER inside the repeat loop, it is not recognized and the repeats just go along as though the wait doesn't exist. If I put the Wait before the Repeat, it works, if I put it just after the Repeat Start, then it works on the first pass, but no any additional passes. Any other location within the repeat gets ignored completely. This I can report as a bug. -reported- Quote Link to comment Share on other sites More sharing options...
stevecasper Posted January 28, 2009 Report Share Posted January 28, 2009 I used to follow any Text Type with a Delay (typically 100 ms) and seemed to get fair results. But recently, reasoning that it should be even better (possibly infallible), I've switched to using Wait for Text Playback. However, I seem to be getting erratic results. With a simple test macro such asText Type (Simulate Keystrokes): <ARROW DOWN> // Move down to next line Wait for Text Playback frequently it will continue running indefinitely. But on the next run it might work OK. Anyone else having similar behaviour please? Or able to confirm my tests? Or perhaps I've misunderstood the capabilty or purpose of this command? Come to think, why wouldn't such a command be built-in to every Text Type anyway? -- Terry, East Grinstead, UK I think I've hijacked your thread. Sorry, Terry Clearly the problems I have when not using the Wait for Text Playback stem from a memory issue of some kind. When I add the command after the text, then I have no problems with gibberish (ran the Small Quantity 209 repeats without incident). I imagine it isn't built into the command because computer memory can handle quite a bit of text before getting confused, so unless you're doing something ridiculous like my tests, or typing out large volumes of text all at once, the wait is probably not necessary. However, since occasions will obviously arise where large volumes are being typed out, the Wait for Text command exists to facilitate those instances. Still doesn't explain the problem you are having, though. I am unable to duplicate it on my machine. I ENTERed down a bunch of lines in my Notepad, then set my cursor to the top and wrote this command (practically identical to your example). The Arrow Down executed once, and the macro was done. Text Type (Simulate Keystrokes): <ARROW DOWN> Wait for Text Playback Quote Link to comment Share on other sites More sharing options...
terrypin Posted January 28, 2009 Author Report Share Posted January 28, 2009 I think I've hijacked your thread. Sorry, Terry Yes - Kevin will be along in a minute to tell you off! But who knows, they might be related? Clearly the problems I have when not using the Wait for Text Playback stem from a memory issue of some kind. When I add the command after the text, then I have no problems with gibberish (ran the Small Quantity 209 repeats without incident). I imagine it isn't built into the command because computer memory can handle quite a bit of text before getting confused, so unless you're doing something ridiculous like my tests, or typing out large volumes of text all at once, the wait is probably not necessary. However, since occasions will obviously arise where large volumes are being typed out, the Wait for Text command exists to facilitate those instances. I eventually managed to reproduce your problem after progressively reducing the value in Options > Preferences > Playback > Delays > Delay after keystrokes in the Text Type command from my 2000 microsecs to the default of zero. Here's what the final part of my result looked like: Here is test number 12. And a small Quantity of Text. And a small Quantity of Text. And a small Quantity of Text. And a small Quantity of Text. And a small Quantity of Text. And a small Quantity of Text. And a small Quantity of Text. And a small Quantity of Text. And a small Quantity of Text. And a small Quantity of Text. And a small Quantity of Text. And a small Quantity of Text Done 12 Here is test number 13. And a small Quantity of Text. And a small Quantity o YTXUT ENAO TEMLU D UERLAA TF>IUYLSDL TEI OSTA ERE OE LAADL> D MALLN A >OT > XD D% Still doesn't explain the problem you are having, though. I am unable to duplicate it on my machine. I ENTERed down a bunch of lines in my Notepad, then set my cursor to the top and wrote this command (practically identical to your example). The Arrow Down executed once, and the macro was done. Text Type (Simulate Keystrokes): <ARROW DOWN> Wait for Text Playback Hmm, strange. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
floyd Posted January 28, 2009 Report Share Posted January 28, 2009 It is easy to unintentionally thread-jack posts especially in a programming forum. So okay ... stop it. Thank you. To answer the topic title, yes, Wait for Text Playback is very reliable. Although I do not have any direct knowledge of its implementation, I assume the intention is to simply halt the macro until the keyboard buffer returns NULL or is empty. Never had a problem with it. Ever. To the other, er, speculative comments. You are overrunning the keyboard buffer. Macro Express can feed the keyboard buffer a gazillion times faster than the application you are typing to can extract the characters. So use Wait for Text Playback after sending a handful of data to the buffer OR use the Keystroke Speed command which sets a delay between each character fed into the buffer OR use both commands. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.