Acidham Posted April 9, 2018 Share Posted April 9, 2018 I am using run script in workflow steps. Is there a way to tell the external applescript to write to Alfred's debugger console ? Link to comment
deanishe Posted April 9, 2018 Share Posted April 9, 2018 With log, e.g. log "user query is " & theQuery Link to comment
Acidham Posted April 9, 2018 Author Share Posted April 9, 2018 That was my expectation as well but nothing is showing up in Alfred Debugger Console. Let me be more specific: I am using following AS in a script filter: run script "my.scpt" with parameters "{query}" my.scpt contains a log output: log "Hello world" When i run the script filter "Hello world" is not showing up in Script Debugger Console. Link to comment
deanishe Posted April 9, 2018 Share Posted April 9, 2018 The problem isn't with my.scpt, it's that you're running your script from another AppleScript with run script. run script captures and returns the output of the script you run: log run script "my.scpt" with parameters "{query}" Link to comment
Acidham Posted April 9, 2018 Author Share Posted April 9, 2018 my.scpt in my example returns script filter output and in between I am using log to output eg. a path. Means I cannot combine log from my.scpt with script filter output. Is there any other way to get log output into Alfred Debugger Console or maybe console.log? Link to comment
deanishe Posted April 9, 2018 Share Posted April 9, 2018 1 minute ago, Acidham said: Is there any other way to get log output into Alfred Debugger Console or maybe console.log? Not in native AppleScript, I believe. I think you'll either have to use something like NSTask or use a different language that doesn't fiddle with subprocesses' STDERR. Link to comment
Acidham Posted April 9, 2018 Author Share Posted April 9, 2018 I found a solution. Log can be implemented with: do shell script "logger -t 'AS DEBUG' " & myObj Before executing the script just open console log and search for logger. Link to comment
sudopeople Posted May 27, 2022 Share Posted May 27, 2022 On 4/9/2018 at 2:46 AM, Acidham said: I found a solution. Log can be implemented with: do shell script "logger -t 'AS DEBUG' " & myObj Before executing the script just open console log and search for logger. Thanks very much. Works perfectly. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now