08-15-2010, 06:55 PM
For Firefox.
Function FirefoxGetAddress
______________________________________
For Internet Explorer
Function IeGetAddress
______________________________________
For Chrome
Function ChromeGetAddress
Function FirefoxGetAddress
;/
function~
;Returns URL from address bar of Firefox browser.
;Error if fails.
;Tested with Firefox 3.6.8 - 21.0. May fail with other versions.
;Fails if address bar is hidden.
;EXAMPLE
;str s=FirefoxGetAddress
;sel s 3
,;case "http://www.google.*"
,;out "Google"
,;
,;case "http://www.quickmacros.com*"
,;out "Quick Macros"
,;
,;case else
,;out s
int w=win("Mozilla Firefox" "Mozilla*WindowClass" "" 0x804)
Acc a=acc("Search or enter address|Go to a Website|Go to a Web Site|Search Bookmarks and History|Location" "TEXT" w "" "" 0x1802 0x0 0x20000040)
ret a.Value
err+ end _error______________________________________
For Internet Explorer
Function IeGetAddress
;/
function~
;Returns URL from address bar of Internet Explorer browser.
;Error if fails.
;Tested with IE 5, 6, 7, 8. May fail with other versions.
;Fails if address bar is hidden.
;EXAMPLE
;str s=IeGetAddress
;sel s 3
,;case "http://www.google.*"
,;out "Google"
,;
,;case "http://www.quickmacros.com*"
,;out "Quick Macros"
,;
,;case else
,;out s
Acc a=acc("Address" "TEXT" win(" Internet Explorer" "IEFrame") "Edit" "" 0x1801 0x0 0x20000040)
ret a.Value
err+ end _error______________________________________
For Chrome
Function ChromeGetAddress
;/
function~
;Returns URL from address bar of Google Chrome browser.
;Error if fails.
;Tested with Chrome 5.0. May fail with other versions.
;Fails if address bar is hidden.
;EXAMPLE
;str s=ChromeGetAddress
;sel s 3
,;case "http://www.google.*"
,;out "Google"
,;
,;case "http://www.quickmacros.com*"
,;out "Quick Macros"
,;
,;case else
,;out s
Acc a=acc("Location" "TEXT" win(" Chrome" "Chrome_WidgetWin_0") "" "" 0x1801 0x0 0x20000040)
ret a.Value
err+ end _error