• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Selecting links in Communicator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selecting links in Communicator


  • Subject: Re: Selecting links in Communicator
  • From: Sander Tekelenburg <email@hidden>
  • Date: Tue, 12 Jun 2001 16:55:29 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 17:03 -0400 UTC, on 11/06/2001, email@hidden wrote:

>>>Is it possible to select a link in a Netscape Communicator window? [...]
>>
> From: Joe Szedula:
>>Have you tried "OpenURL"? If the link is the same, wouldn't the URL be
>>the same?
>
> This won't work, because I'm first entering text (ie. a sign on or search
> screen) and then needing to "press" the link (thus, the URL will be
> different based on the entered criteria ).

Are you saying you are using a search engine? If so, you can first build the
URL in AppleScript and then feed that URL to your webbrowser. Something like:

set baseURL to "http://www.google.com/search?q=";
set searchCriteria to text returned of (display dialog "Enter a search
string" default answer "")
set theURL to baseURL & searchCriteria
tell application "iCab" -- better to use a real webbrowser ;)
Activate
OpenURL theURL
end tell

This will only work if you enter 1 word! To enter several search terms you
will have to do some more work creating the right URL.

HTH

> I've tried KeyQuencer, but for some reason
> it sometimes works, and sometimes doesn't. Are there any more reliable
> programs or scripting additions for this kind of task?

A common misunderstanding among Newbies is that they look at AppleScript as a
method to have buttons clicked (or menus selected) automatically. This is
sometimes possible, and may sometimes even be the only way to achieve
something, but it is not a good starting point.

Instead, you should consider clicking a button as "giving an application a
command". To do the same thing in AppleScript, you would write code that
gives the command - not code that clicks the button.

Hope this makes it a bit more clear.


-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBOyYtWusywKfXgqKdEQK4ywCdFECnF8ztRgX7B62yepalOXW3Y08AoLkA
9itHjeqhiE5N0dndly/pprt+
=zI7l
-----END PGP SIGNATURE-----
--
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>

Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers support Macs!"


References: 
 >Re: Selecting links in Communicator (From: email@hidden)

  • Prev by Date: AppleScript Timeout
  • Next by Date: Determining Whether File In Use in System 8.6
  • Previous by thread: Re: Selecting links in Communicator
  • Next by thread: Re: Selecting links in Communicator
  • Index(es):
    • Date
    • Thread