if e == 1 then os.remove("A/CHDK/LOGS/LOG_2306.TXT") print("Log File Deleted") local fp = io.open("A/CHDK/DATA/LBS.CFG") local str = fp:read("*all") fp:close() temp = string.sub(str, 1, 1) local con_fig = "A/CHDK/DATA/LBS."..temp fp = io.open (con_fig,"r") if fp == nil then return else str = fp:read("*all") fp:close() str = string.gsub(str,"#e=1","#e=0") fp = io.open (con_fig,"w") fp:write(str) fp:close() return -- exit script endend
if e == 1 then local fp = io.open("A/CHDK/DATA/LBS.CFG") local str = fp:read("*all") fp:close() temp = string.sub(str, 1, 1) local con_fig = "A/CHDK/DATA/LBS."..temp fp = io.open (con_fig,"r") if fp == nil then print("No ConFig file found") return else str = fp:read("*all") fp:close() if string.find(str,"e=0") == nil then str = string.gsub(str,"#e=1","#e=0") fp = io.open (con_fig,"w") fp:write(str) fp:close() os.remove("A/CHDK/LOGS/LOG_2306.TXT") print("Log File Deleted") return -- exit script end endend
The issue is that this doesn't update the script details in CHDK, ie those in memory I guess. Thus when I go into the CHDK menu and into the Script sub menu, the script values I see are the 'old' values, ie not the updated config ones :-( I wonder if you have any ideas? For example, allowing a script to 'force' CHDK to do a config refresh?
OK: 'problem' has gone away for me as I worked out a palliative approach.
My palliative approach seems to work,
CHDK doesn’t update the script config file at the end of the script or at camera turn off.
That's correct AFAIK - script parameter values are only updated to the config file in response to changes made in the CHDK Menu.
My palliative approach seems to work, which leads me to conclude that CHDK doesn’t update the script config file at the end of the script or at camera turn off.
Started by kwf General Discussion and Assistance
Started by kmboise Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes)
Started by adapter9 General Help and Assistance on using CHDK stable releases
Started by waterwingz « 1 2 ... 60 61 » General Discussion and Assistance
Started by Sdack « 1 2 3 » General Discussion and Assistance