Jump to content

Faraz

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Faraz

  1. I have to open a URL on Mozilla Firefox , cursor is by default userid textbox, had to send userid, send tab, send pwd with flag 1 , send tab, send Enter. But Script is Failing to take Password. Any Help #include <Constants.au3> #include <IE.au3> #include <PassMask.au3> If $CmdLine[0] <> 3 Then MsgBox($MB_OK, "Usage", "ps_weblogin_FireFox <Url> <Browser Title> <Text to Send>") Else web_login($CmdLine[1], $CmdLine[2], $CmdLine[3]) EndIf Func web_login($bt_url, $bt_Title, $bt_SendText) Local $ff = Run("C:\Program Files (x86)\Mozilla Firefox\firefox.exe " & $bt_url) WinWaitActive($bt_Title) Sleep(2000) ControlSend("","","",$bt_SendText) EndFunc _______________________________________________ _______________________________________________ Func Mask_Password($Password) $MaskPassword = $Password $MaskPassword = StringReplace($MaskPassword, "#", "||||||#@@@@@@") $MaskPassword = StringReplace($MaskPassword, "!", "||||||!@@@@@@") $MaskPassword = StringReplace($MaskPassword, "+", "||||||+@@@@@@") $MaskPassword = StringReplace($MaskPassword, "^", "||||||^@@@@@@") $MaskPassword = StringReplace($MaskPassword, "{", "||||||{@@@@@@") $MaskPassword = StringReplace($MaskPassword, "}", "||||||}@@@@@@") $MaskPassword = StringReplace($MaskPassword, "||||||", "{") $MaskPassword = StringReplace($MaskPassword, "@@@@@@", "}") Return $MaskPassword EndFunc
  2. Actually i am not storing the credentials we are using cmd to pass URL , Username and password via this script, i m testing it via cmd u can see in second snapshot
  3. I am trying to insert the credentials in an application which accepts the URL in IE URL bar against which it Opens a Windows Security popup in which credentials are filled , WHich i m unable to achieve via my Code , which worked twice but now it is not functioning as meant to be. Review the Code and the Snapshot attached #include <Constants.au3> #include <IE.au3> If $CmdLine[0] <> 3 Then MsgBox($MB_OK, "Usage", "ps_ASDM <url> <username> <password>") Else asdm_login($CmdLine[1], $CmdLine[2], $CmdLine[3]) EndIf Func asdm_login($url, $username, $password) Local $ie = _IECreate($url) sleep(1000) If VarGetType($ie) == "Object" Then $hwnd = _IEPropertyGet($ie, "hwnd") WinSetState($hwnd, "", @SW_MAXIMIZE) WinWaitActive("Windows Security") $hwnd = WinGetHandle("Windows Security") ;sleep (1000) ;send("{Tab}") ;Send($ip) ;Send("{Tab}") ControlSend($hWnd, "", "", $username) Send("{Tab}") ControlSend($hWnd, "", "", $password, 1) Send("{Tab}") Send("{Tab}") ;Send("{Tab}") Send("{Enter}") EndIf EndFunc ;==>winscp_login()
×
×
  • Create New...