Jump to content

jierme

Member
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jierme's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. It works! Thanks a lot.😀
  2. 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!
  3. 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?
  4. 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?
×
×
  • Create New...