LinkedIn YouTube Twitter Mail
LinkedIn YouTube Twitter Mail
the-Automator
Work Smarter, Not Harder!
  • AutoHotkey and Udemy
 
Skip to content
  • Home
  • AutoHotkey
    • AutoHotkey Books
    • AutoHotkey Products
    • AutoHotkey Webinars
    • AHK Podcasts
    • The ultimate list of AutoHotkey Resources
    • AutoHotkey Functions
    • Controls in AutoHotkey
    • Regular Expressions in AutoHotkey
    • Quick Access Popup
    • IE & AutoHotkey
    • Outlook & AutoHotkey
  • APIs
  • Automate my Task
  • Chrome
  • Web Scraping
  • Excel
  • AHK Studio
  • SciTE
  • Contact the-Automator
    • Joe Glines BIO
    • Automation Resources
    • AutoHotkey Alerts
    • Privacy Policy
    • Terms and Conditions
  • AutoHotkey Courses
Home Posts tagged "automate website"

Tag: automate website

Automate the Login to Pinterest with AutoHotkey

In this 5th video of my automating website logins with AutoHotkey I demonstrate how to login to Pinterest.

In this video I move quickly covering the topics (as much of process is covered in-depth in earlier videos.

There was one difference in this video.  The submit button on Pinterest does not have a name or ID so I used classname.

Check this page for the other scripts I used in the video.

Login to Pinterest with AutoHotkey

AutoHotkey Merchandise-White Stress ballThe AutoHotkey script to login to Pinterest is here:

#SingleInstance, Force
Browser_Forward::Reload ;RControl::
Browser_Back::
;************************************************************
pwb := WBGet()
;~  MsgBox % pwb.locationURL
If (pwb.locationURL !="https://www.pinterest.com/login/?referrer=home_page"){
pwb.Navigate("https://www.pinterest.com/login/?referrer=home_page") ;Navigate to URL
while pwb.busy or pwb.ReadyState != 4 ;Wait for page to load
	Sleep, 100
}
pwb.document.GetElementsByName("id")[0].Value :="[email protected]" ;Object Name- Set array value
Sleep,50
pwb.document.GetElementsByName("password")[0].Value :="The_Stupidist_Password!" ;Object Name- Set array value
Sleep,50
pwb.document.getElementsByClassName("red SignupButton active")[0].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)
      }
   }
}

 

May 3, 2017 September 4, 2019AutoHotKey, COM, Web Scraping automate login, automate website, login automatically, login to Pinterest, login to website, web scraping
  • Learn AutoHotkey
  • Categories

Powered by Tempera & WordPress.
the-Automator

Privacy Policy - Terms and Conditions