Thanks for reply but I found answer yesterday InputElement.focus + clipboard and keybd_event ctrl+v:P
I think that they will block it at 8;/ I hope only that is possible do evrythink what I see in my HTTP Sniffer in Indy HTTP component? on not bot type version I don't need this filling :)
I accept your answer because works too ;)
Regards
Main Topics
Browse All Topics





by: smotPosted on 2008-12-24 at 23:58:21ID: 23242784
uses 1/sndkey32 .htm
e_, 'file')) and e, 'name')) then
sndkey32;
// http://megalib.com/books/5
procedure SetFilename(WB: TWebbrowser; Value: WideString);
var
Doc: IHTMLDocument2;
Elements: IHTMLElementCollection;
Element: IHTMLElement;
InputElement: IHTMLInputElement;
I, j: Integer;
FormItem: Variant;
pch: PChar;
str1: string;
begin
str1 := Value; //convert input value to string
pch := PChar(str1); //type cast to pointer
Doc := WB.Document as IHTMLDocument2;
Elements := Doc.all;
for I := 0 to Elements.length - 1 do
begin
Element := Elements.item(I, EmptyParam) as IHtmlElement;
if Element.tagName = 'INPUT' then
begin
InputElement := Element as IHTMLInputElement;
if (SameText(InputElement.typ
(SameText(InputElement.Nam
begin
FormItem := InputElement;
FormItem.Focus;
SendKeys(PCh, False); // NOTE the false flag
end;
end;
end;
end;
Note: This method will not work in IE 8 anymore. The File Input control is read-only by design (security change in IE8)