Women in Technology

Hear us Roar



Article:
  Controlling Your Mac with AppleScript and Java
Subject:   Error -1750
Date:   2003-06-12 07:41:11
From:   sdwr98
Hello Everyone,


I have gotten a couple of comments from readers who at one point were able to run the examples just fine but are now getting an NSAppleScriptErrorNumber = -1750 error. Is anyone else getting this problem? It seems to have cropped up for me after upgrading to 10.2.6 - but I would like to hear from anyone else that is having this problem.


Regards,


Scott Rankin

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Error -1750
    2003-06-12 13:10:47  pcbeard [View]

    Yes, I see the same problem. Something in the way Cocoa works in Mac OS X 10.2.6 has triggered this. A simple work around is to add the following code to your application:

    import com.apple.cocoa.application.NSApplication;

    then

    NSApplication.sharedApplication();

    before you use the NSAppleScript class.
    • Error -1750
      2003-06-14 08:29:58  pcbeard [View]

      The technical reason this has broken is that the Carbon.framework is no longer automatically loaded into a Java program running from the command line. I have another workaround whereby I dynamically load the library /System/Library/Frameworks/Carbon.framework/Carbon using the NSAddImage() API, and this also allows programs using NSAppleScript to work.