EditIniFile> Tip

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
melb.robmac
Newbie
Posts: 12
Joined: Tue Jun 17, 2008 12:12 am
Location: Melbourne Australia
Contact:

EditIniFile> Tip

Post by melb.robmac » Fri Oct 17, 2008 1:27 am

A tip that I learned today ...
When you are writing a variable to an INI file using the EditIniFile> command -
DO NOT make the variable in the script the same as the Entry Name in the INI File.
Rob
Melbourne, Australia

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Fri Oct 17, 2008 4:14 pm

Hi melb.robmac,

Thanks for the tip... but what happens if you do?

Can you provide an example?
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Oct 17, 2008 4:58 pm

jpuziano wrote:Hi melb.robmac,

Thanks for the tip... but what happens if you do?

Can you provide an example?
If the entry name is NAME and you have a variable called NAME and you set that variable to FRED and use NAME in the EditIniFile for the entry name you will actually be looking for an entry name called FRED which is not what you are looking for.

Using VAREXPLICIT will prevent issues like this. Read the section VAREXPLICIT in the help file.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts