Jump to content
Macro Express Forums

Read Characters


vikingjames
 Share

Recommended Posts

This is what I am trying to do. I hope someone can help me.

 

I am trying to get the characters typed into a window but Ctrl+C (clipboard copy) does not work. I cannot copy the characters typed in and then bring it to my other window to input those characters.

 

I am asking Macro express to get 1 to 6 characters that will then be dropped into another window.

 

I type 1 to 6 characters in a window that I then want to take those characters typed in and then copy those,, hit enter in that window and then go enter them in another window. I then Activate that first window again. I have done the other steps but cannot figure out how to grab those characters and have Macro Express read them.

 

Please help.

Link to comment
Share on other sites

I have to enter the characters in that specific window. Then I must take the characters from there. Is there a way Macro Express can grab those characters I typed without Ctrl+C?

 

For example, if I typed XXYZ in that window

 

Is it possible for Macro to then start at the end of Z or at the beginning where the X is, then understand what character was typed and then copy that without having to use CTRL+C?

Link to comment
Share on other sites

vikingjames,

 

I've had good success in capturing text from a window by highlighting with the arrow keys, then copying to the clipboard.

 

You said you don't want to use CTRL-C. Are you able to use the Windows clipboard? That's the only way I know of to acquire the data. Here's what I do.

 

Assuming you know your cursor is somewhere in the line and you want to capture the next 1 character, try this:

 

Shift Key Down

Text Type: <ARROW RIGHT>

Shift Key Up

Clipboard Copy

 

If you wanted to capture a whole word, you'd add in the CTRL key, like this:

 

Control Key Down

Shift Key Down

Text Type: <ARROW RIGHT>

Shift Key Up

Control Key Up

Clipboard Copy

 

The above examples are hand-typed. Here are the equivalent cut-n-pasted representations right from the Macro Express scripting editor. You might be able to cut-n-paste from here to your ME scripting editor.

 

<SHIFTD><TEXTTYPE:<ARROW RIGHT>><SHIFTU><CLIPC>

 

<CTRLD><SHIFTD><TEXTTYPE:<ARROW RIGHT>><SHIFTU><CTRLU><CLIPC>

 

So far what we have are ways to collect some text and get it into the clipboard. To get it out of the clipboard into a text variable, do this:

 

Variable Set String %T1% from Clipboard

 

Here's the cut-n-paste representation:

 

<TVAR2:01:03:>

Link to comment
Share on other sites

  • 1 month later...

Viking, why not have your script pop up its own dialog box asking for the value to type in, then have the script type it into the said window?

 

You can do this via:

 

Variable Set String -> Prompt for value

 

That way, the text is saved to a variable and there is no need for cut-n-paste.

 

Lemming B)

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...
 Share

×
×
  • Create New...