Skip to content
the-Automator
the-Automator
Work Smarter, Not Harder!
  • header banner
Skip to content
  • Home
  • About Us
    • Contact the-Automator
    • Schedule a Meeting
    • About Us – Learn about the-Automator team
    • Privacy Policy
  • Services
    • Access Pass – Get access to all our downloads <$5
    • AHK Mastery Subscription to AHK Courses
    • Project Work
    • Consultations
    • Tutoring
  • AI
  • Tools by Task
  • AHK Resources
    • Automation Resources
    • AHK Merchandise
    • AHK Newsletter
    • AHK Editors
      • AHK Script Maker
      • VS Code
      • AHK Studio
      • Notepad++
      • SciTE
    • AHK Resources
      • AHKCon / First ever AutoHotkey Conference
      • AutoHotkey Products
      • AutoHotkey Webinars
      • AHK Podcasts
      • The ultimate list of AutoHotkey Resources
    • AutoHotkey By Topic
      • APIs
      • AutomateMyTask
      • AutoHotkey Functions
      • COM
      • Controls in AutoHotkey
      • Downloads
      • Excel
      • Regular Expressions in AutoHotkey
      • Snipping Tool
      • Web Scraping
      • Outlook & AutoHotkey
  • ➡️Access Your Courses⬅️
    • General
    • Autohotkey v2
    • AutoHotkey v1
  • Login
  • We use AI to build automation that gives you your time back. 🤖 Tools, training and custom work.

    New here❓

    Start Here

    Discover Our

    Courses

    Schedule

    a meeting

    Downloads

    Browse by Task

    Testimonials

    Using AI❓

    AI Tools

Home Posts tagged "login to Reddit"

Tag: login to Reddit

Automating the login to Reddit with AutoHotkey

Woman holding a green-and-white Schüttelbecher-style bottle outdoors, with a label reading Schüttelbecher on the front Wait, let me correct that toThis is the 7th video in my series of automating logging into websites with AutoHotkey.   In this tutorial I show how to login to Reddit.Reddit mobile app login screen with username and password fields and a Login button

In this video we had a small hiccup where I used the classname and had assumed it was unique.  Turns out the there was another button on the page with the exact same classnames!  It was not a big issue, but definitely a good example of how you need to troubleshoot/test your code!

Below is the video showing how I automated the login to Reddit with AutoHotkey

AutoHotkey Merchandise-White Stress ball

AutoHotkey Script to Login to Reddit

#SingleInstance, Force
Browser_Forward::Reload ;RControl::
Browser_Back::
pwb := WBGet()
If (pwb.locationURL!="https://www.reddit.com/login"){
 pwb.Navigate("https://www.reddit.com/login") ;Navigate to URL
while pwb.busy or pwb.ReadyState != 4 ;Wait for page to load
	Sleep, 100
}
pwb.document.all.user_login.Value :="joetazz" ;Unique ID -no dashes
pwb.document.all.passwd_login.Value :="The_Stupidist_Password!" ;Unique ID -no dashes
pwb.document.all.rem_login.checked :=1 ;Set Tagname and Array value
pwb.document.getElementsByClassName("c-btn c-btn-primary c-pull-right")[1].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 August 4, 2026AutoHotKey, COM, Web Scraping auto login, login to Reddit, login to website, web scraping, webscraping, website automation
  • Account

    • Register
    • Log in
    • My Account
    • Create BMP File with GDIP and AutoHotkey Create A Bitmap With GDIP in AutoHotkey v1
LinkedIn YouTube Twitter Mail
Powered by Tempera & WordPress.
Welcome

It looks like you are new to the-Automator!

In the top right corner of the page, you can access the welcome guide.