forked from Sunkworld/Trash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtakephoto&sendemail.applescript
More file actions
38 lines (35 loc) · 1.38 KB
/
takephoto&sendemail.applescript
File metadata and controls
38 lines (35 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
try
tell application "Photo Booth"
activate
end tell
do shell script "touch /Users/Yuuko/Pictures/Photo\\ Booth\\ Library/Pictures/skfjsa.jpg"
do shell script "rm /Users/Yuuko/Pictures/Photo\\ Booth\\ Library/Pictures/*"
tell application "System Events"
tell process "Photo Booth"
delay 2
key code 36 using {option down, command down}
end tell
end tell
delay 2
tell application "Photo Booth" to quit
do shell script "touch /Users/Yuuko/Desktop/slfjaskdf.jpg"
do shell script "rm /Users/Yuuko/Desktop/*.jpg"
do shell script "mv /Users/Yuuko/Pictures/Photo\\ Booth\\ Library/Pictures/* /Users/Yuuko/Desktop"
do shell script "mv /Users/Yuuko/Desktop/*.jpg /Users/Yuuko/Desktop/1.jpg"
tell application "Airmail 2"
activate
set theMessage to make new outgoing message with properties {subject:"the subject", content:"the content"}
tell theMessage
set sender to "365062829@qq.com"
set signature to "My signature"
make new to recipient at end of to recipients with properties {name:"yuuko_vps", address:"yuuko_vps@126.com"}
make new mail attachment with properties {filename:"Users:Yuuko:Desktop:1.jpg" as alias}
sendmessage
end tell
end tell
delay 2
do shell script "rm /Users/Yuuko/Desktop/*.jpg"
on error
do shell script "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend"
end try
do shell script "~/.internet.py"