Re: Display dialog with image
Re: Display dialog with image
- Subject: Re: Display dialog with image
- From: "Stockly, Ed" <email@hidden>
- Date: Mon, 27 Feb 2006 19:39:56 -0800
Thanks to Yvan and Christian, here's how we're handling previewing images. Works like a charm!
> set imageFiles to choose file with prompt "Select Image Files" with multiple selections allowed
> PreviewImages(imageFiles)
> on PreviewImages(imageFiles)
> repeat with myFile in imageFiles
> tell application "Finder"
> reveal myFile
> -- a "tell Finder window 1" tell block fails on some of these commands
> set current view of Finder window 1 to icon view
> set shows item info of icon view options of Finder window 1 to true
> set shows icon preview of icon view options of Finder window 1 to true
> set icon size of icon view options of Finder window 1 to 128
> set bounds of Finder window 1 to {30, 50, 350, 350}
> reveal myFile
> activate
> set userChoice to display dialog "Enter image caption" buttons {"Show Preview", "Cancel", "Okay"} default answer ""
>
> end tell
> if the button returned of the userChoice = "Show Preview" then
> tell application "Preview"
> open myFile
> activate
> set userChoice to display dialog "Enter image caption" buttons {"Cancel", "Okay"} default answer ""
> try
> tell application "System Events"
> tell process "Preview"
> keystroke "w" using {command down}
> end tell
> end tell
> on error -- in case system events isn't aware
> quit
> end try
> end tell
> end if
> end repeat
> end PreviewImages
>
Thanks
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden