04-20-2023 08:31 AM
Hello,
with the command "Call BarManager.Reset" is possible to reset all the bar, to the default status. The problem i have, is that i want to restore all bars, excecpt the assigned Scripts to F1-F12 buttons.
My idea was to save the path of the scripts assigned to F1-F12 before making the general reset ""Call BarManager.Reset". And afterward to load them again with next command for example for button F2:
BarManager.Bars.Item("SCRDIAdemScriptsFunc").UsedActionObjs.Item(2).OnClickCode.Code = "Call MsgBoxDisp(""Hello"")"
But Diadem, says to me "The executable code can not be changed".
Do you have any idea?
thank you very much
04-24-2023 04:19 AM
Hi,
I used a different command to set a new script to one of the function buttons (F2) after resetting the BarManager:
Call BarManager.Reset
Call GlobalFnScriptSet(2, ScriptReadPath & "MyScript.vbs")
04-24-2023 06:35 AM
Hi ColinF !!
thanks a lot. It works perfectly. 😍
I spent so much time trying it.. and you solve it just with a line : D
Thank you very much