-
Posts
7 -
Joined
-
Last visited
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by jierme
-
-
14 hours ago, vitor said:
Apps with AppleScript support have dictionaries. You can access them via the Script Editor app (File → Open Dictionary…) or the AppleScript Dictionaries Workflow. You can change the language on the top right.
For this case, it might be something like Application("Moom").listofSnapshots().Glad it’s sorted!
Thank you~ That's truly helpful.😆
-
Luckily, I found a workflow(alfred-things workflow) that has successfully converted a list into JSON FORMAT and used it in a Script Filter just within AppleScript.
That's part of his code:
on add_item given title:_title, subtitle:_sub, arg:_arg, valid:_valid set title to "{\"title\": \"" & _title & "\", " set subtitle to "\"subtitle\": \"" & _sub & "\", " set arg to "\"arg\": \"" & _arg & "\", " set valid to "\"valid\": " & _valid & "}, " set theItem to title & subtitle & arg & valid set end of my _items to theItem return my _items end add_item on to_json() set json to "{\"items\": [" & text 1 thru -3 of (my _items as text) & "]}" return json end to_json
I tried to adjust his code for my use, and I found it works!
-
13 hours ago, vitor said:
If it supports AppleScript, it should support JXA as well.
Thank you for your reply. I just began to learn AppleScript and JavaScript on my own. I found those AppleScript in the Document of Moom app, which does not mention JavaScript. How could I convert the AppleScript to JavaScript for a specific application?
-
On 3/10/2022 at 4:30 AM, Smpl said:
Thanks, this works pretty well! However it only lets me select one of the 'results' from the script filter list either by pressing enter on it or the ⌘{number} keyboard shortcuts or by arrowing down then pressing enter. I'm not able to like start typing the name of the playlist
Edit: Actually I think I got it; I checked "Alfred filters results" which seems to have fixed the not being able to type the playlist name. Not sure if that is the correct or only way to make that work.
Have you found a way to convert the output of AppleScript to JSON format?
Recently I wanted to write an Alfred Workflow to activate saved layouts (which were saved in the Moom app). The Moom app now only includes limited AppleScript support, and it does not support JavaScript.
I use the following commands to get a list of saved snapshots:
tell application "Moom" list of snapshots end tell --> {"Scapple ‧ Microsoft Edge", "Microsoft Edge ‧ Alfred Preferences"}
But I do not know how to convert this list into JSON FORMAT in AppleScript.
Have you found a way to convert the output of AppleScript to JSON format?
Or is there any method to deliver the list into the Script Filter in Alfred?
Browse Hook Bookmarks
in Share your Workflows
Posted
It works! Thanks a lot.😀