3

We deploy machines with GoToMyPC on them. Each has to be registered individually and until Windows 10 we were able to do this via AutoIt.

With Windows 10 we can select the registration window but are unable to Send() keystrokes to the Email address field. I've selected the control by Class, Instance, ClassnameNN, and [CLASS; INSTANCE] all to no avail. send() -ing text still works (verified with Notepad and a non-Microsoft program), so it seems specific to GoToMyPC.

I included #RequireAdmin and ran the compiled executable as Administrator; no dice. Here's the code :

WinActivate("Authenticate - GoToMyPC") 
WinMove("Authenticate - GoToMyPC", "", 0, 0) 
Send("email@address")
ControlSend("Authenticate - GoToMyPC". "", "[CLASS:Edit; INSTANCE:1]", "email@address")

How to get around it?

user4157124
  • 2,809
  • 13
  • 27
  • 42
klaauser
  • 39
  • 1
  • Will the machines be unused while the script is running? If not, you can move the window to a certain spot and just hijack the mouse to move and click at a certain coordinate point (e.g. inside the e-mail field) and then `send()` should work once the field is active. – TylerH Jan 28 '16 at 19:26
  • e.g. `WinMove("GoToMyPC Registration", "", 0, 0, 1020, 600, 1)` or something to move the window to the top left of your screen, then use the Window Info tool to find the Mouse coordinates of the email field. – TylerH Jan 28 '16 at 19:27
  • It's probable that the machine will be unused - i'll give it a try - my worry was that if there's a different resolution or something the window wouldn't open in the exact same spot but if I move it.... EDIT: It won't move the window either... – klaauser Jan 28 '16 at 19:45
  • You're unable to move based on the window title at all? If that's the case it may be that Windows 10 is not usable with AutoIt, if basic hooks like that aren't working. Can you add a screenshot of the window you're trying to manipulate and the code (you can sanitize any personal info, of course) you're using to do so? – TylerH Jan 28 '16 at 20:14
  • @TylerH `WinActivate ("Authenticate - GoToMyPC") WinMove("Authenticate - GoToMyPC") send("email@address") ControlSend("Authenticate - GoToMyPC"."","[CLASS:Edit; INSTANCE:1]","email@address")` Edit: this is awkward - let's pretend I know how to format things properly. Working on the screenshot - also other things work in Win 10 (sending text to notepad and cmd) found a img of it online: http:// www. lescasse.com/images/UsingGoToMyPC4.jpg – klaauser Jan 28 '16 at 20:35
  • In order to use the `WinMove()` command, you need to input destination coordinates. See https://www.autoitscript.com/autoit3/docs/functions/WinMove.htm for more info. Try `WinMove("Authenticate - GoToMyPC", "", 0, 0)` to move it to the top left corner of the browser window. Then you can use something like `MouseClick("", 70, 150, 1, 1)` to hijack the mouse to manually click inside the e-mail field, and continue from there. – TylerH Jan 28 '16 at 21:08
  • Sorry I transcribed wrong (running an an isolated vm with no tools - can't copy/paste). The command I'm using is exactly what you typed. Still doesn't move the window. – klaauser Jan 28 '16 at 21:19
  • Are you able to move the window manually with your mouse? I'm not sure what else to try. You could still hijack the mouse to click into the field, but if the different machines you're registering have different resolutions then the window will be in different locations depending on the machine resolution, which is too risky, in my opinion. – TylerH Jan 28 '16 at 21:24
  • I can - definitely seems to be isolated to just GoToMyPC... I replicated the setup on another machine and it's doing the same thing. Frustrating... – klaauser Jan 28 '16 at 21:27
  • Already there too - will definitely post back here if I find anything useful. As a note-I even just attempted to open the on-screen keyboard and simulate mouse clicks there and it won't type in the box... definitely something funky going on – klaauser Jan 28 '16 at 21:54

0 Answers0