Jump to content
Macro Express Forums

Recommended Posts

Posted

How can I insert a computed register name in a Text string? This question may not be clear in words. Let me use an example.

 

N2 contains the number of the D register that I wish to name in a Text string. When N2 = 20, the Text string should be "Abc...xyz %D20%".

When N2 = 34, the Text string should be "Abc...xyz %D34%".

 

I have tried various combinations of extra % characters and 'single' and "double" quotes. Nothing seems to work.

 

I must be missing something easy.

 

Thanks,

Les

Posted

Hello Les!

Variable Set Integer %N2% to 34
Variable Set String %T1% "Abc...xyz %D--%"
Replace "--" with "%N2%" in %T1%

<IVAR2:02:01:34><TVAR2:01:01:Abc...xyz %D--%><TMVAR2:21:01:00:000:000:--%N2%>

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