Re: Internet Shortcut _ Urgent
Re: Internet Shortcut _ Urgent
- Subject: Re: Internet Shortcut _ Urgent
- From: "Queen Ann" <email@hidden>
- Date: Fri, 12 Apr 2002 09:21:32 -0500
- Organization: Tata Infotech
Hi ,
I have one more doubt in the Internet Shortcut.
Does the solution depend on the version of Mac OS?
tell application "Finder"
set thePathToTheDesktop to path to the desktop
set theFile to (thePathToTheDesktop & "theurl.url") as text
try
close access file theFile
end try
open for access file theFile with write permission
write "[InternetShortcut]
URL=
http://www.yahoo.com/
" to file theFile
close access file theFile
set the file type of file theFile to "LINK"
set the creator type of file theFile to "MSIE"
end tell
In fact, I had modified the above code a bit because the browser was not
recognising the URL in the shortcut because there was no "carriage return" and
"formfeed".
So I modified the write statement as follows:
" write "[InternetShortcut]" & return & (ASCII character 10) &
"URL=
http://www.yahoo.com"
It works fine on my Mac 9 machine. But it doesnt work on my colleague's
machine.I donno what version of Mac OS he has.
Will the modified code create any problem in other Mac machines?
Help me please ....
Ann.
----- Original Message -----
From: Rob Stott
To: email@hidden
Sent: Wednesday, April 10, 2002 10:13 AM
Subject: Re: Internet Shortcut _ Urgent
On 10/4/02 10:43 pm, "Queen Ann" <email@hidden> wrote:
> Hi all,
>
> This is my first question to this mailing list.
> The question is :
> Hi,
> How do I make a script which will create an Internet Shortcut of Internet
> Explorer in my desktop?
There's probably a much more elegant way of doing this, but the following
method worked fine for me...
tell application "Finder"
set thePathToTheDesktop to path to the desktop
set theFile to (thePathToTheDesktop & "theurl.url") as text
try
close access file theFile
end try
open for access file theFile with write permission
write "[InternetShortcut]
URL=
http://www.yahoo.com/
" to file theFile
close access file theFile
set the file type of file theFile to "LINK"
set the creator type of file theFile to "MSIE"
end tell
Good luck!
R.
--
Rob Stott
Artwork Designer
Humbrol Ltd / Airfix
Marfleet
Kingston upon Hull
England
HU9 5NE
Tel: +44 (0) 1482 701191 ext 6691
Mobile: +44 (0) 7881 811533
Fax: +44 (0) 1482 712908
ICQ No: 148381812
"...its a small world, but I wouldn9t want to paint it."
_______________________________________________
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.
_______________________________________________
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.