I've been out in the shop playing with this. Weird. If I try scr.get... in a button and display the value in a wx box, it works fine.
I think something else is saving the jog rate in the ini file after the unload script? Is that possible? Here is the setup...
I set the jog rate to 55. After I exit, the file shows 35. However, if I get and save that same value under a different key name (Jog for instance), it save correctly every time. Weird.
--Save Jog Rate % to .ini
local valJogRate = scr.GetProperty("droJogRate", "Value")
local jogSTR = tostring(valJogRate)
mc.mcProfileWriteString(inst, "Preferences", "JogRate", jogSTR)
--the above doesn't work
--added by Tony 10AU21 - axis specific but tey are all the same rate
local cRate = mc.mcJogGetRate(inst, 1)
local cRateSTR = tostring(cRate)
mc.mcProfileWriteString(inst, "Preferences", "Jog", cRateSTR)
The second part works every time, but the first one doesn't.
Thanks,
Tony (dazed and confused at the moment)