OOPS. I have my pst mixed up with what I was working on with Switch Control.
Should I delete my posts or use it as an example? What to do.
Edited: think I did that because both topics were in System Preferences.
OOPS. I have my pst mixed up with what I was working on with Switch Control.
Should I delete my posts or use it as an example? What to do.
Edited: think I did that because both topics were in System Preferences.
I changed the bundle identifier:
set bundle_id to "com.apple.speech.recognition.SpeakableItemsApp"
tell application "System Events"
try
set proc_id to id of first process whose bundle identifier is bundle_id
set is_running to true
on error
set is_running to false
end try
end tell
if is_running then
tell application id bundle_id to quit
else
tell application id bundle_id to launch
end if
It’s a good thing I wrote the script like that. Note that it takes a few seconds to update in System Preferences because it’s writing to file.
Edited: deleted “toggling doesn’t work” in the script which is wrong. ‘quit’ works with SpeakableItems.App.
gl,
kel
If anyone is interested, there is a helper app “universalaccessd”. I remember this when testing it earlier. For some reason, I couldn’t quit the app earlier, but now need to find how to do it.
kel1,
good looking out, works like a charm. thanks again!
This little script may help:
tell application "System Events"
tell process "System Preferences"
get entire contents of window 1
end tell
end tell
Have you actually tried reading through a result from a script like that…