Here's a clue for myself from that page:
"Telling the application—using the actual name of the application as a string literal as it appears on the compiling machine—satisfies the compiler, letting it know where the target application's dictionary is located."
Maybe the answer would be to create an applescript string and run it from my applescript - but I'm not sure how to do his, and it sounds terrible..
Aha! This place actually helped me understand, I think. If I on my machine when working on this script am able to use terms from application and have that application's name in a string explicitly - when this script it compiled into a run-only application for the customer, it'll have saved the application's dictionary and applied it to the tell block which uses the variable. So this could mean that I can 'cement in' the 'terms' from my application whose name I know for sure, and make the user's computer use them for other applications whose names I may not know.
This is probably the answer - can anyone confirm?
The goal is to have this applescript work on user's Photoshop CC versions going forward, without being sure if they have a specific version installed.
global myPsName, myPsApp
tell application "System Events"
local appFiles, innerAppFiles, theFile
set appFiles to every folder in folder "Applications" whose name contains "Photoshop CC"
set innerAppFiles to every file in first item of appFiles whose name contains ".app"
set theFile to (first item of innerAppFiles)
set myPsName to name of theFile
using terms from application "Adobe Photoshop CC 2015.5"
tell application myPsName
--display alert ("HEY!")
end using terms from
1 person found this helpful
This can be simplified by working with the application ID (which does not change as often and erratic as the application name), as in
set myps to "com.adobe.Photoshop"
set applName to (get name of application id myps)
And then use the using terms from application command.
Excellent, combined with what I have learned about compilation vs runtime and "using terms from", I believe that's all there is to this question.