*** "All things are possible" Mark 10:27 ***
please feel free to post relevant information in the pre-existing threads if file attachments or images are not displayed you may need to register/login logging in also enables you to use the arrow keys to page back + forth Recent | Who | Artists | USB | Firewire | VST | Retrospects | Commodore | ATARI ST | Amiga | IBM/DOS | WIN/PC | Mac | MacOS9 | Drums | Drum Machines | Synths | Modules | Samplers | Tape | Mixers | Software | GFX | Midi Interfaces | Midi Sequencers | ControllersE-mu | Ensoniq | Akai "S" | MPCs | Roland "MC"Roland "S" | Roland "JV" | JV addons | Hardware Effects | iOS | android | DAW Software Timeline

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

0 Members and 1 Guest are viewing this topic.

Offline chrisNova777

  • Underground tech support agent
  • Administrator
  • Posts: 7709
  • 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