請問facebook 的 po 文 |
缺席
|
cat200188
中階會員 ![]() ![]() ![]() 發表:37 回覆:78 積分:68 註冊:2005-01-18 發送簡訊給我 |
請問facebook 的 po文 目前已經能登入
[code delphi] procedure TFMain.BitBtn1Click(Sender: TObject); var Docs, Edits ,startag: OleVariant; i:integer; begin Docs :=web1.Document; Edits :=Docs.GetElementByID('email'); Edits.Value :=OleVariant(ed1.Text ); Edits :=Docs.GetElementByID('pass'); Edits.Value := OleVariant(ed2.Text) ; web1.OleObject.Document.all.item('login_form').submit; //web1.Navigate('http://www.facebook.com/notes/'); end; [/code] 我登入後轉向po文處 [code delphi] web1.Navigate('http://www.facebook.com/notes/'); //st.Free ; while web1.ReadyState < READYSTATE_INTERACTIVE do begin Application.ProcessMessages; end ; web1.OleObject.document.getElementsByTagName('form').item(2).submit; [/code] 然後準備po文 但好像卡在facebook textarea readonly='1' 所以無法給值 不知有人能給我指正或方向嗎?程式碼如下 [code delphi] procedure TFMain.BitBtn2Click(Sender: TObject); var Docs, Edits ,startag,str: OleVariant; i:integer; begin //ShowMessage('1'); Docs :=web1.Document; //ShowMessage('2'); Edits :=Docs.GetElementByID('title'); //ShowMessage('3'); Edits.Value :=OleVariant(ed3.Text ); //ShowMessage('4'); //web1.OleObject.Document.all.item('note_content').readonly := OleVariant('false'); //web1.OleObject.Document.all.item('note_content').innerText :=OleVariant(me1.Text) ; //web1.OleObject.Document.getElementsByTagName('textarea').readonly := OleVariant('false'); //web1.OleObject.Document.getElementsByTagName('textarea').item(0).value :=OleVariant(me1.Text) ; //web1.oleobject.document.all.tags('textarea').item(0).click ; web1.oleobject.document.all.tags('textarea').item(0).focus; web1.oleobject.document.all.tags('textarea').item(0).click ; Web1.OleObject.document.all.tags('textarea').item(0).FireEvent('onmousedown',EmptyParam); web1.oleobject.document.all.tags('textarea').item(0).innertext :=me1.Text ; web1.oleobject.document.all.tags('textarea').item(0).value :=me1.Text ; //Edits.readonly := OleVariant('0'); //Edits.InnerText := OleVariant(me1.Text) ; web1.OleObject.Document.all.item('editor').submit; end; [/code]
------
....... |
cat200188
中階會員 ![]() ![]() ![]() 發表:37 回覆:78 積分:68 註冊:2005-01-18 發送簡訊給我 |
|
Coffee
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:31 回覆:878 積分:561 註冊:2006-11-15 發送簡訊給我 |
you can put full javascript and call by event, so that you can re-write your facebook if any further modifcation without re-compile binary(store html/scripts in db or text) and avoid using too much delphi operation to limit development.
------
不論是否我發的文,在能力範圍皆很樂意為大家回答問題。 為了補我的能力不足之處,以及讓答案可以被重複的使用,希望大家能儘量以公開的方式問問題。 在引述到我的文時自然會儘量替各位想辦法,謝謝大家! |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |