Ronster Posted April 24, 2019 Posted April 24, 2019 I would like to create an auto login program using mouseclicks, controlclicks only, or whatever is required to send characters from Windows 10 On-Screen Keyboard to a User/Password login form. I thought I would start with OSK to NotePad. Using mouseclicks to enter ID/Password seems more secure than typing plain text. Seems like if I can get that to work I should be able to send the characters to any login form. I have tried many things but cannot send a character(s) from OSK to Notepad. Of course manually works great. Here is some code I have tried: ControlGetFocus ("Untitled - Notepad") ; go to Notepad window MouseMove(649, 206 , 0) ;move to Notepad, then click below Sleep (1000) MouseClick($MOUSE_CLICK_LEFT,"left") ControlGetFocus ("On-Screen Keyboard") ; go to OSK window then click on a character key MouseMove(642, 807 , 0) ;letter - t Sleep (1000) MouseClick($MOUSE_CLICK_LEFT,"left") OR ControlClick("On-Screen Keyboard","","[CLASS:OSKMainClass]","left","",642, 807) The above move to the correct position and appear to click but focus is lost to Notepad. Any help would be appreciated.
FrancescoDiMuro Posted April 25, 2019 Posted April 25, 2019 @Ronster Instead of using Mouse* functions, you could directly use ControlSetText() Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
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