Jump to content

Apple script - Log not working?


Recommended Posts

Posted (edited)

I can't find any way to output anything from "Run NS Apple script" into debug console.

My script looks like this:

 2105039588_Screenshot2020-04-18at18_01_39.jpg.1fafcda51ebd502916dbcd2fa5fe344c.jpg

 

And when I run it, it doesn't output "Something" in the console. Console looks like this after I run the script:

540940576_Screenshot2020-04-18at18_02_45.thumb.jpg.c35afb7cf01380dd8a5032b521b00829.jpg

 

Here's how workflow looks like (very basic, just to test the console output):

1980778559_Screenshot2020-04-18at18_03_48.jpg.2e261b9009d378a3158c13bf2fbabded.jpg

 

My Alfred version is 3.8.6

Osx Catalina 10.15.3

 

 

Thanks!

 

Edited by chavlji
Posted

Don't use Run NSAppleScript (unless you have a good reason for doing so). Use a regular Run Script action with Language = /usr/bin/osascript (AS). It behaves much less weirdly.

Posted (edited)

Thank you! It works a bit better! But why is first log always printed out as an error?

 

750800088_Screenshot2020-04-19at10_25_04.jpg.73c1ab1f32c64309245012ce675a104a.jpg

 

Run script code looks like this:

1535695365_Screenshot2020-04-19at10_25_36.thumb.jpg.ac8f6900a2a68294311dc4847534c369.jpg

Edited by chavlji
Posted
8 hours ago, chavlji said:

But why is first log always printed out as an error?

 

Because older versions of Alfred always prefixed log messages with ERROR.

 

Also, all three messages are being printed as "errors": as far as Alfred is concerned they're all one single message with some newlines.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...