mendrofa Posted September 9, 2016 Posted September 9, 2016 how to make script switching real account to virtual account this my script expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <IE.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 203, 133, 192, 124) $Combo1 = GUICtrlCreateCombo("VIRTUAL", 41, 8, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "REAL") $Button1 = GUICtrlCreateButton("START", 8, 96, 179, 25) $Label1 = GUICtrlCreateLabel("EMAIL", 8, 40, 36, 17) $Label2 = GUICtrlCreateLabel("password", 8, 64, 49, 17) $Input1 = GUICtrlCreateInput("marinus.mendrofa2121@gmail.com", 64, 36, 121, 21) $input2 = GUICtrlCreateInput("Marinus123", 64, 64, 121, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select case $nMsg = $Button1 jalan() Case $nMsg = $GUI_EVENT_CLOSE Exit EndSelect WEnd func jalan() Local $url = "https://oauth.binary.com/oauth2/authorize?app_id=1&l=ID" $oie = _IECreate($url) $email1 = GUICtrlRead($input1) $password1 = GUICtrlRead($input2) Sleep(1000) Do $o_email = _iegetobjbyid($oie, "txtEmail") If $o_email = "invalid" Then Do $o_logout = _iegetobjbyid($oie, "btn_logout") Until IsObj($o_logout) _ieaction($o_logout, "click") Sleep(1000) _ieloadwait($oie) Sleep(3000) _ienavigate($oie, $url) _ieloadwait($oie) Sleep(2000) EndIf Until IsObj($o_email) _ieaction($o_email, "focus") $o_email.value = $email1 Sleep(500) Do $o_password = _iegetobjbyid($oie, "txtPass") Until IsObj($o_password) _ieaction($o_password, "focus") $o_password.value = $password1 Do $o_login = _iegetobjbyid($oie, "btnLogin") Until IsObj($o_login) _ieaction($o_login, "click") Sleep(1000) _ieloadwait($oie) if GUICtrlRead($combo1) = "VIRTUAL" Then ;?????????????????? ; what must i do? EndIf EndFunc
AutoBert Posted September 9, 2016 Posted September 9, 2016 what's a virtua account? If it's just a second account do same as you done with first account.
pluto41 Posted September 9, 2016 Posted September 9, 2016 For starters you need to make some changes in the while 1 loop. See my example. While 1 $nMsg = GUIGetMsg() Select case $nMsg = $Button1 Local $sComboRead = GUICtrlRead($Combo1) Select Case $sComboRead = "VIRTUAL" Msgbox ( 0, "VIRTUAL", "VIRTUAL SELECTED" ) ; Call a Virtual () account function Case $sComboRead = "REAL" Msgbox (0, "REAL", "REAL SELECTED") ; call the Jalan () function EndSelect Case $nMsg = $GUI_EVENT_CLOSE Exit EndSelect WEnd
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now