DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

BarManager Reset but mantaining the assigned Scripts to F1-12 buttons

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

 

0 Kudos
Message 1 of 3
(854 Views)

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") 

 

Message 2 of 3
(812 Views)

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

0 Kudos
Message 3 of 3
(802 Views)