Whats the page <title> of your web application?
Code: Select all
title := "My web app title"
;url := "http://192.168.0.1"
wb := IEGet(title) ;connects to open window by title
/*
if !wb
wb := ComObjCreate("InternetExplorer.Application") ; opens new window
wb.visible := true
wb.Navigate(url)
*/
while wb.readyState != 4
Sleep, 10
wb.document.getElementByID("quoteDetail_copyquote").click()
return
IEGet(name="") {
IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame ;// Get active window if no parameter
Name := (Name="New Tab - Windows Internet Explorer")? "about:Tabs":RegExReplace(Name, " - (Windows|Microsoft)? ?Internet Explorer$")
for wb in ComObjCreate("Shell.Application").Windows()
if wb.LocationName=Name and InStr(wb.FullName, "iexplore.exe")
return wb
}
Tiredness kills scripting ability, check that you are using:
wb
.document.getElementByID("quoteDetail_copyquote").click()
As I made that error in my first example.
Also if you use this version of IEGet() it should connect you to the active tab when you don't provide a title
Code: Select all
wb := IEGet()
IEGet(Name="") ;Retrieve pointer to existing IE window/tab
{
IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame
Name := ( Name="New Tab - Windows Internet Explorer" ) ? "about:Tabs"
: RegExReplace( Name, " - (Windows|Microsoft) Internet Explorer" )
For wb in ComObjCreate( "Shell.Application" ).Windows
If ( wb.LocationName = Name ) && InStr( wb.FullName, "iexplore.exe" )
Return wb
; Below added for when no tab name/page title provided ~ ameyrick
If InStr( wb.FullName, "iexplore.exe" )
Return wb
} ;Original IEGet() written by Jethrow