Jump to content
Macro Express Forums

Macro For Deleting Text Leaving First Letter


mattyman

Recommended Posts

Hi there

 

This is probably easy but I wonder if anyone can help.

 

In Macro express I need to be able to place my cursor in front of a word and then have a macro that deletes all of the text of that word leaving only the first letter intact.

 

So, for example I place my cursor in front of Patrick, activate macro and only P is left. I move onto another word Michael activate macro and only M is left and so on. I do not need a macro to navigate from word to word, I do that manually.

 

Thanks for any help

 

Matt

Link to comment
Share on other sites

Ah, simple. Do atext type to Shift+Ctrl+Right_Arrow to highlight the entire word. Then cut it to your clipboard and copy only the first letter to the variable. Then just paste it back. These are fun ones.

 

Text Type: <SHIFT><CONTROL><ARROW RIGHT><SHIFT><ARROW LEFT>
Clipboard Cut
Variable Set String %T1% from Clipboard
Variable Modify String: Copy Part of %T1% to %T1%
Variable Modify String: Save %T1% to Clipboard
Clipboard Paste

 

<TEXTTYPE:<SHIFT><CONTROL><ARROW RIGHT><SHIFT><ARROW LEFT>><CLIPT><TVAR2:01:03:><TMVAR2:10:01:01:001:001:><TMVAR2:16:01:00:000:000:><CLIPP>

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