Re: How to?!
Re: How to?!
- Subject: Re: How to?!
- From: bill fancher <email@hidden>
- Date: Mon, 23 Sep 2002 15:13:20 -0700
On Monday, September 23, 2002, at 12:43 PM, Joseph Silverman wrote:
What one-liner script would create an 'internet location file' on the
desktop of the currently logged in user. Also, is it possible to put
such an alias in the dock with applescript?
Not presently. Dock isn't scriptable. (Well you might hack Dock's
undocumented prefs file somehow, but it would be REALLY ugly. Some
installers apparently do this. Seems rude and useless to me. If the
user wants the app in the dock, they can just choose "Keep in Dock"
while it's running. Or drag it there.)
I have been trying:
tell finder
make new internet location file to "http://localhost:80/" at desktop
end finder
tell application "Finder"
make new internet location file at desktop with properties
{name:"spud"} to "
http://localhost:80/"
end tell
and it doesn't work.
It's usually a good idea to provide more information than "it doesn't
work", e.g. error messages, the exact line causing the problem (obvious
here), etc.
Even something as simple as the above might "not work" in various ways.
The fix above successfully creates the file, but, since I don't have a
web server running, it "doesn't work" when I double-click the file. I
get a connection error after my browser launches.
Another question - how does one package up an applescript application
so that it has a .app bundle (allowing an icon and other resources)?
I don't need it to open any windows, just do some basic 'on run ...
end run' type processing.
The "official" way to do this is to create a droplet in Project
Builder. You need the developer tools for that.
Wonder if it would be worth providing templates for those who don't
want to download all those MB's just to make applets with resources. It
would be trivial: just compile the default droplet. People could then
put their own stuff in the appropriate folders inside it.
In fact, I believe you could gut almost any existing application built
with AS Studio and use that. The main thing you want to preserve is the
contents of MacOS.
(BTW, if all you want is an icon, you can just paste one on in Finder's
Info window. But you probably knew that...)
HTH,
--
bill
_______________________________________________
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.
References: | |
| >How to?! (From: Joseph Silverman <email@hidden>) |