Jump to content
Macro Express Forums

Difficulty With Running Macro In Variable


randallc
 Share

Recommended Posts

Randall,

 

A couple of quick guesses and a hint:

 

You do not need or want a CRLF between macro commands.

 

The \n is equivalant to CRLF. By using \r\n you are in effect doing CRCRLF.

 

The hint is to write your macro in the script editor the way you want it to appear. Export to a playable (.mxe) macro. Edit the playable macro and it contains what you need. You will, however, need to insert \n (CRLF) and \s (Separator char)characters where appropriate.

Link to comment
Share on other sites

Thanks Kevin,

 

I did not realize the \n was enough!

 

I have not solved the problem yet! Are you able to do this with Text boxes and Multiple choice menus?

 

I am not.. trying to add CRLF except where they already appear in these macros in these boxes (ie not.. "between" macro lines" as you say..); there must be some other way to handle them than \n, or it is not possible?

 

Thanks, Randall

Link to comment
Share on other sites

Randall:

 

Oops! I was mistaken: \n is the Line Feed not CRLF. And I wrote that part of the code and the help topic that goes with it. You would think I would remember correctly. My memory must be going. Sorry.

 

Please let us know what the problem was when you get this to work. Did it have something to do with the separator (\s) characters?

 

Joe: Thanks for posting the example without pointing out my mistake.

Link to comment
Share on other sites

thanks,.

 

Yes, Kevin, the "\s" is pesky!

 

Because of the paragraph marks in those text boxes, I could not put the whole macro line in a string to edit out the CRLFs.

 

I was trying to do that first in Word, but that seemed to randomly lose some of the CHR(1) ("\s"?), and I didn't realize at first.

 

I think I was also having trouble with the %N99% in the field for date setting "days before" and had to add some "000000" to it.

 

Here is my current macro to try to put, from the clipboard, a copied macro line into a string; what do you think? Has someone got something better worked out?

 

There will always be some direct editing, no doubt, but at least this gets it in a string ready to look at!

 

Best, Randall

MacroRunStringMaker.mxe

Link to comment
Share on other sites

Randall,

 

I'm glad it is working out. I looked at your macro and it looks fine.

 

I was trying to do that first in Word, but ...
Yes, it is important to use a text editor, not a word processor. Notepad works fine.

 

... I was also having trouble with the %N99% in the field for date setting "days before" and had to add some "000000" to it.
It surprises me that this is necessary. What does the original macro command look like?
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...