Re: Error from opening a read only applet in SD
Re: Error from opening a read only applet in SD
- Subject: Re: Error from opening a read only applet in SD
- From: John Stewart <email@hidden>
- Date: Fri, 29 Aug 2003 04:34:34 -0400
>
On 28/08/2003 14:55, John Stewart <email@hidden> wrote:
>
>
>It works just fine when you consider that it returns error number -43
>
>which isn't what's being tested
>
>for. Ergo the code to set "myerr" never gets executed, try it this way
>
->
>
>
>
>
>
>global myerr
>
>set myerr to ""
>
>try
>
> set k to "Disk:Folder:applet"
>
> tell application "Finder"
>
> set y to k as alias
>
> open y using application file id "asDB"
>
> end tell
>
>on error errMsg number errNum <-- simplified
>
> set myerr to errNum
>
>end try
>
>
>
>return errNum
>
>
--> The variable errNum is not defined.
>
>
Are you testing this with Script Debugger? Because in SD nothing after
>
"on error" gets executed.
>
>
And thanks to Emmanuel for pointing out my "Read Only" error.
>
>
cheers
>
ehsan
>
__________
Yes, I'm using SD along with OS 10.2.6 and AS 1.9.1 but it makes no difference which script editor I
use. Copy/pasting your code above and running it exactly as written returns -43 every time.
OMM the only way the "on error" portion of the code won't be executed is if there is actually a real
file with the path "Disk:Folder:applet" which there isn't. Are you substituting a real path of a real
file in place of that psuedo path?
One thing you might try is ->
try
error number 1
display dialog "got here"
on error errMsg number errNum
display dialog (errNum as string) & ": " & errMsg
end try
This code should display a dialog containing "1: An error of type 1 has occured" and never display
one containing "got here". If it performs otherwise, you have something very strange happening with
your AppleScript installation.
John
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.