The standard DOpus menu includes two buttons:
Toggle Hidden Files:
Set GLOBALHIDEHIDDEN=Toggle INVERT
Toggle System Files:
Set HIDESYSTEMFILES=Toggle INVERT
How do I reference each button's state in a script?
The standard DOpus menu includes two buttons:
Toggle Hidden Files:
Set GLOBALHIDEHIDDEN=Toggle INVERT
Toggle System Files:
Set HIDESYSTEMFILES=Toggle INVERT
How do I reference each button's state in a script?
Use Command.IsSet: https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Scripting/Command.htm
I tried both of the following:
if (cmd.IsSet("GLOBALHIDEHIDDEN"))
{
hideHiddenFlag = "ON"
} else
{
hideHiddenFlag = "OFF"
}
and...
if (cmd.IsSet("GLOBALHIDEHIDDEN=true"))
{
hideHiddenFlag = "ON"
} else
{
hideHiddenFlag = "OFF"
}
Both instances return "OFF"
What, specifically, is missing to identify the toggled state?
Use the same command/arguments for the test as in the actual command you'd use on the toolbar.
e.g. cmd.IsSet("HIDESYSTEMFILES=Toggle INVERT")
(The INVERT can be omitted of course, if you reverse your script logic.)
Thanks Leo!