Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

AppleScript Applications do not work across different Computers

Posted on 2003-02-27
17
Medium Priority
?
280 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
  • 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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 

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: 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.

Question has a verified solution.

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

In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
Users will learn how to set proper sequence settings, scale images, paste attributes, add transitions, fades, and music. Open up Final Cut Pro 7 and Create a new Project: Set the Sequence Settings. a) Click File > Easy Setup > Format > Apple ProRe…
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…

580 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