Jump to content

controlsettext not setting text but successful


smcombs
 Share

Recommended Posts

I am trying to set the text of a control from pidgin. When I use the following code it returns that its successful as well as actually changing the text according to the AutoIt window info tool. But when looking at the textbox itself the text is not there it is just blank.

WinActivate("Pidgin","Pidgin")
Sleep(500)
$handle = ControlGetHandle("Pidgin","Pidgin","[CLASS:gdkWindowChild; INSTANCE:4]")
$test = ControlSetText("Pidgin","Pidgin",$handle,"+14236185810")
MsgBox(0,"",$test)

Any help would be greatly appreciated

Link to comment
Share on other sites

From the help file

ControlSetText ( "title", "text", controlID, "new text" [, flag] )

Parameters

title -> The title of the window to access.

text -> The text of the window to access.

controlID -> The control to interact with. See Controls.

new text -> The new text to be set into the control.

flag [optional] -> when different from 0 (default) will force the target window to be redrawn.

see if that helps

whim

Link to comment
Share on other sites

  • 1 month later...

From your first script, it appears you are trying to modify a Pidgin client window or something similar. The chat program called Pidgin does not use standard win32 GUI controls. It uses the GTK+ toolkit to create its GUI. As a result, its GUI will not respond the same way as a standard win32 GUI object.

- The Kandie Man ;-)

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Link to comment
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
 Share

  • Recently Browsing   0 members

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