Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hide finder results



On Tuesday, August 19, 2003, at 08:46 AM, Steven Doyle wrote:

Hi!,

probably another stupid questions, but the archives don't help..I'm running a check to see if a file exists, as a tell application finder, if file exists...

works fine, but it switches from my app to the finder window while its doing it....I guess i can run a shell script to do the same thing, but would hope i could get the functionality from finder calls within the app..I've tried adding 'ignoring application responses' but don't get anywhere..

below is the VERY basic sample..it works, except while doing it, it switches to the finder :(

any clues?

Yes. The Finder is activating because you are calling the display dialog within the Finder tell block. That means you are telling Finder to display a dialog. When it does, it comes to the front. I'd either use a flag inside the tell block, followed by a display dialog outside it, or just 'tell me to display dialog "foo"' instead.


tell application "System Events"

tell application "Finder"
if (the file "HD3:Users:steven:Desktop:test.txt2" exists) then

display dialog ("yes")
else
display dialog ("no")
end if

end tell

end tell
Cheers,

Steve
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.

References: 
 >Hide finder results (From: Steven Doyle <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.