renforter Posted April 3, 2021 Posted April 3, 2021 In addition to entering dynamic content into scripts it would be much more useful to be able to enter them on the fly. For example I need to create a date 1 year, 2 months and 1 day in the future on the fly I can do that. No need to create and save a script.
deanishe Posted April 3, 2021 Posted April 3, 2021 Could you explain more precisely what you mean, please? What do you want to enter where?
renforter Posted April 3, 2021 Author Posted April 3, 2021 (edited) After I hit the hot-key to open the Alfred command prompt, I want to be able to enter dynamic content scripts there. I hope I am using the right terminology for this. So for example, I am working in a word processor document and I want to enter a calculated date in the future: I hit the Alfred hot-key and I enter {date:long +2y +3M +1d:EEEE} at the prompt, and the calculated date is placed in the document. No need to place it in a script. Edited April 3, 2021 by renforter
sudopeople Posted April 9, 2021 Posted April 9, 2021 On 4/2/2021 at 10:38 PM, renforter said: No need to place it in a script. Are you saying you don't want to create a workflow? Create a workflow, lol.
renforter Posted April 9, 2021 Author Posted April 9, 2021 I havent had the time or energy to dig into workflow. In a workflow you can enter any ad hoc dynamic value?
deanishe Posted April 9, 2021 Posted April 9, 2021 This workflow can insert arbitrary dates like "3 days from now".
renforter Posted April 9, 2021 Author Posted April 9, 2021 Thanks! Need to bare down and learn workflows. Nice to have this very useful example. It answers my immediate need. Is learning python a necessity? Are other languages used for workflows? Would Apple Script work too?
deanishe Posted April 9, 2021 Posted April 9, 2021 Alfred doesn't care which language a workflow is written in, but the language has to support certain features to be suitable for writing workflows. AppleScript is a poor choice because it doesn't support JSON. A general-purpose language, like Python or Ruby, is a much better choice because you can do more or less anything relatively easily.
renforter Posted April 9, 2021 Author Posted April 9, 2021 How about Visual Foxpro? Just kidding. That is what I was working in when I quit the programmer world. A great language but it didnt fit with MS business model that promoted the crappy Access on everyone's desktop instead. What Python framework do you use? Thanks for your help.
deanishe Posted April 10, 2021 Posted April 10, 2021 (edited) 8 hours ago, renforter said: What Python framework do you use? The one linked in my sig, but you don't need a framework any more. Alfred used to use XML, not JSON, which was a lot more complicated to do. Edited April 10, 2021 by deanishe
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