Applescript support in PanoramaX


#1

PanoramaX currently is not AppleScript scriptable.

What are the plans to support AppleScript?


#2

If you’re trying to open a Dictionary in Panorama X via the ScriptEditor, Panorama X does not even show as a choice.

I’m not sure how much difference that ultimately makes, but Panorama X and AppleScript do work together already. I’ve got quite a few AppleScripts active and working just fine.


#3

Thanks, James. I will try it again.


#4

I think the two of you may be talking about two different things.

Panorama X has great support for invoking AppleScripts, in other words, using AppleScripts to control other programs from Panorama.

Panorama X currently has zero support for being scriptable, in other words, other applications cannot control Panorama X thru a script. That will probably change eventually, but it is on a very low priority track. When it does become scriptable, there will probably be only one verb, execute.


#5

My typical Panorama/AppleScript use model is like this:

tell application "Panorama"
	Open file (x.pan")
	Do Script "PanoramaProcedure"
            Do Script "QuitPanorama"
end tell

Would something like this be supported eventually?


#6

Yes, but you will most likely need to do it something like this:

tell application "PanoramaX"
    execute "openfile {x} call procedure quit"
end tell

#7

I can make that work assuming that something like this also would work:

tell application "PanoramaX"
execute "openfile {x} call procedure1"
execute "call procedure2"
execute "call procedure3"
execute "quit"
end tell

Thanks for your very quick responses.


#8

Yes, I think that probably that would work. I’m curious though, why does it make any difference?


#9

If you have the code to be executed in the .Initialize procedure of the file that opens you could have the Finder open the file (and Panorama if not already open) and then the file’s .Initialize procedure will execute the code and quit. You could use a script like this adjusted to your particulars:

tell application "Finder"
    open document file "x.pandb" of folder "Documents" of folder "guidoarnout" of 
        folder "Users" of startup disk
end tell 

The file’s .Initialize procedure would do the rest directly or call the other procedures including quitting Panorama when finished. Just a thought, don’t know if it fills the bill and it would work right now.