Recent | Online | Vintage | Modern | XP | Win | Mac  OS9 | DOS | Amiga | Atari ST | Graphics | Midi io | Sequencers | Roland "MC" | E-mu | Ensoniq | Akai MPCs | Samplers | Akai "S" | Roland "S"Synths | VST Samplers | VST Synths | Roland "JV" | Modules | Drums | Mixers | Timeline | HackintoshArtists | Graphics

Welcome to Oldschooldaw.com! (Online since 2014) proudly SSL-FREE! and serving vintage computers worldwide! if you are human, Register & Login to gain more access to all boards here; Some guest permissions have been limited to reduce traffic from bots and encourage registration. This website serves as a home base for any and all peoples who are interested in the topics posted here which is mostly very technical references + resources to do with music production on various home computer operating systems. If you have any information that is relevant, we'd love to have you take the initiative to contribute! hobbyists + professionals alike, theres lots to know + lots to learn so get to work!

Author Topic: Prompt for filename after or before taken a screenshot  (Read 3612 times)

0 Members and 1 Guest are viewing this topic.

Offline chrisNova777

  • Underground tech support agent
  • Administrator
  • Posts: 9969
  • Gender: Male
  • "Vintage MIDI Sequencing + Audio Production"
    • www.oldschooldaw.com | vintage audio production software + hardware info
Prompt for filename after or before taken a screenshot
« on: March 11, 2017, 07:36:00 PM »
https://discussions.apple.com/thread/7287386?start=0&tstart=0

interesting post here on how to use some of the hidden power + potential of scripting used in combiation with ui in osx

APPLESCRIPT!!

Code: [Select]
set f to (choose file name default location ¬
  "/Users/user/Pictures/Screenshots" default name (do shell script "date +'Screenshot-%Y%m%d-%H%M%S.jpg'"))'s POSIX path
do shell script "screencapture -i -P -tjpg " & f's quoted form

Code: [Select]
set n to do shell script "date +'Screen_%Y%m%d_%H%M%S.png'"
tell application "SystemUIServer"
    set f to (choose file name default location (path to desktop) default name n)'s POSIX path
end tell
do shell script "screencapture -i " & f's quoted form