Modify

Opened 12 years ago

Closed 12 years ago

#2521 closed Feature Request (Fixed)

_IEFormElementSetValue[5].au3

Reported by: mlipok Owned by: J-Paul Mesnage
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, 12 years ago

Version: 3.3.9.22

Automatic ticket cleanup.

comment:2 by J-Paul Mesnage, 12 years ago

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

comment:3 by mlipok, 12 years ago

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, 12 years ago

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 J-Paul Mesnage, 12 years ago

Perhaps it is a good example but nut for this function

comment:6 by mlipok, 12 years ago

so
I leave it to you to decide

comment:7 by J-Paul Mesnage, 12 years ago

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

comment:8 by J-Paul Mesnage, 12 years ago

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

comment:9 by J-Paul Mesnage, 12 years ago

Milestone: 3.3.9.22
Owner: set to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed by revision [9172] in version: 3.3.9.22

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


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