Jump to content
Macro Express Forums

Write variable to text file?


randallf

Recommended Posts

Hello!

 

Does anyone know if it's possible to write the data from a variable into a text file to then use with text file process, or do I have to open notepad/paste/save?

 

I want to do something like,

 

Clipboard copy

Set string from clipboard

Write string to text file

Process entries from text file one by one

 

Thanks!

Link to comment
Share on other sites

Hello!

 

Does anyone know if it's possible to write the data from a variable into a text file to then use with text file process, or do I have to open notepad/paste/save?

 

I want to do something like,

 

Clipboard copy

Set string from clipboard

Write string to text file

Process entries from text file one by one

 

Thanks!

Variable Modify String > Tab: Option 2 > Save to Text File

 

Or you could just skip setting the string from the clipboard and use the Clipboard Save Text command to save the info directly to a text file.

Link to comment
Share on other sites

Variable Modify String > Tab: Option 2 > Save to Text File

 

Or you could just skip setting the string from the clipboard and use the Clipboard Save Text command to save the info directly to a text file.

 

Awesome! THANK YOU! I am now stuck here:

 

<BTFBEG:001:000001:000000:c:\lister.txt><IFVAR2:1:01:2:><TBOX4:T:1:CenterCenter000278000200:000:testerT1: %T1%
T2: %T2%><ENDIF><BTFEND>

 

Text File Begin Process: "lister.txt"

If Variable %T1% <> ""

Text Box Display: tester

End If

Text File End Process

 

I am trying to get it to not process T1 when it is blank, to just skip it and go to the next line as (unavoidably) the source data that the macro copies contains CR's or blank lines. See what I'm getting at? I can't just declare it up front because it changes each time (i.e. data is written by the text file process into T1 so setting it up front doesn't help and setting it within the loop to a null "1" value will just leave it at that value if set within the loop because the start of the loop process is what sets T1!!!) and setting the variable within the text file process doesn't work. :(

 

H4lp!!

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