trademaid Posted April 20, 2010 Share Posted April 20, 2010 (edited) winactiveate wont put the cursor into the section that says login. Its interment. Sometimes its on browse (see png) and sometimes its on Username Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr (any), 3=exact, 4=advanced, -1 to -4=Nocase $ret=WinActivate("Login","") ; ret = ->0x001101C8 WinWaitActive("Login","") $active=WinGetTitle("Login") ConsoleWrite("active " & $login & " ->" & $active & @crlf) sleep(3000) $ret=WinActivate("Login","") ; ret = ->0x001101C8 ConsoleWrite("send uname=" & $login & " ->" & $ret & @crlf) sleep(3000) Send("username{tab}") Edited April 20, 2010 by trademaid Link to comment Share on other sites More sharing options...
Yoriz Posted April 20, 2010 Share Posted April 20, 2010 Winactivate only make that window active not a certain control in the window, to give a control 'focus' use ControlFocus. GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF. Link to comment Share on other sites More sharing options...
trademaid Posted April 20, 2010 Author Share Posted April 20, 2010 can you please explain more some? Im not clear how it works ie Conrolfocus("login","",User name") Link to comment Share on other sites More sharing options...
MHz Posted April 20, 2010 Share Posted April 20, 2010 (edited) It is possibly, and may work. Controlfocus("Login", "", "Edit1") The "Edit1" is a guess but AutoIt Info Tool will tell you what the classnameNN is so use it to check. Edit: And your picture says that "login" is actually "Login". Titles and text is case sensitive. Corrected code to reflect this. Edited April 20, 2010 by MHz Link to comment Share on other sites More sharing options...
trademaid Posted April 20, 2010 Author Share Posted April 20, 2010 The class field under basic control window is blank. What do i do in this case? Link to comment Share on other sites More sharing options...
MHz Posted April 21, 2010 Share Posted April 21, 2010 Thanks for the picture. I googled "sunawtframe" and come up with this AutoIt topic here. Review the topic as it may have some value for you. So it looks like the window is a Java based application. AutoIt is C runtime based so Java is alien for AutoIt to recognize.If you do not what to use a 3rd party Dll as the linked topic talks about, then you maybe able to use ControlClick() and use the whole window as a control such that you use the coordinates of ControlClick() to click on the desired control. Then there is MouseClick() which can work within the window coordinates. Or perhaps Send() using TABs which is perhaps blind as the application is not always starting with consistent focus of a control as you mentioned. Link to comment Share on other sites More sharing options...
trademaid Posted April 21, 2010 Author Share Posted April 21, 2010 I had no success with controll focus, but did get control move to work. How to I figure out the coordinates of the field by username. ( i tried many guess's) C ControlClick("Login","","","left", 1, 112,111) doesnt seemt work, It returns 1 Link to comment Share on other sites More sharing options...
trademaid Posted April 21, 2010 Author Share Posted April 21, 2010 problem fixed used mouseclick command after ControlMove("Login","","",00,00) thanks all for your help. Link to comment Share on other sites More sharing options...
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