Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Soggymass

macrumors newbie
Original poster
Apr 18, 2010
2
0
Okay i'll give the problem strait out.
AppleScript isn't finding my apps when i type a directory. Even if I check it, and get the one that TechSmith has made. Well, the script I typed was:

tell application "Finder"
if exists application "ScriptApp Soggymass.app" of folder "Desktop" of folder "Ryan" of folder "Users"
of startup disk then
display dialog "It Exists"
else
display dialog "No it doesn't"
end if
end tell

I have ScriptApp Soggymass.app on my desktop, but I always end up getting the dialog "No it doesn't". Can anyone tell me how to fix this problem that AppleScript can't find my folders; files or apps?!?!?!?!?!?!?

Soggymass
macrumors newbie
 

mysterytramp

macrumors 65816
Jul 17, 2008
1,334
4
Maryland
I'm guessing your issue is "if exists application" Try instead: "if exists file"

You might also try:

Code:
set desktopPath to (path to desktop) as string

set appPath to desktopPath & "ScriptApp Soggymass.app"

if exists appPath then
	display dialog "It exists"
else
	display dialog "It doesn't"
end if

Like this, you avoid a tell block.

mt
 

Soggymass

macrumors newbie
Original poster
Apr 18, 2010
2
0
I'm guessing your issue is "if exists application" Try instead: "if exists file"

You might also try:

Code:
set desktopPath to (path to desktop) as string

set appPath to desktopPath & "ScriptApp Soggymass.app"

if exists appPath then
	display dialog "It exists"
else
	display dialog "It doesn't"
end if

Like this, you avoid a tell block.

mt

So why did my original script work a few days ago. My Computer has broken somehow and i'm calling the ADC Worldwide Telephone Support when I get the chance.
EDIT: OMG, a fatal error for me.... i should have written
Code:
 if exists application file
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.