Jump to content

xtrm

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by xtrm

  1. if you dont get it to work paste your example and we could look into it
  2. ;final working script: ;------------------------- I remember the script can be improved a lot, there are some things which could be skip. Also make sure you change the **** with the necessary text of your window. $pass = "123456" ;your password $a = "" ;getting focus of active windows by title which are hard to be focused ;script can be improved, seems to work nice most of the times :) ;the script has to be improved ;sending the handle of a window and checking if exist Func IsVisible($handle) If BitAnd( WinGetState($handle), 1 ) Then Return 1 Else Return 0 EndIf EndFunc While 1 $var = WinList() ;needs to be here to refresh each time the array list of windows ;loop to check all the active windows For $i = 1 to $var[0][0] ;checking if it is our window, **CHECK YOUR TEXT IN TASKBAR If ($var[$i][0] == "Credenciales de Microsoft Office Outlook" OR $var[$i][0] == "Conectar a ****") AND IsVisible($var[$i][1]) Then ;messagebox test to check script errors ;MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1]) ;set the window attribute on top WinSetOnTop ("Conectar a ****", "", 1 ) ;show the window in case its hidden WinSetState ( "title", "text", @SW_SHOW ) ;while we have focus on the window While (WinActivate ( "Conectar a ****", "" ) ) ;if we got focus to the window, then we set focus to the textbox and finally send the text clearing it before. If (WinActive ("Conectar a ****", "") ) Then ;setting textbox focus ;$a = ControlGetText("Conectar a ****", "", 1005) ;MsgBox(0, "Details", "a = " & $a) ;clear textbox if it has something ;If ($a = "" ) Then ;its already clear ;clear and send text to the passwordbox identified by ID (1005). ;MsgBox(0, "Details", "no text found, found:" & $a) ;this password box doesnt allow to check its content so we will have to clear everytime and put the password ControlSetText("Conectar a ****", "", 1005, "") ;clear the text ControlSend("Conectar a ****", "", 1005, $pass & "{ENTER}") ;sending the password ;second alternative method to send text to the password box, --less secure. ;Clipput("") ;clean clipboard memory ;ClipPut($pass) ;send text to the clipboard ;Send("^V") ;Send("{ENTER}") ;Else ;the textbox if not clear, and we must clear it before sending text. ;ControlSend must clear the textbox before adding more text. ;MsgBox(0, "Details", "text found!!") ;ControlSetText("Conectar a ****", "", 1005, "") ;ControlSend("Conectar a ****", "", 1005, $pass) ;EndIf ;if the window is found and info has been sent to the control, wait more seconds to search for the windows again Sleep(20000) EndIf WEnd EndIf ;Clipput("") ;clean clipboard memory if second method has been used Next Sleep(1000) WEnd
  3. well im not sure about this but maybe PRoccess Guard could warn about key spying, check diamondcs web.
  4. Ive tested the scripts and works as you said, so there seems not to be a directly way to check for the content of a restricted box like a password box. *btw congrats for your 1000 posts
  5. hello, I have a problem with a password edit box. I can input text into the password box but I cannot delete the text sending "". Seems the password box disables some properties or has different properties than a normal edit box when its focused. The following command did not work for me: ControlSend("Connecting to **********", "", "Edit3", "")oÝ÷ ÚØb²+&ÉÊ&¦W­zÇ+p'!ëlj§vW­¡¬"Ú0§ʭç(w¶)à¢÷«¶§zÚ+iDzȧZjW¦j)^ÅÈZ¬z»Þ¯brÞªè«zËaz)éºÚ¶©jË0¢·^½êò¶)y²q«jëh×6 $pass = "12345" $a = "" ;getting focus of active windows by tittle which are hard to be focused ;the script can be improved a lot and there is a bit of garbage, but seems to work nice most of the times :) ;sending the handle of a window and checking if exist Func IsVisible($handle) If BitAnd( WinGetState($handle), 1 ) Then Return 1 Else Return 0 EndIf EndFunc While 1 $var = WinList() ;needs to be here to refresh each time the array list of windows ;loop to check all the active windows For $i = 1 to $var[0][0] ;checking if it is our window If ($var[$i][0] == "Credenciales de Microsoft Office Outlook" OR $var[$i][0] == "Conectar a ******") AND IsVisible($var[$i][1]) Then ;messagebox test to check script errors ;MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1]) ;set the window attribute on top WinSetOnTop ("Conectar a ******", "", 1 ) ;show the window in case its hidden WinSetState ( "title", "text", @SW_SHOW ) ;while we have focus on the window While (WinActivate ( "Conectar a ******", "" ) ) ;if we got focus to the window, then we set focus to the textbox and finally send the text clearing it before. If (WinActive ("Conectar a ******", "") ) Then ;setting textbox focus $a = ControlGetText("Conectar a ******", "", "Edit3") MsgBox(0, "Details", "a = " & $a) ;clear textbox if it has something, DOESNT WORK!!!, finds "" everytime maybe because of the password properties If ($a = "" ) Then ;its already clear ;send text to the textbox identified by Edit3. MsgBox(0, "Details", "no text found, found:" & $a) ControlSend("Conectar a ******", "", "Edit3", $pass) ControlSend("Conectar a ******", "", "Edit3", "") ;alternative method to send text, --less secure. ;Clipput("") ;clean clipboard memory ;ClipPut($pass) ;send text to the clipboard ;Send("^V") ;Send("{ENTER}") Else ;the textbox if not clear, and we must clear it before sending text. ;ControlSend must clear the textbox before adding more text. MsgBox(0, "Details", "text found!!") ControlSend("Conectar a ******", "", "Edit3", "") ControlSend("Conectar a ******", "", "Edit3", $pass) EndIf ;if the window is found and info has been sent to the control, wait more seconds to search for the windows again Sleep(5000) EndIf WEnd EndIf Clipput("") ;clean clipboard memory Next Sleep(3000) WEnd (I used ****** instead of my personal info) Autoit Window Info of the password box (Edit 3): --------------------------------------------------------- >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Connecting to *************** Class: #32770 Size: X: 495 Y: 346 W: 326 H: 289 >>>>>>>>>>> Mouse Details <<<<<<<<<<< Screen: X: 665 Y: 517 Cursor ID: 5 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB: Hex: 0xFFFFFF Dec: 16777215 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: X: 116 Y: 134 W: 169 H: 20 Control ID: 1005 ClassNameNN: Edit3 Text: Style: 0x500100A0 ExStyle: 0x00000204 >>>>>>>>>>> Status Bar Text <<<<<<<<<<< >>>>>>>>>>> Visible Window Text <<<<<<<<<<< Connecting to *************** &User: *********** ?? *********** &... &Password: &Remember Password Aceptar Cancelar >>>>>>>>>>> Hidden Window Text <<<<<<<<<<< the problem: (Edit3 = password box) ----------------------- $a = ControlGetText("Conectar a ******", "", "Edit3") finds everytime "", you can type anything in the password field but only "" will be return the control E which select all the text doesnt work here. there could be a fix but i dont like it very much, and its just with ALT C in my case, which will automaticaly set focus to the box because its the predefined key, and then deleting the selection with {BACKSPACE}. any help is welcome thanks
×
×
  • Create New...