Ram Posted August 24, 2023 Share Posted August 24, 2023 I have a few sets of Gmail usernames and passwords. I would like to put this in Excel and login automatically and then logout. So, to do this, I tried the following: include <IE.au3> $sEmail = 'myemail@gmail.com' $sPassword = 'mypassword' $oIE = _IECreate("https://accounts.google.com/v3/signin/identifier?continue=https%3A%2F%2Fmail.google.com%2Fmail%2Fu%2F0%2F&emr=1&followup=https%3A%2F%2Fmail.google.com%2Fmail%2Fu%2F0%2F&ifkv=AXo7B7XEtHvS8E8suL3AtSORCeEhHobAax8QWPWZFECFcts4FxgLwEO_NyB8UzC88KmQlJgseWt6Ww&osid=1&passive=1209600&service=mail&flowName=GlifWebSignIn&flowEntry=ServiceLogin&dsh=S-703882919%3A1692811483921521#inbox") GMailSubmitFormElement($oIE, 'identifier', $sEmail) GMailSubmitFormElement($oIE, 'password', $sPassword) Sleep(10000) _IEQuit($oIE) Func GMailSubmitFormElement($oIE, $sElement, $sValue, $iTimeout = 10, $iDelay = 1) $Timer = TimerInit() Do $oForm = _IEFormGetCollection($oIE, 0) $oElement = _IEFormElementGetObjByName($oForm, $sElement) Sleep($iDelay * 1000) Until IsObj($oElement) Or TimerDiff($Timer) >= $iTimeout * 1000 _IEFormElementSetValue($oElement, $sValue) $oViewContainer = _IEGetObjById($oIE, 'view_container') $oSpans = _IETagNameGetCollection($oViewContainer, 'span') If IsObj($oSpans) Then For $oSpan In $oSpans If StringInStr($oSpan.innerText, 'Next') Then Sleep(5000) ; Add a delay of 5 seconds before clicking "Next" $oParentElement = $oSpan.parentElement _IEAction($oParentElement, 'click') ; Click the parent element of the span ExitLoop EndIf Next EndIf EndFunc The username is entered properly, but the script is not able to find the "Next" text button. So the script keeps giving the below warning and error message. How to fix this? Quote --> IE.au3 V3.1-0 Warning from function _IEFormElementGetObjByName, $_IESTATUS_NoMatch --> IE.au3 V3.1-0 Warning from function _IEFormElementGetObjByName, $_IESTATUS_NoMatch --> IE.au3 V3.1-0 Warning from function _IEFormElementGetObjByName, $_IESTATUS_NoMatch --> IE.au3 V3.1-0 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType --> IE.au3 V3.1-0 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (view_container) --> IE.au3 V3.1-0 Error from function _IETagNameGetCollection, $_IESTATUS_InvalidDataType Let me know! Thanks! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 24, 2023 Moderators Share Posted August 24, 2023 Ram, And from where did you get this list and why are you looking to login to them all? M23 PS: Mod hat on - everyone else stay out please. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Ram Posted August 24, 2023 Author Share Posted August 24, 2023 I am trying to get it from an Excel file, but for now, I want to try it out with one email. Recently, Google sent an email about the Google account Inactivity policy; I think if a particular account is not logged in before December 1st they will deactivate the account. I have like 10 different accounts + I have my workspace account to manage hence I am trying to do faster and not waste time by logging in, etc. Tried it using Python but I wasn't able to login further because of automation detection. Thanks! Link to comment Share on other sites More sharing options...
Andreik Posted August 24, 2023 Share Posted August 24, 2023 For real? To log in a single account it takes like one minute. For ten accounts it's like 10 minutes but you try to automate this instead without having the required knowledge. I don't know man, it's sketchy. Not what a normal people will do. Since you posted the question you could have log in hundreds of accounts manually. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Ram Posted August 24, 2023 Author Share Posted August 24, 2023 Sure. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 24, 2023 Moderators Share Posted August 24, 2023 Andreik, Which bit of "everyone else stay out please" did you not understand? Please do not do this again. Ram, Not a good enough explanation. You only need to activate a Google account every year or so - for 10 personal accounts I do not see this as an onerous task , so you just do it manually. Thread closed. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Developers Jos Posted August 24, 2023 Developers Share Posted August 24, 2023 This is actually a common item of the OP when looking at the history for quite some time now! SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts