Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created July 28, 2022 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyanny/d283850a724127d4682a3541f98db9a0 to your computer and use it in GitHub Desktop.
Save kyanny/d283850a724127d4682a3541f98db9a0 to your computer and use it in GitHub Desktop.
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