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



You don't need the Finder if you use this routine (although there are
simpler ones I'm sure):

if testFileExists("HD3:Users:steven:Desktop:test.txt2") then
display dialog "Yes"
else
display dialog "No"
end if

on testFileExists(inputPath)
if inputPath is not equal to "" then try
get alias inputPath as string
return true
end try
return false
end testPathExists

> 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?
>
> 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.
>
>
--
autoMAC-it
mailto:email@hidden
visit: http://www.dizzypenguin.com/automac-it/
_______________________________________________
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.