There are people in Automation community who believe JavaScript could be more powerful and vanilla AppleScript.
The benefit to use a scriptable application we could do multiple actions with a simple select text + keyboard shortcuts.
If someone need the string from Boop... this AS Script will do it.
on performOpenPickerWithString(theString)
tell application "System Events" to tell application process "Boop"
set frontmost to true
key code 0 using {command down}
delay 0.1
key code 11 using {command down}
delay 0.1
keystroke theString
keystroke return
end tell
end performOpenPickerWithString
on stringToBoop(theString)
tell application "System Events" to tell application process "Boop"
-- set frontmost to true
tell window 1 to tell scroll area 1
set value of text area 1 to theString
end tell
end tell
end stringToBoop
on stringFromBoop()
tell application "System Events" to tell application process "Boop"
-- set frontmost to true
tell window 1 to tell scroll area 1
set theString to its value of text area 1
end tell
end tell
return theString as text
end stringFromBoop
set theString to quoted form of "hello world!"
stringToBoop(theString)
performOpenPickerWithString("add slashes")
set theString to stringFromBoop()
tell application "System Events"
activate
display dialog theString
end tell
There are people in Automation community who believe JavaScript could be more powerful and vanilla AppleScript. The benefit to use a scriptable application we could do multiple actions with a simple select text + keyboard shortcuts.
If someone need the string from Boop... this AS Script will do it.
on performOpenPickerWithString(theString) tell application "System Events" to tell application process "Boop" set frontmost to true key code 0 using {command down} delay 0.1 key code 11 using {command down} delay 0.1 keystroke theString keystroke return end tell end performOpenPickerWithString
on stringToBoop(theString) tell application "System Events" to tell application process "Boop" -- set frontmost to true tell window 1 to tell scroll area 1 set value of text area 1 to theString end tell end tell end stringToBoop
on stringFromBoop() tell application "System Events" to tell application process "Boop" -- set frontmost to true tell window 1 to tell scroll area 1 set theString to its value of text area 1 end tell end tell return theString as text end stringFromBoop
set theString to quoted form of "hello world!" stringToBoop(theString)
performOpenPickerWithString("add slashes")
set theString to stringFromBoop()
tell application "System Events" activate display dialog theString end tell