Posts: 5
Threads: 2
Joined: Jul 2017
I have a toolbar button on a window. The user will click this button whenever they need the macro to run and it is working smoothly as of now. I would like to create user option for this button. I want the user to be able to check a box and depending on their response, the macro will run slightly differently. They should only have to check a box the first time they run the macro and never again after. Does quick macros support this or any other type of user options that can send a parameter to my code?
Thank you!
Posts: 12,073
Threads: 140
Joined: Dec 2002
Difficult to add a checkbox directly on a toolbar. This example instead uses another button to show two options as a popup menu.
Toolbar
Toolbar79
;/siz0 28 49 /ssiz0 28 28 /set0 0x40D 0xFCFF
Macro :mac "Macro54926478"
Options :sub.Options * $qm$\controls.ico
#sub Options m
MenuPopup m
m.AddItems("1 Option x[]2 Option y")
int x y
rget x "x" "\Macro54926478"
if(x) m.CheckItems("1")
rget y "y" "\Macro54926478"
if(y) m.CheckItems("2")
sel m.Show
,case 1 rset !x "x" "\Macro54926478"
,case 2 rset !y "y" "\Macro54926478"
Macro
Macro54926478
int x y
rget x "x" "\Macro54926478"
rget y "y" "\Macro54926478"
out F"x={x} y={y}"
Posts: 5
Threads: 2
Joined: Jul 2017
Thank you very much.
Will these two options appear every time a user clicks the button, or will their previous answer be saved?
Posts: 12,073
Threads: 140
Joined: Dec 2002
Every time. Saved in registry.