Saturday, January 19, 2019

#1 2006-01-31 02:38:27 am

archseed
Member
From:: Burirum, Thailand
Registered: 2004-06-23
Posts: 372

AppleScript error codes - Where can I get a complete list?

Hi,

I've been having some problems lately with my script that were not problems before..perhaps because of version upgrades and all.

I need to have access to a complete list of AppleScript codes and their meanings so I can have an idea what errors I need to look for in my codes.

Anybody knows where I can download such file? I tried to google this bulletin board but found no lead.

TIA.

archseed sad

Offline

 

#2 2006-01-31 06:47:40 am

hhas
Member
Registered: 2004-04-29
Posts: 461

Re: AppleScript error codes - Where can I get a complete list?

archseed wrote:

I need to have access to a complete list of AppleScript codes and their meanings so I can have an idea what errors I need to look for in my codes.


http://developer.apple.com/documentatio … t.109.html
http://developer.apple.com/documentatio … html#36822
http://developer.apple.com/documentatio … l#BBCCCHDG


Learn AppleScript, 3rd edition - Sanderson & Rosenthal (Apress)

Offline

 

#3 2006-01-31 10:55:25 am

archseed
Member
From:: Burirum, Thailand
Registered: 2004-06-23
Posts: 372

Re: AppleScript error codes - Where can I get a complete list?

Hi,

I'll be darned.  I went to the developer's website, made the search and still did not find it.

Your URL just took me directly where I wanted to go.

Thanks a lot. I've got what I need now.

archseed smile

Offline

 

#4 2006-01-31 03:02:20 pm

kel
Member
Registered: 2002-11-20
Posts: 2031

Re: AppleScript error codes - Where can I get a complete list?

Hi archseed,

Note that Apple changed a lot of the numbers and added a few. For instance, there is no error number -1762 Apple event error listed. This is the same list in the AppleScriptLanguageGuide.

gl,


Kel

Offline

 

#5 2006-01-31 03:28:46 pm

hhas
Member
Registered: 2004-04-29
Posts: 461

Re: AppleScript error codes - Where can I get a complete list?

kel wrote:

Note that Apple changed a lot of the numbers and added a few.


I doubt Apple have changed any error numbers as those are system-level codes and changing their meaning now would cause major breakage all over the place, not just in AS.

For instance, there is no error number -1762 Apple event error listed.


The error code list in the ASLG isn't meant to be a comprehensive list of Mac OS error codes, only those that ASers are likely to encounter. Error -1762 (errOSACantOpenComponent) has been around forever, for example, but it's not listed in the ASLG because you're unlikely to encounter it in AS itself. Though if you do need a comprehensive list of classic Mac OS error codes, just Google for it.

Probably the main annoyance is that Cocoa doesn't use classic Mac error codes itself, so most Cocoa-based apps return various NSError messages that AppleScript (which predates Cocoa) doesn't know how to translate to more readable descriptions. The ASLG also predates Cocoa, hence the additional links to Cocoa Scripting error codes.

HTH


Learn AppleScript, 3rd edition - Sanderson & Rosenthal (Apress)

Offline

 

#6 2006-01-31 04:20:41 pm

kel
Member
Registered: 2002-11-20
Posts: 2031

Re: AppleScript error codes - Where can I get a complete list?

Hi hhas,

Thanks for the info!

I'm quite sure I came upon an error last week, looked up the error number and it changed, but maybe they just changed the message or something. If I get it again I'll post it.

Thanks,


Kel

Offline

 

#7 2006-01-31 05:37:58 pm

archseed
Member
From:: Burirum, Thailand
Registered: 2004-06-23
Posts: 372

Re: AppleScript error codes - Where can I get a complete list?

Hi,

Lots of thanks for the additional information.

Error -1762, I noted too, is not in the list that I looked at. I was zeroing in on that particular error code because it kept popping up in my little app; the entire list is useful for further info in case I do run into more troubles (hopefully, not).

Now, may I ask further how I can deal with this particular error code? I need some help in deciphering these Cocoa error messages. Does it mean that some component of my script cannot be opened? (just my little try at literal translation of the message).

Bad thing is my app (AS Studio) compiles successfully but fails on some aspects (the Quit part), making it difficult to debug. Wish I know a lot more how to use Xcode's debug feature.

Thank you for your kind attention.

archseed smile

Offline

 

#8 2006-01-31 07:29:57 pm

archseed
Member
From:: Burirum, Thailand
Registered: 2004-06-23
Posts: 372

Re: AppleScript error codes - Where can I get a complete list?

Hi,

Here's a quick update on the problem with the missing component that generated the Error Code -1762.

It is related to some windows in my AS Studio application that had "Released when closed" checked or activated. By unchecking them,  it resolved my problem and does not generate any Error -1762 anymore.

Better still, the application is working well right now.

Thanks for the kind help.


archseed smile

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)