Modify

Opened 11 years ago

Closed 11 years ago

#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 Changed 11 years ago by TicketCleanup

  • Version 3.3.9.22 deleted

Automatic ticket cleanup.

comment:2 follow-up: Changed 11 years ago by Jpm

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

comment:3 Changed 11 years ago by mlipok

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 in reply to: ↑ 2 Changed 11 years ago by mlipok

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 Changed 11 years ago by Jpm

Perhaps it is a good example but nut for this function

comment:6 Changed 11 years ago by mlipok

so
I leave it to you to decide

comment:7 Changed 11 years ago by Jpm

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

comment:8 Changed 11 years ago by Jpm

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

comment:9 Changed 11 years ago by Jpm

  • Milestone set to 3.3.9.22
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [9172] in version: 3.3.9.22

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jpm.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.