Jump to content
Macro Express Forums

Spurious Character When Pasting


terrypin
 Share

Recommended Posts

This apparently simple macro fails, and I'm darned if I can see why.

 

Clipboard Start Copy

Text Type: abc

Clipboard End Copy

Text Box Display: Message

 

The Text Type command uses the option 'Use Clipboard to Paste Text'. When I get the message, I paste manually with Ctl+v into anywhere convenient, such as my text editor. I think I should just get 'abc' pasted. But instead I get an extra unprintable character in front of the 'abc'. When I hover my text editor cursor near it, I see 'ETX (^C=3=0X3)', whatever that means!

 

Whether I use variables or constants I get same result. Anyone have any insights into why please?

 

For convenience, here's the code:

 

CODE

<BEGCLIP><TEXTTYPE:abc><ENDCLIP><TBOX4:T:4:CenterCenter000278000200:000:MessageThe clipboard should now contain 'abc'

After pasting that somewhere, click OK to continue>

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

I see your problem. I popped open my hex editor and the char is an “End of Text” (hex 03). Have no clue how it got there but I thought I would toss that out in case anyone else knew what it was about.

 

I have no solution to the strange character but I think it odd to use the clipboard this way. If it were me I would set my text to a string var and push that to the clipboard form the String Modify command.

 

<TVAR2:01:01:abc ><TMVAR2:16:01:00:000:000:>

 

More elegant IMHO.

Link to comment
Share on other sites

Great, thanks Cory, that method works fine.

 

I'd searched pretty thoroughly in the Clipboard commands category, but missed that one (and its converse) in the Variables section!

 

Your tip enabled me to successfully finish my macro. It converts my date format (used for photo filenames) like 20030618-123456 to 2 fields: 06/18/2003 and 12:34:56. That lets me enter date and time taken easily in a new photo-storage site I discovered today, Flickr, at http://www.flickr.com.

 

If anyone needs a similar conversion routine, let me know and I'll copy it here.

 

Still very curious as to why that other method doesn't work.

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

Yeah it's curious but given this was an odd way to accomplish something no one would ever know or care about it. To be honest I didn't even think it would be possible to get text into a clipboard in this manner! But it is fun to see strange little things like this in action and someday it may be of use.

 

I feel your pain on the front of hidden features. Often one can find a solution buried in another command section and sometimes the organization of the commands categories seem lacking but it's generally pretty good. It just takes time to become familiar with all the commands and their options.

 

What's worse are the tricks in command combinations. For instance if you need to pad an integer as text. I once wrote a mathematical routine so numerical file names would appear in order. Then one day I discovered that one could convert to text, pad left, then substitute zeros (or should I say Zed) for the spaces! Duh! 3 simple lines! I need to put more of these on my website for all. Seeing some of these combinations take chess master intelligence. Of course these forums help a lot!

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