Jump to content

Recommended Posts

Posted (edited)

If you press the "Login" button in the top-left of https://www.showroom-live.com/, it creates a popup in which you press "Login with Twitter ID", which then opens a new window with an "Authorize app" button.

None of these 3 buttons have a Name or ID, so how do I click on them, because _IEGetObjByName / _IEGetObjByID will not work.

Here are the sources of the 3 buttons:

;Login button.
   ;<a onclick="showLoginDialog();" href="javascript:void(0);">Login</a>

   ;Twitter button (Note that I am already signed into Twitter and just need to Authorize it).
   ;<a class="btn-twitter btn-sky-blue submit fs-b5" onclick="window.open('/social/twitter/redirect_authorize_url?login=1&from_browser=1', 'twitter', 'width=500,height=400,menubar=yes,status=yes,scrollbars=yes');" href="javascript:void(0);">Login with Twitter ID</a>

   ;Popup window appears.
   ;<input class="submit button selected" id="allow" type="submit" value="Authorize app">

I have also tried:

Local $oLinks = _IETagNameGetCollection($ie, "a")
For $oLink In $oLinks
   If $oLink.InnerText = "showLoginDialog()" Then
      _IEAction($oLink, "Click")
      ExitLoop
   EndIf
Next

I've even tried adding "showLoginDialog()" and "javascript:void(0)" to the end of the URL, but as expected, that wouldn't work either.

My goal is something like this:

#include <IE.au3>

Local $ie = _IECreate("https://www.showroom-live.com/onlive")
_IELoadWait($ie)

Local $originalHandle = $ie

;===Functions==========================================================
Func login()
   ;Source: <a onclick="showLoginDialog();" href="javascript:void(0);">Login</a>
   _IEAction(ABOVESOURCE, "Click")
   
   ;Source: <a class="btn-twitter btn-sky-blue submit fs-b5" onclick="window.open('/social/twitter/redirect_authorize_url?login=1&amp;from_browser=1', 'twitter', 'width=500,height=400,menubar=yes,status=yes,scrollbars=yes');" href="javascript:void(0);">Login with Twitter ID</a>
   _IEAction(ABOVESOURCE, "Click")

   ;New window appears for Twitter sign in, but the URL is locked.
   ;Source: <input class="submit button selected" id="allow" type="submit" value="Authorize app">
   _IEAttach($ie, ABOVEHANDLE) ;How do I get the handle of the new window from above?
   _IEAction(ABOVESOURCE, "Click")
   _IEAttach($ie, $originalHandle)
EndFunc
;======================================================================

;===Code===============================================================
login()
;======================================================================

 

Thank you in advance.

Edited by IAMK
Posted

Maybe something more like, not tested.

If StringInstr($oLink.ClassName, "showLoginDialog") <> 0 Then
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...