Look_Up Posted December 19, 2013 Report Share Posted December 19, 2013 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 Quote Link to comment Share on other sites More sharing options...
Cory Posted December 19, 2013 Report Share Posted December 19, 2013 In Macro 1 you need to check the box "Make this variable availably to macros called by this macro" in the variable definition for content_variable. Quote Link to comment Share on other sites More sharing options...
Look_Up Posted December 19, 2013 Author Report Share Posted December 19, 2013 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 Quote Link to comment Share on other sites More sharing options...
Cory Posted December 20, 2013 Report Share Posted December 20, 2013 How come you mark your posts as best answer? Like giving yourself credit? ;-) Quote Link to comment Share on other sites More sharing options...
Look_Up Posted December 21, 2013 Author Report Share Posted December 21, 2013 Sure. You make so many good answers (and earn a huge fame) so this time the credits goes to me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.