Re: Instructions after file check...
Re: Instructions after file check...
- Subject: Re: Instructions after file check...
- From: Axel Luttgens <email@hidden>
- Date: Wed, 24 Sep 2008 12:50:37 +0200
Le 24 sept. 08 à 12:32, Ashwin Row a écrit :
Hi,
In the script below everything works fine exempt for the the
instructions that follow after it checks the file alias.
It return true and false but fails to store value's in the database.
The code to access the database is fine as I have tested them
separately.
Thanks in advance.
tell application "FileMaker Pro Advanced"
activate
tell database "Automator"
tell record 1
cell "Page Name"
--set abc to "hi"
set abc to cell "Page Name"
display dialog abc
end tell
end tell
end tell
set theFolder to ("/Applications/eShox/" & abc)
try
get (POSIX file theFolder) as alias --file checking starts here...
return true
That "return true" statement just halts script's execution (or halts
current handler's execution and returns true -the boolean value- to
the caller, in case the piece of code you have posted is part of a
handler).
So, I guess you would just need to remove that statement, so as to
allow the execution to continue until the "on error" statement.
set abc to "true"
display dialog "Path exists!"
tell application "Opera"
activate
end tell
tell application "FileMaker Pro Advanced"--access database
tell database "Automator"
tell record 1
set cell "temp" to abc
end tell
end tell
end tell
on error
display dialog "File does not exist creating new document!"
return false
Same problem here: you should remove that "return false" statement.
That way, should the file be non existent, the whole block between "on
error" and "end try" may be executed.
set abc to "false"
display dialog "Path does not exist!"
tell application "FileMaker Pro Advanced"--access database
tell database "Automator"
tell record 1
set cell "temp" to abc
end tell
end tell
end tell
end try
end
Where does that ending "end" statement come from?
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden