guides:com:internetexplorer.application

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
guides:com:internetexplorer.application [2022-02-27 15:06] – ↷ Page moved from ahk:com:internetexplorer.application to guides:com:internetexplorer.application geekguides:com:internetexplorer.application [2022-02-27 15:51] (current) – Adding content geek
Line 1: Line 1:
 ====== InternetExplorer.Application ====== ====== InternetExplorer.Application ======
  
-[[https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa752084(v=vs.85)]]+//Original post by [[user:jethrow]] on the [[https://www.autohotkey.com/board/topic/56987-com-object-reference-autohotkey-v11/?p=362159|AutoHotkey Archived Forums]]// 
 + 
 +---- 
 + 
 +**COM Object:** ''InternetExplorer.Application'' 
 + 
 +**Purpose:** Explore Websites 
 + 
 +**System Requirements:** General ((Internet Explorer has been removed from Windows starting with Windows 11)) 
 + 
 +**Documentation Link:** [[https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa752084(v=vs.85)|InternetExplorer object]] 
 + 
 +**Other Links:** [[http://msdn.microsoft.com/en-us/library/dd565688|NavConstants]], [[http://msdn.microsoft.com/en-us/library/ms691264|CMD IDs]], [[https://www.autohotkey.com/board/topic/47052-basic-webpage-controls-with-javascript-com-tutorial/|Basic Webpage Controls]] 
 + 
 +**Code Example:** 
 + 
 +<code AutoHotkey> 
 +;// open Standard Internet Explorer 
 +wb := ComObjCreate("InternetExplorer.Application") ;// create IE 
 +wb.Visible := true ;// show IE 
 +wb.GoHome() ;// Navigate Home 
 + 
 +;// the ReadyState will be 4 when the page is loaded 
 +while wb.ReadyState <> 4 
 +    continue 
 + 
 +;// get the Name & URL of the site 
 +MsgBox % "Name: " wb.LocationName 
 +    . "`nURL: " wb.LocationURL 
 +    . "`n`nLet's Navigate to Autohotkey.com..." 
 + 
 +;// get the Document - which is the webpage 
 +document := wb.document 
 +  
 +;// Navigate to AutoHotkey.com 
 +wb.Navigate("www.AutoHotkey.com") ;// 2nd param - see NavConstants 
 + 
 +;// the Busy property will be true while the page is loading 
 +while wb.Busy 
 +    continue 
 +MsgBox Page Loaded...Going Back Now 
 + 
 +;// Go Back 
 +wb.GoBack() 
 + 
 +while wb.Busy 
 +    continue 
 +MsgBox The page is loaded - now we will refresh it... 
 + 
 +;// Refresh the page 
 +wb.Refresh() 
 +while wb.Busy 
 +    continue 
 +MsgBox Now that the page is Refreshed, we will Select All (^a)... 
 + 
 +;// Execute Commands with ExecWB() 
 +SelectAll := 17 ;// see CMD IDs 
 +wb.ExecWB(SelectAll,0) ;// second param as "0" uses default options 
 + 
 +Sleep 2000 
 +MsgBox Now that we are done, we will exit Interent Explorer 
 + 
 +;// Quit Internet Explorer 
 +wb.Quit() 
 +</code> 
 + 
 +**Note** - Internet Explorer uses the [[http://msdn.microsoft.com/en-us/library/aa752127|iWebBrowser2 interface]]