Jump to content

Reading a Text line with embedded Variable?


Recommended Posts

Hello, I've tried this, but it doesn't work, it will either show everything as text that I read or nothing...

Is it possible to use the line you read as a variable?

global $VARIABLENAME = "john"

$TEXT = FileReadLine(@WorkingDir&"\TEST\testme.txt",1)

$NEW = $TEXT

MsgBox (0, "", $NEW , "0" , "")

AND then the line in the text file to read is this:

$VARIABLENAME

But I want to be able to include normal text in the lines also if possible like:

"Your package will arrive shortly," &$VARIABLENAME

Edited by ashley123
Link to comment
Share on other sites

global $NAME1 = "Ashley123"
$TEXT = FileReadLine(@ScriptDir&"\txt.txt",1); contains: "Your Answer is here, " & $Name1
$NEW = Execute($TEXT)
MsgBox (0, "", $TEXT & " ==> " & $NEW)

Edit: code tags

Edited by Spiff59
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...