display dialog how to place
display dialog how to place
- Subject: display dialog how to place
- From: Christian Vinaa <email@hidden>
- Date: Fri, 4 Mar 2005 21:01:03 +0100
I've a script that open images and then displays dialog KEEP / DELETE ?
problem is that the dialog keeps covering the pictures
is there a way to have the dialog box to be placed fx top right ?
here is the script in all its glory;
( and I am sure that a single line shell script could do the trick ! ;-) )
**
on open
tell application "Finder"
set TheList to selection
end tell
repeat with x in TheList
tell application "Preview"
open x
set myResult to display dialog "Keep or delete picture ?" buttons
{"Keep", "Delete"} default button 2 with icon note
set buttonAnswer to button returned of myResult
if buttonAnswer is "Keep" then
tell application "System Events"
tell process "Preview"
click menu item "Luk" of menu "Arkiv" of menu bar 1
-- aka close window but 'close window 1' - 'close document 1' is
not accepted by Preview.app
end tell
end tell
else if buttonAnswer is "Delete" then
tell application "Finder"
set label index of x to 7
end tell
tell application "System Events"
tell process "Preview"
click menu item "Luk" of menu "Arkiv" of menu bar 1
--type "w" holding command
end tell
end tell
end if
end tell
end repeat
end open
**
--
Christian Vinaa
...... Meanwhile, aunt Martha, having taken a tramp in the woods,
is lying in a ditch at the edge of town .........................
_______________________________________________
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