Created
July 28, 2022 09:04
-
-
Save kyanny/d283850a724127d4682a3541f98db9a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
set UUID to do shell script "uuidgen" | |
tell application "Finder" | |
make new folder at desktop with properties {name:UUID} | |
end tell | |
set WORKDIR to "~/Desktop" & "/" & UUID & "/" | |
tell application "Slack" to activate | |
delay 0.5 | |
set i to 0 | |
repeat | |
try | |
do shell script ("screencapture -o " & WORKDIR & i & ".png") | |
set i to i + 1 | |
display dialog "Continue taking screenshot?" buttons {"Cancel", "Continue"} default button "Continue" | |
tell application "Slack" to activate | |
key code 121 | |
delay 0.5 | |
on error | |
exit repeat | |
end try | |
end repeat | |
display notification "It will open the working folder " & WORKDIR & " soon." with title "Concatenating screenshots" | |
do shell script ("cd " & WORKDIR & " && /usr/local/bin/convert -append *.png out.png") | |
# this should be done with native applescript | |
do shell script ("open " & WORKDIR) | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment