• 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: OmniWeb and AppleEvents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OmniWeb and AppleEvents


  • Subject: Re: OmniWeb and AppleEvents
  • From: Nathan Day <email@hidden>
  • Date: Thu, 13 Feb 2003 13:03:48 +1030

Is there any reason in particular why you wan to do it using AppleEvents, it would be a lot easier to use AppleScript and use a NSAppleScript instance to run the script. For the information you are after you are probable better of using Safari.

To get the source
tell front document of application "Safari" to source

To get the title
tell front window of application "Safari" to name

To get the url
tell front document of application "Safari" to URL

Using NSAppleScript to execute theses you will be returned an NSAppleEventDescriptor, you can then get the results a string with the NSAppleEventDescriptor method stringValue. To do this using AppleEvent is possible since AppleScripts does every thing through AppleEvents but you are really making things much more difficult with little if no gain.


On Thursday, February 13, 2003, at 01:52 AM, Robert wrote:

Anyone have some sample code that shows how to retrieve information
about the current browser window in Safari using AppleEvents? It seems
to be possible to get a browser document containing the source, title
and URL. Some sample code would help a lot. Thanks!

I didn't get a response on this one, so my next question is: does
anyone have some sample code that shows how to retrieve information
about the current browser window from OmniWeb using AppleEvents? Thanks
again.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >OmniWeb and AppleEvents (From: Robert <email@hidden>)

  • Prev by Date: Re: layout management and cocoa
  • Next by Date: Re: Strange Error with Singleton Class
  • Previous by thread: OmniWeb and AppleEvents
  • Next by thread: Extending Safari
  • Index(es):
    • Date
    • Thread