Thanks. I don't know if this will be helpful, but here is some more info. This script has always worked before:
tell application "System Events" to set myPath to path to me
tell script "getScriptName" to set scriptName to getScriptName(myPath)
Now, I get this:
The script that it is calling is this:
on getScriptName(myPath)
set scriptName to ""
try
tell application "System Events" to set scriptName to do shell script "rawName=" & quoted form of (get name of myPath) & "; printf '%s' \"${rawName%.*}\""
end try
if scriptName = "" then
set myPath to myPath as string
tell application "Finder"
try
set scriptName to name of file myPath as string
on error
set AppleScript's text item delimiters to ":"
set scriptName to text item -2 of myPath as string
if scriptName = "" then set scriptName to text item -2 of myPath as string
end try
set AppleScript's text item delimiters to "."
set scriptName to text item 1 of scriptName as string
set AppleScript's text item delimiters to ""
end tell
end if
return scriptName
end getScriptName
If I try to open the "getScriptName" script in the Finder, I get this message:
Fortunately, I have text copies of all of my scripts, so I can create a new script which works fine from the Script Editor. But if I save it and try to open the new script from the Finder, I get the same error message. And if I put a copy in the Script Libraries folder, the new copy can't be accessed from the other script.
I'll try upgrading to 14.7. Thanks again.