applescript triggering in max
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 aka.shell 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
Hoowdie
Here is shell download link :
http://expr-i0.net/shell_170717.zip
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"
--------------------
Thank you very much for your fast reply, will check both options!
Thanks!
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)?
Thanks!
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)
hello, this is old but it's not working anymore, I guess Mac changed secutity or something ? When i type the code in terminal
osascript -e "tell application \"System Events\" to key code 63 & 63"
it's working, but not with shell. Any hint ? I gave Max permission for accessibility.
thanks !
this:
osascript -e "tell application \"System Events\" to key code 63 & 63"
is not this:
osascript -e 'tell application \"System Events\" to key code 63 & 63'
yes, it works, thanks