vquest Posted September 9, 2023 Share Posted September 9, 2023 Hi, I'm trying to understand the script filter object. Looking at the script filter in the SnippetsLab Search workflow they don't actually have the script in the filter text field. There is this line: ./SnippetsLabAlfredWorkflow --action=search --query="{query}" I'm wondering what's going on here. I assume the script filter code is embedded into the SLAlfredWorkflow executable. How is that executable made? Link to comment
Stephen_C Posted September 10, 2023 Share Posted September 10, 2023 6 hours ago, vquest said: ./SnippetsLabAlfredWorkflow If you right click on the workflow name in Alfred Preferences and select Open in Finder you'll find the script in the workflow folder. See, for example, the Alfred help page on the Run Script Action under the heading External Scripts. Stephen Link to comment
vquest Posted September 10, 2023 Author Share Posted September 10, 2023 7 minutes ago, Stephen_C said: you'll find the script in the workflow folder. Thanks, but there is no script. There is the SnippetsLabAlfredWorkflow executable. I'm assuming that any user made scripts have been embedded into that? Link to comment
Stephen_C Posted September 10, 2023 Share Posted September 10, 2023 1 minute ago, vquest said: I'm assuming that any user made scripts have been embedded into that? Yes, that's certainly possible. Stephen Link to comment
vquest Posted September 10, 2023 Author Share Posted September 10, 2023 29 minutes ago, Stephen_C said: Yes, that's certainly possible. Stephen I think I'm beginning to understand it. The ./SLAW --flag is a script. It points to the executable in the workflow directory. That's about all I understand though. Link to comment
Stephen_C Posted September 10, 2023 Share Posted September 10, 2023 Yes, that's right: see, for example, this post from Alfred's developer. Stephen vquest 1 Link to comment
vquest Posted September 10, 2023 Author Share Posted September 10, 2023 15 minutes ago, Stephen_C said: Yes, that's right: see, for example, this post from Alfred's developer. The executable interests me. How is that created? It doesn't exist for any other workflow that I have installed. Is it created the author of the workflow, or is it generated by Alfred? Link to comment
Stephen_C Posted September 10, 2023 Share Posted September 10, 2023 2 minutes ago, vquest said: Is it created the author of the workflow, or is it generated by Alfred? The author of the workflow will have created it. What you're seeing is typical of the more complex (i.e. sophisticated!) workflows. Stephen Link to comment
vquest Posted September 10, 2023 Author Share Posted September 10, 2023 1 minute ago, Stephen_C said: The author of the workflow will have created it. What you're seeing is typical of the more complex (i.e. sophisticated!) workflows. Stephen So they write a bash or zsh script, or perhaps python or something else, and turn it into an executable independent of Alfred? Link to comment
Stephen_C Posted September 10, 2023 Share Posted September 10, 2023 It will be an executable script created by the author of the workflow (in whatever scripting language he or she may be using) which Alfred will execute as part of the relevant workflow. Stephen Link to comment
vquest Posted September 10, 2023 Author Share Posted September 10, 2023 1 minute ago, Stephen_C said: It will be an executable script created by the author of the workflow (in whatever scripting language he or she may be using) which Alfred will execute as part of the relevant workflow. Thanks. Link to comment
vitor Posted September 10, 2023 Share Posted September 10, 2023 That one is not a script, but a compiled executable. Probably written in Objective-C or Swift. The difference is mostly technical. Everything @Stephen_C explained still applies. Link to comment
vquest Posted September 11, 2023 Author Share Posted September 11, 2023 17 hours ago, vitor said: That one is not a script, but a compiled executable. Probably written in Objective-C or Swift. The difference is mostly technical. Everything @Stephen_C explained still applies. I guess it would be compiled as a command line app? I'm familiar with Swift but I have never built a CLI app. 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