Sign in to follow this  
Followers 0
Yekuro

How to Send() to any GUI Control? HELP ME

7 posts in this topic

I am working in a New project... But I need to know how to use Send() to an Object

$Exp = ObjCreate("Shell.Explorer.2")
$ExpGUI = GUICtrlCreateObj($Exp, 320, 8, 449, 417)
$Exp.navigate("http://example.net")

^^^^^^^^^^^^^^^^^^^^
This is the object

How to send keys to that specific object?

($Exp object)

Share this post


Link to post
Share on other sites



Have a look at ControlSend in the helpfile.

Welcome to the Forum!


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Have a look at ControlSend in the helpfile.

Welcome to the Forum!

I can't understand how to use it.

(How to fill the boxes)

Title <- Users can change it... And I don't know what's the title (How to know the title?)

Text <- What to put here?

Control ID <- I don't know how to put it ($Exp, $ExpGUI, Exp, ExpGUI...) and... If it's not my web page, how can I know the controls, get the names, or the text of the controls of a input in a page?

String <- Ok.

Flag <- Ok.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Welcome to the AutoIt forums Yekuro.  What exactly are you trying to accomplish, because based on what I see so far, and assume so far, you will likely be better off using the _IE functions.  Take a look in the help file at _IECreate() and the related functions in IE.au3

An example from the help file showing how to set the value of a text input on a webpage:

#include <IE.au3>

Local $oIE = _IE_Example("form")
Local $oForm = _IEFormGetObjByName($oIE, "ExampleForm")
Local $oText = _IEFormElementGetObjByName($oForm, "textExample")
_IEFormElementSetValue($oText, "Hey! This works!")
Edited by danwilli

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

 

Welcome to the AutoIt forums Yekuro.  What exactly are you trying to accomplish, because based on what I see so far, and assume so far, you will likely be better off using the _IE functions.  Take a look in the help file at _IECreate() and the related functions in IE.au3

An example from the help file showing how to set the value of a text input on a webpage:

#include <IE.au3>

Local $oIE = _IE_Example("form")
Local $oForm = _IEFormGetObjByName($oIE, "ExampleForm")
Local $oText = _IEFormElementGetObjByName($oForm, "textExample")
_IEFormElementSetValue($oText, "Hey! This works!")

 

Didn't help.

And when I use _IE commands correctly, with #include <IE.au3>, it gives syntax error, and moves me to IE.au3 

EDIT : Solved problems with _IE commands.

How do I use Send() in a embedded IE? -> _IECreateEmbedded()

$Exp = _IECreateEmbedded()
$ExpGUI = GUICtrlCreateObj($Exp, 320, 8, 449, 417)
_IENavigate($Exp, "http://example.com")
Edited by Yekuro

Share this post


Link to post
Share on other sites

My whole point was for you to avoid using send altogether since it is kind of sloppy to be honest.  What exactly are you trying to do, and perhaps there is a better solution.

As for Send(), you cannot use it with the object like that, it just sends keystrokes as if you typed them yourself, and controlsend() is going to send to a window/control, again not an object like that.

We can help you better if you are more clear on what you are trying to accomplish :)

Share this post


Link to post
Share on other sites

Yekuro,

As we now know this request is not acceptable under the Forum rules and you are not in position to respond for a while - there seems little point in the thread staying open. :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0