I am using Vectorworks and I need to check if a palette is activated, specifically and initially (till I get my head round this issue) I need to know if far right palette "Obj Info" is displayed or not.
Any ideas as to how I can do this? Had a brief look at UI Browser but not sure if this will work. Find image is too hit and miss for this.
Or maybe test for enabled under palettes menu?

Suggestions advice much appreciated.
Michael
Are there any menu options that exist only when Object Info is enabled?
Apart from Menu item “Object Info” being ticked that’s about it.
The palette can be in a number of different initial states so once palette is showing I will still have to test for initial conditions.
You should be able to use a If Then Else action (KM Wiki) with a Menu condition (KM Wiki) for a path of "Window>Palettes>Object Info" is enabled.

KM is showing condition as false with Object Info enabled or not. Checked spellings.
In both instances "Display text" is run.
Been watching Dans' vid of UI Browser and got this far
activate application "Vectorworks 2017"
tell application "System Events"
tell process "Vectorworks 2017"
get value of attribute "AXMenuItemMarkChar" of menu item "Object Info" of menu 1 of menu item "Palettes" of menu 1 of menu bar item "Window" of menu bar 1
end tell
end tell
and Result is "✓" if Obj Info palette is enabled else "missing value" so I reckon I can use this as a test and continue from there. Fingers crossed.
Thanks Dan and Chris - helped me a lot.
m
Runs fine from AS but running from KM am getting this even though deleting > activate application "Vectorworks 2017" as Vectorworks is front application.
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist.
missing value
Any ideas?
m
Try using is marked
instead:

It is helpful to indicate how you sorted it out for future readers of the thread.
True Peter.
The problem was how to test if a palette was enabled or not. By using "is not marked" option - voila the test worked.

Yhe rest of macro was just finding and clicking images.
Thanks
Michael
Hey Michael,
Yep — first throw away that defunct osax file and restart the Script Editor and the KM engine.
Run this and see if your palettes are listed.
tell application "System Events"
tell application process "Vectorworks 2017"
set frontmost to true
set winNameList to name of windows
end tell
end tell
-Chris