Jump to content

Recommended Posts

Posted (edited)

Hi All,

Help required!!!!

I was using an autoit script without issues for handling login window on Chrome. But since Chrome updated to 2.29 the login window has changed and my script has stopped working. I made changes to the script but function ControlSend is now not sending the text.

The script is as follows:

sleep(10000)
WinWait("[CLASS:Chrome_WidgetWin_1]","","20")
ControlSend("[CLASS:Chrome_WidgetWin_1; Title:abc | Post - Google Chrome]", "", "[CLASS:Chrome_WidgetWin_0; INSTANCE:1]", "username{TAB}")
ControlSend("[CLASS:Chrome_WidgetWin_1; Title:abc | Post - Google Chrome]", "", "[CLASS:Chrome_WidgetWin_0; INSTANCE:1]", "password{Enter}")
 
In the above script the TAB and Enter work but the text is not typed. 
 
The earlier window (old version of Chrome) used to have different instance number for the 2 text box but the new one refers to both as Instance:1. Not sure whether this is the problem or not.
 
 
Details using SPY
 
 
>>>> Window <<<<
Title: abc | Post - Google Chrome
Class: Chrome_WidgetWin_1
Position: -9, -9
Size: 1938, 1050
Style: 0x17CF0000
ExStyle: 0x00000100
Handle: 0x0000000000120982
 
>>>> Control <<<<
Class: Chrome_WidgetWin_0
Instance: 1
ClassnameNN: Chrome_WidgetWin_01
Name:
Advanced (Class): [CLASS:Chrome_WidgetWin_0; INSTANCE:1]
ID:
Text: abc 
Position: 0, 70
Size: 1920, 971
ControlClick Coords: 866, 184
Style: 0x56300000
ExStyle: 0x00000000
Handle: 0x0000000000260894
 
>>>> Mouse <<<<
Position: 866, 245
Cursor ID: 2
Color: 0xC2C2C2
 
>>>> StatusBar <<<<
 
>>>> ToolsBar <<<<
 
>>>> Visible Text <<<<
Authentication Required
abc
 
 
>>>> Hidden Text <<<<
Edited by vm2007
Posted

Well, it MIGHT be a security update by Google. :thumbsup:

Why don't you use _IE functions instead?

[font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]

Posted

Instead of "[CLASS:Chrome_WidgetWin_1]", try :

AutoItSetOption("WinTitleMatchMode", 2)
 
WinWait(" - Google Chrome", "", 20)

Br, FireFox.

Thnx for your suggestion...i tried it but it did not work...still the same problem...The tab and Enter operations are happening but text provided is not being entered.

Posted

Well, it MIGHT be a security update by Google. :thumbsup:

Why don't you use _IE functions instead?

 

Actually i am pretty new to AutoIT.... can you please shed some light as to how i will achieve what i have mentioned using IE functions??

 

Another thing that i want to point out is that text gets entered when i use 'Send' instead of ControlSend but i have read that we should avoid using 'Send' if window is not active. 

Posted

vm2007,

Never used controlsend before but it seems like the control class should be comming from here (from Spy)

Advanced (Class): [CLASS:Chrome_WidgetWin_0; INSTANCE:1]

 

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Posted

Have you tried ControlSetText for sending text? I have having issues with ControlSend for text until I used ControlSetText.

 

No i haven't tried it....can you please show me an example of how to use it....thnx

Posted

No i haven't tried it....can you please show me an example of how to use it....thnx

Here is what I am using to enter my solution data into my Heat ticket that I have saved from a listbox. I've added some comments to explain what I did. Hope this helps!

$Solution = GUICtrlRead($Desc, MouseGetPos(0) & ", " & MouseGetPos(1)) ;Used to select the item in my listbox
    ClipPut($Solution) ;copies the data
    ControlSetText("Call Logging - Work Group", "", "[CLASS:Edit; INSTANCE:3]", $Solution)

;here we have the command ControlSetText.
;I want to select the title of the window I have open which is Call Logging - Work Group.
;Then the text which is just ""
;Next is the class and instance
;Then finally the data from $Solution which is pulled from my listbox.

;All of this information is found with the AutoIt Window Info tool.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...