Jump to content
Macro Express Forums

Insert delay/pause or other control into string


Recommended Posts

In my script to enter clipboard data into a COBOL app, I had to insert a delay in the keystroke speed in order to get the tab sequences correct. While it works fine on full speed in other apps, such as MS OneNote, the COBOL app is rather finicky. However, the 75ms delay is a bit obnoxious.

<VARIABLE SET TO ASCII CHAR Value="9" Destination="%Tab%"/>
<VARIABLE SET TO ASCII CHAR Value="8" Destination="%Backspace%"/>
<KEYSTROKE SPEED Delay="75"/>
<VARIABLE SET STRING Option="\x02" Destination="%AWBSTRING%" NoEmbeddedVars="FALSE"/>
<TEXT TYPE Action="0" Text="%AWBSTRING%"/>

 

Is there any means of inserting some sort of variable, such as the ASCII characters, or a control, or pause/delay, into the string that is being typed out? I assume because ME correctly interprets the variables, there would also be some way to encode other controls. I would think a pause, or "wait for" timing instruction, between the &tab& commands might solve the problem more effectively than the slowed down keystroke speed.

 

Here's the data that is pulled off the clipboard and set as the string variable:

COSU6340885010%tab%CHQFNGB20308336A%tab%%tab%%tab%20%tab%%tab%

Something like a %tab%%pause%%tab%, is what I suppose I'm looking for.

Link to comment
Share on other sites

Thank you for starting a new post.
I would break the Text Type command into several. Create a integer variable and insert that between each. Before or after the tabs.

Or you could loop the number of times and have a pointer you increment in the loop to the strings in yoru array. Type a string[1], tab, pause, Type a string[2], tab, pause, and so on. 

In addition it's sometimes better to use the clipboard paste option in Text Type. It depends on the application. In some it works great, others get upset. 

Link to comment
Share on other sites

Are there WinForm controls in the form? If you don't know open the Get Control command. With your form (program window) visible, click the Launch Utility button. Hover over the fields and see it they highlight. If they do, I highly recommend using the Windows Controls commands in MEP.

 

If not I had another thought. Are there any visual cues that could be used for timing? With controls we have the Wait For Control... commands, but we can also use other visual cues. Like sometimes a change of color on a progress indicator. Do you see anything different while it's busy and not accepting input?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...