Storing variables

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Shin Noir
a ghoul
a ghoul
Posts: 90
Joined: Tue Aug 05, 2003 8:18 pm

Storing variables

Post by Shin Noir » Wed Aug 06, 2003 12:43 am

Question: How would I go abouts storing an external variable to access\modify during a later macro execution? (If it is possible)

Why?: I've been wanting to keep a record of the number of creatures I killed. I was hoping to be able to spit out some data (logfile or what not) in some readable format (I.E.: <raw mob name>|<# of kills>) into a binary text file and access it\do string manipulations to it through a macro later.

Hopeful answer: A simple /open <textfile> with some sort of $Get(line#) function to read each line and some $varstring=$split(line#, "|") abilities to make it a basic task.

Any help would be appreciated.

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Wed Aug 06, 2003 8:54 am

try $ini and /ini...

/ini <inifile> <section> <key> <data>
$ini(inifile[,section[,key]])

/ini writes to an ini file, $ini reads from it. note, if you do not include a path, /ini and $ini will read/write from ini files in your windows folder.