Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/osascript
- set commande to "date +\"%Y-%m-%d-%H.%M.%S\""
- set fichier to "capture" & (do shell script commande) & ".png"
- set localfolder to (path to home folder as string) & "Desktop:"
- set cloudfolder to (path to startup disk as string) & "mnt:nfs:nonas-web:vrac:"
- set myurl to "http://nonas.ugo235.fr/vrac/" & fichier
- do shell script "screencapture -i -P " & (POSIX path of localfolder) & fichier
- set reponse to (display dialog "Upload to the cloud ?" buttons {"Yes", "No"})
- if button returned of reponse = "Yes" then
- tell application "Finder"
- move file (localfolder & fichier) to cloudfolder
- delete (localfolder & fichier)
- end tell
- set the clipboard to myurl
- display alert "URL " & myurl & " copied to the clipboard"
- end if
- tell application "Preview" to close document fichier
Advertisement
Add Comment
Please, Sign In to add comment