Is it possible for me to grab a variable value from a text file? I have macros that send emails which I have compiled into .exes. The problem is that I have to recompile the macros every time somebody asks to be added or removed from the distribution. If I could just get these values from a text file I wouldn't have to recompile.
Thanks in Advance,
Josh
Read Variable from Text File?
Moderators: Dorian (MJT support), JRL
Read Variable from Text File?
Thanks,
Josh
Josh
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Use an INI file. Use the ReadIniFile command.
Or for a simple text file use ReadLn.
Or for a simple text file use ReadLn.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
You could set up an INI file then use the ReadIniFile> function. the Ini file might look something like:
You would loop through looking at the recips until you run into the one labeled stop.
Code: Select all
[recipients]
[email protected]
[email protected]
[email protected]
recip4=stop
-
- Pro Scripter
- Posts: 50
- Joined: Fri Mar 23, 2007 10:14 am
JRL...How would I loop through the file with the recip's being 1 - 4?.JRL wrote:You could set up an INI file then use the ReadIniFile> function. the Ini file might look something like:
You would loop through looking at the recips until you run into the one labeled stop.Code: Select all
[recipients] [email protected] [email protected] [email protected] recip4=stop
Thx,
John
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Code: Select all
Let>n=1
Label>starthere
ReadIniFile>c:\temp\mail.ini,recipients,recip%n%,recip
If>recip=stop,finish
MDL>recip
Let>n=n+1
GoTo>starthere
Label>finish
MDL>It's over!
-
- Pro Scripter
- Posts: 50
- Joined: Fri Mar 23, 2007 10:14 am