You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see Slack coming up and executing the / but at some point it fails with the following Slackbot message:
/statusworking is not a valid command. In Slack, all messages that start with the "/" character are interpreted as commands.
If you are trying to send a message and not run a command, try preceding the "/" with an empty space.
For people having the same issue, instead of using the slack applescript library, I wrote an AppleScript that performs mostly what this library is trying to perform. It's my first AppleScript so, might not be the best code (got an issue with space that I fixed by explicitly sending 49 but it works.
tell application "Slack"
activate
end tell
tell application "System Events"
keystroke "/"
keystroke "update"
key code 49
keystroke "your"
key code 49
keystroke "status"
delay 1
key code 76
delay 1
set textBuffer to "Hello world!"
repeat with i from 1 to count characters of textBuffer
if character i of textBuffer = " " then
key code 49
else
keystroke (character i of textBuffer)
end if
delay 0.05
end repeat
delay 0.1
key code 76
end tell
Hello,
Running the following AppleScript:
I see Slack coming up and executing the
/
but at some point it fails with the following Slackbot message:I see in the Events window:
I am running the script with the ScriptEditor on macOS Monterey 12.1
Thanks for script, and let me know if there is something I am not using properly.
The text was updated successfully, but these errors were encountered: