Opened on Nov 5, 2013 at 7:46:29 PM
Closed on Nov 8, 2013 at 6:42:31 AM
#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 , on Nov 5, 2013 at 8:00:02 PM
| Version: | 3.3.9.22 |
|---|
follow-up: 4 comment:2 by , 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 , 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.
comment:4 by , 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:7 by , on Nov 7, 2013 at 12:02:16 PM
If it is a good example just tell me for which function
comment:8 by , 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 , on Nov 8, 2013 at 6:42:31 AM
| Milestone: | → 3.3.9.22 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [9172] in version: 3.3.9.22

Automatic ticket cleanup.