SavePix doesn't save a value from run to run of EasyUO, but only that instance. If you want your script to remember a value between times when you run a script, you must poke it back into a file somewhere or create a persistent variable for it ( * variable).
To quickly make a way to save/recall items from the registry (where persistent variables are stashed), I made these 2 little subs:
;------------------------------------------------------------
sub TM_GetPersistantVariable
set #RESULT %1 , _ , #CHARID
set #RESULT * . #RESULT
return #RESULT
;------------------------------------------------------------
sub TM_SetPersistantVariable
set #RESULT %1 , _ , #CHARID
set * . #RESULT %2
return
These subs use your own #CHARID as a reference pointer to help you locate the value after its been stored.
A script like my bandage script, I first save the values like this:
gosub TM_SetPersistantVariable TM_HEAL_BANDAGE !heal_bandage
gosub TM_SetPersistantVariable TM_HEAL_CHIVALRY !heal_chivalry
gosub TM_SetPersistantVariable TM_HEAL_MAGERY !heal_magery
gosub TM_SetPersistantVariable TM_HEAL_NECROMANCY !heal_necromancy
...
When I first start the script, I call the Get for each of these variables and assigned them as needed (display, variables, etc):
gosub TM_GetPersistantVariable TM_HEAL_BANDAGE
menu set EUOCheckBox1 #RESULT
gosub TM_GetPersistantVariable TM_HEAL_CHIVALRY
menu set EUOCheckBox3 #RESULT
gosub TM_GetPersistantVariable TM_HEAL_MAGERY
menu set EUOCheckBox2 #RESULT
gosub TM_GetPersistantVariable TM_HEAL_NECROMANCY
menu set EUOCheckBox4 #RESULT
...
Note you don't address the actually *var directly but you rely on the Get and Set subs for that so they can create the variable string for you.
EX. #CHARID = XXYYZZ1, Variable=MooseCount
Inside TM_SetPersistantVariable
set #RESULT %1 , _ , #CHARID ; #RESULT becomes "MooseCount_XXYYZZ1", this is the variable name used for this value in the registry
set * . #RESULT %2 ; used indirect reference "." to address *MooseCount_XXYYZZ1 and assignes whatever is in %2
return