I discovered leading zeroes are being cut off of variables when using the below method. Unfortunately I don't have the time to create an autohotkey.com example, but this is a mach example of what I am doing to produce these results. Any help on this is appreciated!
EDIT: Resolved. Thanks tidbit!
Winner!
Code: Select all
My_ID := format("{:07}", My_ID) ;06 if always 7 digits long
Code: Select all
WB:=setWbCom("SSRS Report", "http://internalreporting.intranetsite") ;get pointer to specific window title and domain
ControlGetText, My_ID, Edit1, WinTitle ;My_ID = 0001235
WB.document.getElementByID("client_ID_123").Value := My_ID
;value set is 1235, cutting off leading zeroes
;***********Function*******************
setWbCom(name=false, url=false) {
; Set web browser COM pointer ; eserv_flag sets this.wb_eserv
if (!name AND !url) {
; Clear COM object
return false
}
; Set defaults. No promises.
wb:=false
For wb in ComObjCreate( "Shell.Application" ).Windows {
Try {
If ((InStr(wb.locationName, name) AND name) OR (InStr(wb.locationURL, url) AND url)) && InStr(wb.FullName, "iexplore.exe") {
return wb
}
} Catch, e {
if (e AND this.debug) {
FileAppend, % "`r`nCOM Error: " . e, % this.debug_file
}
}
}
if (debug) {
this.errorWindow("Failed to find web browser.`r`nName:`t" . name . "`r`nURL:`t" . url)
}
return false
}
return