JimBol Posted May 15, 2021 Share Posted May 15, 2021 Dear, all, As recent Alfred convert, I am enthusiastically exploring the options. One thing I cannot find out is how to run a WORKFLOW for the following use case: I am using Foxtrot Personal Search intensively to work with ~1M documents. To start a search I use Alfred. However, currently, I only trigger an existing AppleScript I created through an Alfred hotkey to open a search in FoxTrot. As a result, when I press the hotkey, AppleScript opens a non-Alfred window to provide the search field, which is then passed to the app. The AppleScript is as follows: on alfred_script(q) set FS to display dialog "Search for?" default answer "" set query to text returned of FS tell application "FoxTrot Personal Search" search {query} end tell end alfred_script It would be great if I could use the default Alfred input window for this, but I don’t seem to be able to pass my search input to the app other than by using the AppleScript. Can anyone please help me with a sample workflow? Thank you! Link to comment
giovanni Posted May 15, 2021 Share Posted May 15, 2021 I can't test it with FoxTrot, but if you use a Run script (recommended over Run NSAppleScript) object, this below should achieve what you want. on run argv tell application "FoxTrot Personal Search" to search for (first item of argv) end run deanishe 1 Link to comment
JimBol Posted May 16, 2021 Author Share Posted May 16, 2021 (edited) Hi Giovanni, Thank you and I tried it immediately. It opens the app but with a blank search field, no search results on the keyword :-(. I think the missing link is to capture and pass the input to the script/FoxTrot. Here’s the workflow I have - can you see / tell me what I do wrong? 1. OVERVIEW 2. INPUT KEYWORD 3. SCRIPT Thank you! Edited May 16, 2021 by JimBol Link to comment
giovanni Posted May 16, 2021 Share Posted May 16, 2021 have you checked the debugger? What does it say? I noticed you had `search {query}`, have you tried without `for`? JimBol 1 Link to comment
JimBol Posted May 16, 2021 Author Share Posted May 16, 2021 Ha! Indeed, that was it: ‘for” had to be removed and it’s working. Issue closed. Thank you very much! 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