applescript triggering in max


    hoowdie's icon
    hoowdie's icon
    Mar 19 2018 | 11:29 pm
    Dear all,
    I want to start the apple speech dictation tool out of max, so I can "write" in Max via audio. The research I've done hasn't gotten me very far, it seems that the easiest solution is triggering an applescript (which i already have) out of max via a shell command.
    I've got my hands on the external but can't get the script to start. Other commands like "start finder" work, so the object basically works, just the right command for triggering an applescript seem to miss. There are tutorials of the shell external doing this task, but I cant find this external anywhere, all the mirrors seem to be down?
    Would be really glad about any help / any hint in the right direction!
    best regards

    • Source Audio's icon
      Source Audio's icon
      Source Audio
      Mar 20 2018 | 7:27 am
      Here is shell download link :
      But You can also save applescript as application (untick startup screen and stay open) and start it with launchbrowser message : ------------------- ; max launchbrowser file:///"path to the app" --------------------
    • hoowdie's icon
      hoowdie's icon
      Mar 20 2018 | 8:58 am
      Thank you very much for your fast reply, will check both options! Thanks!
    • ŽIVA's icon
      ŽIVA's icon
      Jan 30 2023 | 11:09 pm
      Hiii I am reviving this thread just because I need a little bit more information on how to actually do this. Atm, I am playing with using MacOS dictation to populate textedit object within my patch - I've created an adjacent dictionary. Reason for doing this is to secure a more "airtight" interaction that will be triggered by specific words and hence, give me more control. Prior to this I was conditioning the outputs within the patch by setting up rules upon my voice input (for example, if the frequency is that and that and it doesn't go for more than 2seconds, then do this).
      I have encountered two questions while playing with this... 1) What would be the best/optimal way to run dictation as soon as the patch is opened ? I am no programmer, so just trying to get more info on how to actually do this :) 2) Is it possible that dictation + textedit has some bugs? It seems to exhibit some weird behaviour from time to time (like highlighting all the words sometimes, sometimes not which affects if the triggers below are triggered etc)?
    • Source Audio's icon
      Source Audio's icon
      Source Audio
      Jan 31 2023 | 8:57 am
      to auto-start dictation, I would let patch load completely, means let it initialise all it needs to run. Then activte dictation using Dictation shortcut set on your system, and short after that select textedit for typing. to execute keystrokes you can use shell with message to SystemEvents to keystroke, or maybe 11clicks external, javascript etc. To select textedit for editing send message set, select to it. for example:
      Question about textedit <-> dictation bugs .... No idea.I don't use dictation. Maybe it depends on what you set in textedit inspector message select selects all text (what you call highlight all)