?
Solved

AppleScript Applications do not work across different Computers

Posted on 2003-02-27
17
Medium Priority
?
279 Views
Last Modified: 2010-04-25
Hi.  I create an AppleScript using Script Editor.  Here is the script:

tell application "Mozilla"
openURL "http://www.yahoo.com"
end tell

I save the script as an application.
I have a java application call this script by name.  Then have this script open the browser to that URL.
What happens is that it works on the computer that I created the script on (MAC OS 10.2.2) but when I copy everything onto another Mac (same OS), the java application cannot run the script (no error, just nothing happens, like the script cannot be found).

Is there a bug with the script editor, or am I going at this all wrong?  I'm new to AppleScript and new to Macs in general.  Please help me.  Thanks so much in advance.
0
Comment
Question by:abbeyjaye
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 8
17 Comments
 
LVL 30

Expert Comment

by:weed
ID: 8037711
They're probably using a beta of Mozilla. Mozilla 1.3b doesn't have an applescript dictionary yet, but 1.2.1 does. You're probably testing with 1.2.1, and deploying to users who are using 1.3b.
0
 

Author Comment

by:abbeyjaye
ID: 8037897
I'm testing with 1.1 and have not had any "users" of this application yet.. still in testing phase. I am simply creating an installer of the application bundled with Mozilla, the Applescript, and my application.  Any other thoughts?
0
 
LVL 30

Expert Comment

by:weed
ID: 8038198
The applescript dictionaries still vary between versions. You should probably be testing with 1.2.1 in any case.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:abbeyjaye
ID: 8038215
The AppleScript dictionary for Mozilla 1.1 does support my script.  I am bundling my end-product with Mozilla 1.1 (I find 1.1 to be the most stable release for javascript).  Anything else??? :o\
0
 
LVL 30

Expert Comment

by:weed
ID: 8038594
You may be bundling Mozilla 1.1 for javascript reasons but 1.2.1 has many other advantages. It's such a young product that every point release means big improvements. People arent going to want to suffer with 1.1's problems. I'm even using 1.3b just for the advantages.

When you transfer the whole batch to a different machine, where are you putting it? The users home directory?
0
 

Author Comment

by:abbeyjaye
ID: 8044144
Onto the user's home directory.
0
 
LVL 30

Expert Comment

by:weed
ID: 8044248
Your script should work as long as Mozilla resides within the Applications folder, not the users home directory. You may have to redo the script accordingly.
0
 

Author Comment

by:abbeyjaye
ID: 8044286
The script is installed in the same folder as the application and Mozilla.  The script works alone but when I call the script from my application, even though the name hasn't changed, it doesn't seem to open the script once I am not on the computer that I originally created the script on.
0
 

Author Comment

by:abbeyjaye
ID: 8044290
Do you know of any bugs related to AppleScipt or Script Editor?
0
 
LVL 30

Expert Comment

by:weed
ID: 8044362
Im thinking its not opening the script because the path to the script is different. On YOUR computer the path is /Users/username/script.scpt. On someone elses machine its /Users/differentusername/script.scpt
0
 

Author Comment

by:abbeyjaye
ID: 8044394
Even though I don't specify a path when I call it, because it is in the same folder?  (Thanks for all your correspondance, by the way!)
0
 
LVL 30

Expert Comment

by:weed
ID: 8044437
Yep. So, stick to having all your apps/scripts in places that will be the same across all machines.
0
 

Author Comment

by:abbeyjaye
ID: 8044451
Like.....?
0
 
LVL 30

Accepted Solution

by:
weed earned 300 total points
ID: 8044557
Like the Applications folder.
0
 

Author Comment

by:abbeyjaye
ID: 8044641
That is where it is located.  But what if the Hard Drive is different?
0
 

Author Comment

by:abbeyjaye
ID: 8044645
Thanks for all your communications.
0
 
LVL 30

Expert Comment

by:weed
ID: 8044707
The HD name shouldnt matter. It'll still be the root directory of the boot drive.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Package creation on OS X uses the PackageMaker utility installed as part of the XCode development suite ( on the OSX Client CD).  Packages can be installed as part of the machine build process, or later using Apple Remote Desktop. They are generally…
Yesterday Apple introduced their revolutionary new iOS 5 operating system that claims to be the ultimate mobile technology interface. One of the biggest innovations of the new operating system is the introduction of the iCloud computing network. Thi…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question