path to frontmost application as string
path to frontmost application as string
- Subject: path to frontmost application as string
- From: Robert Poland <email@hidden>
- Date: Tue, 7 Jun 2005 11:42:16 -0600
Hi,
The following part of a script doesn't do as I
would expect. I'm trying to get the Display
Dialog window to be in front of everything else.
It is usually run from Cronnix but fails if run
from the "Favorites" pull down menu. Excuse all
the extra stuff but that's the way it is.
set moreInfo to "" -- added to make snippet run
set answerInfo to "" -- added to make snippet run
set wasVolume to 50 -- added to make snippet run
set oldDelim to "" -- added to make snippet run
tell application (path to frontmost application as string)
if moreInfo = "" then
ignoring application responses
set volume output volume wasVolume
delay 2 -- needs time to set volume level before beep
beep
end ignoring
if wasVolume is less than 80 then set volume output volume 80
tell application (get path to
frontmost application as string) to display
dialog "" & answerInfo & (return) & "No reminders
today." buttons ("OK") ¬
default button 1 giving up after 10
poof at {500, 200} -- needs XFun.osax
-- play sound poofSound
else
try
if wasVolume is less than
80 then set volume output volume 80
with timeout of (60 * 60) seconds -- 1 hour
tell application
(get path to frontmost application as string) to
display dialog "" & answerInfo & moreInfo buttons
("OK") default button 1
end timeout
end try
tell application "Play Sound" to play sound poofSound
poof at {500, 200} -- needs XFun.osax
end if
end tell
set AppleScript's text item delimiters to oldDelim
delay 1
set volume output volume wasVolume
try
tell application "Play Sound" to quit
end try
--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/
_______________________________________________
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