Skip to content

Consider adding this getStatus() function #44

@jfitzgerald

Description

@jfitzgerald

@samknight Thanks for this repo. Here's the code for getStatus(), which was helpful for me in the solution I needed to automate status updates. I tried updating the source with a proper wrapper function, but I got syntax errors when tring to use on get status.

on getStatus()
	tell application "Slack"
		activate
		tell application "System Events"
			set prevClipboard to the clipboard
			delay 0.5
			keystroke "Y" using {command down}
			delay 0.75
			keystroke "a" using {command down}
			delay 0.5
			keystroke "c" using {command down}
			delay 0.5
			-- escape
			key code 53
		end tell
		delay 0.5
		set copiedText to the clipboard
		if prevClipboard is copiedText then
			set copiedText to ""
		end if
		return copiedText
	end tell
end getStatus

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions