Created
April 22, 2021 13:48
-
-
Save JoeGlines/72bcfab93da7faf82369ad18c673731f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;******************************************************* | |
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY | |
; Right now you can get a coupon code here: https://the-Automator.com/Learn | |
#SingleInstance, Force | |
Browser_Forward::Reload ;RControl:: | |
Browser_Back:: | |
;************************************************************ | |
pwb := WBGet() | |
;~ MsgBox % pwb.LocationURL | |
if (pwb.locationURL !="https://smile.amazon.com/"){ | |
pwb.Navigate("https://smile.amazon.com/") ;Navigate to URL | |
while pwb.busy or pwb.ReadyState != 4 ;Wait for page to load | |
Sleep, 100 | |
} | |
var:=pwb.document.getElementByID("ap_signin1a_email_row").GetElementsByTagName("Input")[0].OuterHTML | |
SciTE_Output(var) | |
loop, % pwb.document.GetElementsByTagName("Input").length | |
MsgBox % A_Index-1 A_tab pwb.document.GetElementsByTagName("Input")[A_Index-1].OuterHTML | |
MsgBox % pwb.document.GetElementsByTagName("Input")[2].OuterHTML | |
pwb.document.all.ap_password.Value :="gobblygook" ;Unique ID -no dashes | |
pwb.document.all.signInSubmit.click() | |
;************Pointer to Open IE Window****************** | |
WBGet(WinTitle="ahk_class IEFrame", Svr#=1) { ;// based on ComObjQuery docs | |
static msg := DllCall("RegisterWindowMessage", "str", "WM_HTML_GETOBJECT") | |
, IID := "{0002DF05-0000-0000-C000-000000000046}" ;// IID_IWebBrowserApp | |
;// , IID := "{332C4427-26CB-11D0-B483-00C04FD90119}" ;// IID_IHTMLWindow2 | |
SendMessage msg, 0, 0, Internet Explorer_Server%Svr#%, %WinTitle% | |
if (ErrorLevel != "FAIL") { | |
lResult:=ErrorLevel, VarSetCapacity(GUID,16,0) | |
if DllCall("ole32\CLSIDFromString", "wstr","{332C4425-26CB-11D0-B483-00C04FD90119}", "ptr",&GUID) >= 0 { | |
DllCall("oleacc\ObjectFromLresult", "ptr",lResult, "ptr",&GUID, "ptr",0, "ptr*",pdoc) | |
return ComObj(9,ComObjQuery(pdoc,IID,IID),1), ObjRelease(pdoc) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment