Jump to content

Pete31

Member
  • Content Count

    17
  • Joined

  • Last visited

  1. First off you didn't tell me anything new about AppleScript, I'm well aware. It's not meant disrespectful, however as a new (active) forum member I'm quite surprised how massive people here are trying to force something upon me which I repeatedly said I neither need nor plan to do in the near future. I'm regular on several forums and never experienced something like this. How clear do I have to say: I love AppleScript. I write almost every day. I don't want to learn any other language at this point, except AppleScriptObjC. Gentlemen that's really not how new
  2. I'm aware. I totally understand what you're telling me, however keep in mind that I'm writing my first workflow that does more than opening a URL in a new Safari window or initiating a DEVONthink search. Doesn't make sense to immediately start to learn another language just because I want one more "advanced" workflow (speaking as a bloody beginner). I can see how you and others repeatedly speak against AppleScript and it's definitely right to warn beginners so they don't get on the wrong track when they mainly want to write Alfred workflows. However I'm writing AppleScript for some years now,
  3. Well, if almost all you want to do is scripting apps then AppleScript is the way to go. Of course there's JavaScript but it happened that it's AppleScript for me and there simply wasn't a need for any other language. I also don't want to miss UI scripting when there's no other way. AppleScript does things you can't do with any other language (maybe JavaScript is capable of UI scripting too, don't know).
  4. Thank you very much for looking into this deanishe! No idea why I didn't try to do it in AppleScriptObjC. However I've found an even better way, no idea why I didn't think of this before, though. It's actually possible to use any string we want as a key in an AppleScript record, we just have to use pipes 🙂 set newRecord to {title:theQuery, arg:theQuery, variables:{scope:"", modifyScope:"false", modifyQueryWith:""} ¬ , mods:¬ {ctrl:{arg:theQuery, subtitle:"scope:", variables:{scope:"", modifyScope:"true", modifyQueryWith:""}} ¬ , alt:{arg:theQuery, subtitle:"Anführung
  5. Yeah I noticed that. It seems to be really hard to learn AppleScript if you already know any other language. I'm lucky as I started with AppleScript (and love it), now learning AppleScriptObjC and if I can't do something with it that I desperately want to do in Alfred then maybe I'll look into Python. However I don't think I'll do things I can't solve with AppleScript(ObjC).
  6. That sounds very good! One thing I especially like about AppleScriptObjC is that everything is crystal clear when you read code, it's self-explanatory (once you've found what's needed …)
  7. No library involved, just AppleScriptObjC. -- Read & Write Write JSON in AppleScriptObjC use AppleScript version "2.7" use scripting additions use framework "Foundation" property maxResults : 500 property theJSONPath : "/Users/USER/Desktop/demo.json" property theIconPath : "/Applications/DEVONthink 3.app/Contents/Resources/DEVONthink 3.icns/" property NSJSONWritingPrettyPrinted : a reference to 1 on run (argv) try set theQuery to (item 1 of argv) set newRecord to {title:theQuery, arg:theQuery, variables:{scope:"", modifyScope:"false", modifyQueryWith:""} ¬ , mods:¬
  8. Hi, it's not possible to set e.g. this mod ctrl+cmd as name in an AppleScript record. Would be awesome if Alfred could accept also e.g. ctrl_cmd.
  9. I'm learning AppleScriptObjC as it's the right language for what I'm doing outside of Alfred. Also started to collect info for other languages. I've read that AppleScript is not what people use for their workflows and found a post where you said PERL is also not used much. What would be the recommended language for someone who knows nothing except AppleScript?
  10. Hi, I create JSON from an AppleScript record via AppleScriptObjC. Names of single "mods" are no problem (e.g. "ctrl" ), but it's not possible to set "ctrl+cmd" as name in an AppleScript record. Tried "ctrlcmd" and "ctrl_cmd" but that's not what Alfred needs. Are there other ways to define ctrl+cmd that Alfred understands? Here's the record: set theQuery to "hello world" set newRecord to {title:theQuery, arg:theQuery ¬ , mods:¬ {ctrl:{arg:theQuery, subtitle:"scope:selection", variables:{cleanQuery:"false", modifyQueryWith:"scope:selection"}} ¬ , alt:{arg:theQ
  11. Never would have found this, thanks! However Alfred's history only remembers the last 20 queries globally, not for each workflow. That doesn't help much I'm afraid. Any pointers which action (List or Script Filter) to use? I probably could create JSON via AppleScriptObjC however I hope there's an easier way.
  12. Thanks. Should have added that I invoke the workflow via hotkey. Alfred's history doesn't remember these, or am I missing something?
  13. Hi, first off I'm a complete workflow newbie. I'm using a workflow to initiate a search in a new DEVONthink window. Quite often I want to redo a search after some time but DEVONthink's "recent searches" dropdown doesn't list searches that were initiated via AppleScript (and even if they were included I'd still want to use Alfred). What's the easiest way to save workflow queries to later get back to them when using the workflow with a modifier? I know I can use the "Append To File" action or write the query into a file via AppleScript, but I've no idea what format I shou
  14. There's a way to search workflows from a Time Machine Backup by name. It might seem like a lot of work but it's done in minutes. tl;dr: Replace the "plist" extension in a copied version of the "Alfred.alfredpreferences" Backup with "txt". Then search for whatever you recall from your lost workflows name. 1. Open your Time Machine Volume in Finder 2. Go to the desired Backup date 3. Go to file "Alfred.alfredpreferences" 4. Right click the file, then select "Show package contents" 5. Copy folder "workflows" 6. Paste the copied folder to your prefered
×
×
  • Create New...