display message \"foo\" at screen position center dismissing after delay 0
set x to screen position of message window 1
tell application \"FastScripts\"
display message \"foo\" at screen position center dismissing after delay 0
end tell
get bounds of window 1 -- using the Finder to locate the window
Daniel Jalkut said:For instance, if you did two notifications to the top-left, then the first note would be at the very top-left, and the second note just below it.
Daniel Jalkut said:Thanks - that's interesting. I didn't know about the limitation on multi-word parameters in AppleScript. I will have to look into this a bit more and consider how I should best address the situation.
Daniel
tell application \"FastScripts\"
set myPos to top left
end tell
ShowMessageAtPosition(\"hello there\", myPos)
on ShowMessageAtPosition(message, position)
tell application \"FastScripts\"
display message message at screen position position
end tell
end ShowMessageAtPosition
using terms from application \"FastScripts\"
set TR to top right
set Ctr to center
-- etc. for the other 6
end using
set myMsg to \"Hi There
set myLoc to TR
tell application \"FastScripts\"
display message myMsg at screen position myLoc dismissing after 0
end tell
using terms from application \"FastScripts\"
set theLocs to {top center, top left, center, bottom right, bottom left, bottom center, top right}
end using terms from
set msg to \"Hi There\"
repeat with anItem in theLocs
set myLoc to anItem
tell application \"FastScripts\"
display message msg at screen position myLoc dismissing after delay 1
end tell
end repeat
It looks like you're new here. If you want to get involved, click one of these buttons!