Sign in to follow this  
Followers 0
Silver

ControlSend problem

8 posts in this topic

#1 ·  Posted (edited)

I have a problem with the function ControlSend, here's the code I'm working, I'm trying to interact with a form to pass a value to a file to upload, the form can be found at this address ultrahosting.altervista.org

$oIE = _IECreate ("http://ultrahosting.altervista.org/", 0,1)

; Hide the browser window to demonstrate sending text to invisible window

_IEAction($oIE, "visible")

$oForm = _IEFormGetObjByName($oIE, "uppa")

$oInputFile = _IEFormElementGetObjByName($oForm, "miofile")

; Assign input focus to the field and then send the text string

$hIE = _IEPropertyGet($oIE, "hwnd")

_IEAction($oInputFile, "focus")

ControlSend($hIE, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", $orig)

_IEFormSubmit ($oForm, 0)

Unfortunately, the script does not pass any value to the form, you know tell me why not work? thanks...

Edited by Silver

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Why don't you use_IEFormElementSetValue?

You have a form named "uppa" and want to enter some data into the input field "miofile"?

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

because TYPE=FILE element will not work with _IEFormElementSetValue

and send dont work anymore because it's read only field


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Then I would click on the button next to the file element and enter the file there.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

and send dont work anymore because it's read only field

I don't understand

Share this post


Link to post
Share on other sites

The TYPE=FILE element is read-only. Try to type some data into the field and you'll see what we mean.

You have to click on the button to the right, select a file and then this filepath will be displayed in the TYPE=FILE element.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

ahhh ok now I understand, As you suggest we do?

Share this post


Link to post
Share on other sites

Use _IELinkClickByText or _IELinkClickByIndex or whatever is needed to click on the button right to the field. Then the file selection dialog opens.

There you can select the file you need.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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