AppleScript not found

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
miltstevens
Posts: 5
Joined: Sun Dec 13, 2020 5:43 pm

AppleScript not found

Post by miltstevens » Sun Dec 13, 2020 5:55 pm

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.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: AppleScript not found

Post by richmond62 » Sun Dec 13, 2020 6:00 pm

Try this:
-
Screenshot 2020-12-13 at 18.59.20.png
-
macOS 11.1

miltstevens
Posts: 5
Joined: Sun Dec 13, 2020 5:43 pm

Re: AppleScript not found

Post by miltstevens » Sun Dec 13, 2020 6:33 pm

Thanks for your quick reply.

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

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: AppleScript not found

Post by richmond62 » Sun Dec 13, 2020 6:47 pm

"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
Attachments
Silly Beeper.livecode.zip
Here's the stack.
(22.96 KiB) Downloaded 151 times

miltstevens
Posts: 5
Joined: Sun Dec 13, 2020 5:43 pm

Re: AppleScript not found

Post by miltstevens » Sun Dec 13, 2020 9:03 pm

Any "do" command "as AppleScript" results in "alternate language not found."

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: AppleScript not found

Post by dunbarx » Sun Dec 13, 2020 11:19 pm

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

miltstevens
Posts: 5
Joined: Sun Dec 13, 2020 5:43 pm

Re: AppleScript not found

Post by miltstevens » Wed Dec 16, 2020 6:07 am

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?

bobcole
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 135
Joined: Tue Feb 23, 2010 10:53 pm
Location: Saint Louis, Missouri USA

Re: AppleScript not found

Post by bobcole » Fri Dec 18, 2020 5:12 am

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 4453 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

miltstevens
Posts: 5
Joined: Sun Dec 13, 2020 5:43 pm

Re: AppleScript not found

Post by miltstevens » Sat Dec 19, 2020 2:16 am

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.

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: AppleScript not found

Post by thatkeith » Wed Dec 23, 2020 12:39 pm

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?
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Post Reply

Return to “Talking LiveCode”