Sign in to follow this  
Followers 0
baconismidog

ControlSend on a Locked Workstation

5 posts in this topic

#1 ·  Posted (edited)

I am trying to login to a webpage. This code works on an unlocked workstation. On a locked workstation when it tries to paste (^v) it just sends the v to the email (and I believe the password - it's obfuscated) input boxes. $ChromeTitle is the title of the window given by the Autoit Info tool. $SingleEmail is taken from an inifile. The sleep (200) were necessary or the pasting wouldn't paste the whole email (or password). The Tabs and all work, but it won't paste the clipped data. It won't send the raw data (without using ClipPut) either. 

WinSetState ($ChromeTitle, "", @SW_SHOW)
        WinSetOnTop ($ChromeTitle, "",1)
        WinActivate ($ChromeTitle, "")
            ClipPut ($SingleEmail)
            Sleep (200)
            ClipGet ()
            Sleep (200)
            ControlSend ($ChromeTitle,"","","^v")
                Sleep (500)
                    ControlSend ($ChromeTitle,"","","{Tab}")
                        Sleep (500)
                            ClipPut ($SinglePassword)
                            Sleep (200)
                            ClipGet ()
                            Sleep (200)
                            ControlSend ($ChromeTitle,"","","^v")
                            ClipPut ("")
Edited by baconismidog

Share this post


Link to post
Share on other sites



Did you try predefining the Email and Password in a variable and then sending it to the locked workstation in stead of using paste?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Did you try predefining the Email and Password in a variable and then sending it to the locked workstation in stead of using paste?

Those are variables. They're pulled from the ini and dropped into $SingleEmail and $SinglePassword in a while/wend loop. Sending them w/o clipput also only sends one keystroke to a locked workstation AND on some slow workstations the @ in the email address will end up as a "2" when the workstation is unlocked (so paste is preferred).

Look here

http://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F

In ControlSend() specify ControlClassNameNN (third parameter) instead of empty string.

There is no Control name for the window. There used to be one (  [CLASSNN:Chrome_RenderWidgetHostHWND1]  ) but recently it disappeared and the script stopped working so I had to blank it out to make it work. I know that sounds strange but it really happened. Either that or the AutoInfo proggy in Scite is broken somehow.  

Either way, with or without the control name it is finding the control and sending something, it's just the wrong something. 

Sorry to shoot down your ideas, I REALLY appreciate them but this has me stumped. I mean, it's finding the window and sending input but it's sending the bare character instead of the command that the modifier (^) should distinguish. 

Edited by baconismidog

Share this post


Link to post
Share on other sites

No thoughts guys?  :ermm:

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0