Modify

#2521 closed Feature Request (Fixed)

_IEFormElementSetValue[5].au3

Reported by: mlipok Owned by: Jpm
Milestone: 3.3.9.22 Component: Documentation
Version: Severity: None
Keywords: Cc:

Description

now in 3.3.9.22

; Clicking in <input type="file" name="fileExample">

#include <IE.au3>
#include <MsgBoxConstants.au3>

Local $oIE = _IE_Example("form")

Local $oForm = _IEFormGetObjByName($oIE, "ExampleForm")
Local $oInputFile = _IEFormElementGetObjByName($oForm, "fileExample")

; Assign input focus to the field and then send the text string
_IEAction($oInputFile, "focus")

; Get a handle to the IE window.
Local $hIE = _IEPropertyGet($oIE, "hwnd")

#region  The first method
Local $iFileX = _IEPropertyGet($oInputFile, "screenx")
Local $iFileY = _IEPropertyGet($oInputFile, "screeny")
MouseClick('main', $iFileX + 160, $iFileY + 5, 1, 0)
#endregion  The first method

#region The second way
;~ SendKeepActive($hIE, "")
;~ Send("{TAB}")
;~ Sleep(100)
;~ Send("{SPACE}")
;~ SendKeepActive("")
#endregion The second way


MsgBox($MB_SYSTEMMODAL, "Success", "Value set to 'This works'")

proposal on reflection:

Remove:

MsgBox($MB_SYSTEMMODAL, "Success", "Value set to 'This works'")

Add comments something like this

Now you can use the Send() or ControlSetText() to set the value of the FileName field in the resulting window, type: FileOpenDialog.

Attachments (0)

Change History (9)

comment:1 by TicketCleanup, on Nov 5, 2013 at 8:00:02 PM

Version: 3.3.9.22

Automatic ticket cleanup.

comment:2 by Jpm, on Nov 6, 2013 at 12:02:21 PM

In fact this example has nothing to do with _IEFormElementSetValue().
I proposed to remove it

comment:3 by mlipok, on Nov 6, 2013 at 2:06:53 PM

http://www.autoitscript.com/trac/autoit/ticket/2466#comment:4

"
I think 5th example
was missing link of, and very often asked question on forum
"

I think it is necessary, but would require changes.

in reply to:  2 comment:4 by mlipok, on Nov 6, 2013 at 2:19:22 PM

Replying to Jpm:

In fact this example has nothing to do with _IEFormElementSetValue().

This example Was intended to indicate how the set the <input type="file" name="fileExample" value="c:\test.txt">

But I see even the header needs to be changed, that should sound something like this:

"
Clicking in <input type="file" name="fileExample">, in order to allow changes in value, by specifying the appropriate file in the window that appears (FileOpenDialog caused by IE).
"

comment:5 by Jpm, on Nov 7, 2013 at 5:58:05 AM

Perhaps it is a good example but nut for this function

comment:6 by mlipok, on Nov 7, 2013 at 9:25:54 AM

so
I leave it to you to decide

comment:7 by Jpm, on Nov 7, 2013 at 12:02:16 PM

If it is a good example just tell me for which function

comment:8 by Jpm, on Nov 8, 2013 at 6:37:00 AM

I will suppress the example
When we can reuse it I will add it in the specific function example

comment:9 by Jpm, on Nov 8, 2013 at 6:42:31 AM

Milestone: 3.3.9.22
Owner: set to Jpm
Resolution: Fixed
Status: newclosed

Fixed by revision [9172] in version: 3.3.9.22

Modify Ticket

Action
as closed The owner will remain Jpm.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.