hartmut Posted October 14, 2009 Posted October 14, 2009 I would like to know if there is a way or a sample file that will show how to grab a url from a web browser? Thank you
Genx Posted October 14, 2009 Posted October 14, 2009 Can you be more specific? Do you mean web viewer or web browser.
hartmut Posted October 14, 2009 Author Posted October 14, 2009 A Web Browser Sorry If the Web viewer does work I would like to know that as well. Thanks and Sorry I was not specific
Genx Posted October 14, 2009 Posted October 14, 2009 No clue how to do it with a web browser - especially because you might have 20 of them open, which could be safari / ie / firefox / opera etc. and each of which would require a different methodology for obtaining the URL. Not to mention the fact that it would be again different on both OS's. The point is, getting a URL from a web browser just has no real context and so is problematic. Regarding a web viewer, it's much simpler. All you have to do is name your webviewer (in layout mode, bring up the object info window, select the webviewer and then give it a name). After that, whenever you're on the layout, you can obtain the url via the following function: GetLayoutObjectAttribute( "webviewer_object_name" ; "source" )
hartmut Posted October 15, 2009 Author Posted October 15, 2009 Thank You Genx. Is it possible just to get the web page address? Not all the other HTML? Just the url posted in the address bar?
bruceR Posted October 15, 2009 Posted October 15, 2009 Perform applescript: set AppleScript's text item delimiters to return tell application "Safari" to get URL of every tab of window 1 set theLinks to result as text copy theLinks to cell "Links" of current record
Recommended Posts
This topic is 5576 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now