Laterral Posted August 15 Share Posted August 15 Thanks for your help with this!! When I type aa, I want to see: Current session: [timeremaining which can be queried via AppleScript via tell application "Amphetamine" to set timeRemaining to session time remaining] Keep awake for 1 hour Keep awake for 3 hours When I start typing the argument, I want to see: Keep awake for [argument] hours Instead, I'm seeing the following (and also that's my AppleScript in the same screenshot below). How might I fix this? Link to comment
Stephen_C Posted August 15 Share Posted August 15 Two ideas immediately come to mind: Use a different keyword. Alternatively, use the Ignore in Alfred workflow from the Alfred Gallery to ignore those Scrivener folders when searching in Alfred. Stephen Link to comment
Laterral Posted August 15 Author Share Posted August 15 hi @Stephen_C - my point is less about hiding those results. I want the lines I wrote about displayed (which I don't know how to do in the AppleScript to have them as rows/ suggestions). See the body of my post. Link to comment
Stephen_C Posted August 15 Share Posted August 15 Ah—sorry for the misunderstanding. You're talking about using a Script Filter Input and, although I've wrestled with them from time to time, I'm not sure my experience matches your requirements! 😀 Don't despair, someone with more knowledge than me will be along to assist, I'm sure. Stephen Link to comment
vitor Posted August 15 Share Posted August 15 Having three lines is simple, you could have three Keyword Inputs all using the same keyword or one List Filter Input. But since you want one result to be dynamic, what you indeed need is the Script Filter Input and return the required JSON. In your case you may even need only to care about returning the title. Your first step should be replacing that AppleScript with the equivalent JavaScript for Automation, since AppleScript has poor support for outputting JSON. 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