Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Change the default screenshot format' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Change the default screenshot format
Authored by: scriptfactors on Aug 23, '05 10:56:09AM

thanks for the great hint!

here is a small AppleScript for the ScriptMenu to switch whenever desired-

property defaultFileFormat : "jpg"

set defaultFileFormat to item 1 of (choose from list {"jpg", "tiff", "png", "pdf"} with title "" with prompt "Select Fileformat for Screencaptures:" default items {defaultFileFormat} without multiple selections allowed and empty selection allowed)
do shell script "defaults write com.apple.screencapture type " & defaultFileFormat
do shell script "killall SystemUIServer"
display dialog "Fileformat for Screencaptures is set to " & defaultFileFormat & "." buttons {"OK"} default button 1


(hope lines do not break...)

cheers,

as



[ Reply to This | # ]
10.4: Change the default screenshot format
Authored by: bgalura on Apr 03, '07 02:04:16AM

I removed the Property line (first line) and added the following:

set defaultFileFormat to do shell script "defaults read com.apple.screencapture type"

so that the current type is highlighted in the list. If you have set it to something that is not in the list (using the command line) nothing will be highlighted. Useful to me so I can easily see what file type I currently have set.

Wraped it all in a "Try" statement as well to avoid getting an error when you click "Cancel"



[ Reply to This | # ]