Re: getting a URL from IE
Re: getting a URL from IE
- Subject: Re: getting a URL from IE
- From: cheshirekat <email@hidden>
- Date: Tue, 17 Apr 2001 19:39:01 -0600
On 04-17-2001 1351, Scott Earleywine may have typed or relayed in full or
in part ...
>
Why would someone need a script to do this?
>
>
I'm new to AppleScript and I was wondering if someone could explain it to me.
>
>
Thank you,
>
SLE
>
> Subject: RE: getting a URL from IE
>
> -- ---------------------------------------------------------
>
> tell application "Internet Explorer"
>
> set myurl to item 1 of (GetWindowInfo 1)
>
> end tell
>
> -- ---------------------------------------------------------
Well, since I have AppleScripts that snag the current URL from both ie
and Communicator, I can give you a few reasons why I need (and often use)
such a script.
Who wants to switch back to the browser to get the URL?
Copy and paste replaces other text or graphics that might be on the
clipboard, so using an AppleScript to place the URL in a variable means
that you can maintain the data on your clipboard.
When telling someone in email about a specific URL, I don't want to copy
and paste the wrong text, like leaving off the last one or two characters
in my haste.
If I go through the trouble of looking up information off the web for
someone, I don't want them to think I may have pulled the data out of my
rear end, so I have an AppleScript that inserts the URL for them to
reference. It's then up to them to decide whether they can believe
everything they read on the web. ;-)
With AppleScript, I can get the name of the site as well as the URL in
one fell swoop, instead of having to copy and paste and switch
applications twice.
When I'm in FileMaker Pro, I use AppleScripts to get URLs from my
browsers to input in a record.
Sometimes, I'm in Netscape and see some items I want to download from a
particular site, but don't want to lose track of details about the
downloadable item or Web Site, so I have a script (activated with
OneClick) that creates a folder in my browser with the URL in the
comments of the folder and the site's name in the folder's name. If the
name is greater than 31 characters, it opens the folder's info window
window so I can quickly input something else. Then I can download the
file directly to that folder. This is extremely handy if you download a
lot of stuff for one particular application or game or something and you
want to maintain the file name, but it's a cryptic name like
x3q3jebz.pdf. Heck, there are days I can't even remember my name, I
certainly won't remember what a cryptic file name is about when I'm done
surfing for the day and browse thru my downloads folder.
While adding or updating URLs in an html document, I can have a script
grab the URL and automatically place the appropriate html tags before
it's inserted in my document. Saves me some typing. I'm lazy, and because
I've found so many ways to avoid typing, I'm also not the fastest typist
around. I don't have to hunt and peck, but after all these years, I still
don't type 100wpm.
Because I can. I don't always need to maintain the data on my clipbaord,
but I like to stay in the habit of using AppleScripts because once in a
while I still accidently copy data over clipbaord contents that I'd been
intending to use (the joys of multitasking) and had to go through a lot
of steps, switching applications, and time to get that data back on the
clipboard.
A page might display poorly in Communicator, so I have an AppleScript,
again activated by OneClick that grabs the current URL and shuttles it to
ie, whether or not ie happens to be open at the time. Or vice versa. I
haven't yet seen ie open up a blank page, but I automatically know
Communicator's incompetence when I see it load a blank page - ie can even
display incorrect html without you knowing it.
Ever been about to complete an online purchase when the phone rings? A
lot of people know that I have DSL and am always connected to the
internet, so they don't hesitate to call and ask me to look up a URL for
them. I always try to switch to my email app while on the phone so I can
type info that I might be given because I hate writing more than typing.
While I'm in my favorite app, I hit a OneClick button that inserts the
current URL and page name so I'll know if I was on a page I need to
return to. Ooops, the phone call almost made me forget my online order.
So, I now can direct the URL just given me to a new page in my browser
without interfering with my purchase. I can then continue talking (and
typing) while the URL is loading in the background.
To name just a few reasons.
kat