I’ve simplified my problem down to a test: my button calls a function in the Script Library
print "Button pressed."
window = system.gui.getWindow('Overview')
print "Failed to get window."
The console reports
Failed to get window.
The Overview window exists in the default project location. The window is open (and the button is on it).
What am I missing? Do I need to import anything else?
system.gui.getOpenedWindows() - are you sure there isn’t a trailing space or folder or something else?
Does “Overview” exist in a folder? getWindow is expecting a path to the window. If you have a window called Overview, you can right click it and choose copy path and paste that into the script.
Thank you both. SY is correct. I was missing the path to the window. The correct syntax is
I had read extensively through the documentation and didn’t find an example of this. All refer to “Overview”.
The Copy Path will be a useful trick.