Make new explorer window

I wrote a small script for Script Debugger in which I need to open a Result Explorer Window. I attempted to do this with the make command but without success. I finally resorted to GUI scripting but wondered if this could be avoided. Thanks.

tell application "System Events" to tell process "Script Debugger"
	click menu item "Show Result Explorer Window" of menu "Script" of menu bar 1
end tell

I spent some more time on this and found the answer in the Script Debugger dictionary under the heading value-object:

To create an explorer window, open the value. For example, you could tell a document to open last result, or tell an event log entry to open event result.

The script is:

tell application "Script Debugger"
	tell document 1 to open last result
end tell

If there is no last result then “empty” is shown in the explorer window, which is fine.

1 Like