Jump to content

_IEFormElementSetValue Not Working With Large Data


EKY32
 Share

Go to solution Solved by EKY32,

Recommended Posts

Hey there, Im sending text to a TextArea in my webpage using _IEFormElementSetValue, but it seemed to me that this function doesn't work with large amount of data, it works with some text but when it's large enaught it failes.
 

nothing in the help file said about limitations, so..? what should I do please? :ermm:

Edited by EKY32

[font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]

Link to comment
Share on other sites

I saw somewhere that the TextArea has limitation of 64KB of data i thought that could be the problem, but when i insert the data manually from clipboard into it everythings works fine.

Can i have your advice please?

#include<IE.au3>
$UpS = @ScriptDir & "\image.jpg"

GUICreate("", 500, 500)
$oIE1 = ObjCreate("Shell.Explorer.2")
GUICtrlCreateObj($oIE1, 0, 0, 500, 500)
GUISetState()
_IENavigate($oIE1, @ScriptDir & "\write.htm")
$UpSFile = FileOpen($UpS, 16)
$UpSData = FileRead($UpSFile)
_Write($UpSData)
Exit

Func _Write($UpSData_Binary, $Get_Data = "")
;~     $oText = _URIEncode($oText)
    $oForm = _IEFormGetObjByName($oIE1, "form")
    $oText1 = _IEFormElementGetObjByName($oForm, "data")
    _IEAction($oText1, "focus")
    _IEFormElementSetValue($oText1, $UpSData_Binary)
EndFunc

write.htm

<HTML><BODY><form method="post" name="form" action="index.php">
    <textarea name="data" style="width: 220px; height: 35px;"></textarea><br />
    <input name="id" type="text"/><br/>
    <input name = "Submit1" type="submit" value="Submit Encoded Command" style="font-size: x-small; width: 150px;"/>
</form>
Edited by EKY32

[font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]

Link to comment
Share on other sites

  • Solution

Solved by putting the data on the ClipBoard then retriving it!! I DON"T KNOW WHY BUT IT"S WORKING AFTER COMPLETELY 6 HOURS OF SEARCHING:

#include<IE.au3>
$UpS = @ScriptDir & "\image.jpg"

GUICreate("", 500, 500)
$oIE1 = ObjCreate("Shell.Explorer.2")
GUICtrlCreateObj($oIE1, 0, 0, 500, 500)
GUISetState()
_IENavigate($oIE1, @ScriptDir "\write.htm")
$UpSFile = FileOpen($UpS, 16)
$UpSData = FileRead($UpSFile)
_Write($UpSData)
While 1
WEnd

Func _Write($UpSData_Binary, $Get_Data = "")
    $oForm = _IEFormGetObjByName($oIE1, "form")
    $oText1 = _IEFormElementGetObjByName($oForm, "file")
    _IEAction($oText1, "focus")
    ClipPut($UpSData_Binary)
    $oText1.value = ClipGet()
EndFunc   ;==>_Write

Please if anyone knows why the console returnes that the command could not be complete with the $oIE if I set the value directly, but importing it from ClipBoard works perfectly!

THANX!

Edited by EKY32

[font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...