Jump to content
Macro Express Forums

global variable, join string


Recommended Posts

Macro 1

<VARIABLE SET STRING Option="\x00" Destination="%content_variable[4]%" Value="This is what i want to write." NoEmbeddedVars="FALSE"/>
<MACRO RUN Use_ID="FALSE" Name="Macro 2" ID="-1" Wait="TRUE"/>

Macro 2

<VARIABLE SET STRING Option="\x00" Destination="%content_variable[1]%" Value=" [ " NoEmbeddedVars="FALSE"/>
<DELAY Flags="\x03" Time="300"/>
<DATE/TIME Format="dd.MM.yyyy hh:mm" Flags="\xB0" Date="19.12.2013 12:19:01" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%content_variable[2]%" IsDateVar="FALSE"/>
<DELAY Flags="\x03" Time="300"/>
<VARIABLE SET STRING Option="\x00" Destination="%content_variable[3]%" Value=" ] " NoEmbeddedVars="FALSE"/>
<DELAY Flags="\x03" Time="300"/>
<COMMENT Value="Here should stay the content from Macro 1"/>
<DELAY Flags="\x03" Time="300"/>
<JOIN STRING Source="%content_variable%" StartIndex="1" EndIndex="4" Destination="%content_variable[5]%" _COMMENT="join string from 1 to 4 in array %content_variable[5]%"/>
<DELAY Flags="\x03" Time="300"/>
<VARIABLE MODIFY STRING Option="\x12" Destination="%content_variable[5]%" Filename="C:\\Users\\Besitzer\\Desktop\\Logfile.txt" Strip="TRUE" NoEmbeddedVars="FALSE"/>

I want to use %content_variable[4]% (Global Variable) in Macro 2 so that all content from Macro 1 and Macro 2 comes together, "join" the string, and write it into a textfile.

 

The problem is: Macro 2 (not Global Variable) do not take the content from Macro 1 and join the string. (content from Macro 2 is taken) OR

 

Content from Macro 1 is taken (Macro 2 Variable Global), but do not take the content from Macro 2.

 

How can i fix this?

 

Look_Up

Macro 1.mex

Macro 2.mex

Link to comment
Share on other sites

curious! This morning I tested both macros with "global variable" (Make this variable availably to macros called by this macro, Macro 1+Macro 2) Doesn't work. Now, it works O_o

 

Thanks Cory. Problem solved.

 


Solution: "Make this variable availably to macros called by this macro" in Macro 1 AND Macro 2

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