Page 1 of 1

AppleScript not found

Posted: Sun Dec 13, 2020 5:55 pm
by miltstevens
I am getting a message of "alternate language not found" when I try to run AppleScript commands in LiveCode.

put alternateLanguages() returns:
applescript debugger (twice) & javascript

I'm using the latest stable version of LiveCode Community on a Mac running OS Catalina. AppleScript is on the machine and works elsewhere. And I'm pretty sure this wasn't a problem on this machine previously.

I'm stumped. Any thoughts on what's going on here. Thanks.

Re: AppleScript not found

Posted: Sun Dec 13, 2020 6:00 pm
by richmond62
Try this:
-
Screenshot 2020-12-13 at 18.59.20.png
-
macOS 11.1

Re: AppleScript not found

Posted: Sun Dec 13, 2020 6:33 pm
by miltstevens
Thanks for your quick reply.

"put the alternateLanguages" gets the same results: AppleScript debugger (2x) and javascript.

Re: AppleScript not found

Posted: Sun Dec 13, 2020 6:47 pm
by richmond62
"put the alternateLanguages" gets the same results
Very queer indeed.

How about running some AppleScript in LiveCode and seeing, despite that odd result, whether it will run.

Here's my very silly example:
-
Screenshot 2020-12-13 at 19.45.25.png

Re: AppleScript not found

Posted: Sun Dec 13, 2020 9:03 pm
by miltstevens
Any "do" command "as AppleScript" results in "alternate language not found."

Re: AppleScript not found

Posted: Sun Dec 13, 2020 11:19 pm
by dunbarx
Hi.

First, a line of code that LC understands would not run just like that in appleScript. The example, rewritten slightly;

Code: Select all

on mouseUp
   do fld 1 as applescript
   answer the result
end mouseUp
would give "Compiler error".

On my machine,

Code: Select all

answer the alternateLanguages
gives "AppleScript" and "JavaScript"

Not sure what "AppleScript Debugger" is, but someone will chime in.

Craig

Re: AppleScript not found

Posted: Wed Dec 16, 2020 6:07 am
by miltstevens
I'm still looking for help on this. Here are a few more clues.

If I sign in under a different account on the same Mac, AppleScript is found and works in LiveCode.

I've tried reinstalling LiveCode and removing the .plist from my preferences folder. Might there be any other way to start clean with LiveCode since the issue seems to be specific to this one account?

Re: AppleScript not found

Posted: Fri Dec 18, 2020 5:12 am
by bobcole
I don't know if this will help you find an answer to your question but here is something you might try.
In the Applications/Utilities folder there is a program called: Script Editor.app
After starting it, look at the Preferences menu.
In the General tab, the drop-down menu will show what languages are available.
Screen Shot 2020-12-17 at 9.55.12 PM.png
This should let you know what the System is seeing. Maybe the AppleScript language was copied/duplicated on your system.

Also, in the General tab, I checked the last two check boxes to set the Script Editor so it appears in Finder's menu bar, at the top right, with the Script symbol and it's own menu.
Screen Shot 2020-12-17 at 9.51.00 PM.png
Screen Shot 2020-12-17 at 9.51.00 PM.png (61.78 KiB) Viewed 5896 times
The Script menu is a handy way to access the Script Editor and various scripts.

Sorry if you already know this stuff.
Good luck tracking down the problem,
Bob

Re: AppleScript not found

Posted: Sat Dec 19, 2020 2:16 am
by miltstevens
For anyone who may experience this issue, removing Script Debugger from ~Library>Components seems to resolve the issue.

I do not know what caused the issue in the first place. And if I run AppleScript Debugger, the component will repopulate in that folder.

Re: AppleScript not found

Posted: Wed Dec 23, 2020 12:39 pm
by thatkeith
miltstevens wrote:
Sat Dec 19, 2020 2:16 am
if I run AppleScript Debugger, the component will repopulate in that folder.
Out of interest, does that cause the problem to raise its head again?