2013-04-06 86 views
1

有沒有辦法在Firefox中獲取當前輸入的url,然後根據重播來更改該文本。 我可以找到與DDEClient打開的網址,但我不知道如何改變它?Firefox從Delphi獲取並更改網址

+1

你通過DDEClient望遠鏡SDI接口是什麼意思?如果是的話,你有沒有嘗試** WWW_OpenURL **命令? – pf1957 2013-04-06 18:16:33

+0

是的,我已經使用過,但還沒有嘗試過這個命令,直到現在甚至都不知道它。 你如何使用它? – 2013-04-12 14:26:18

+0

SDI接口請參閱[http://support.microsoft.com/kb/160957](http://support.microsoft.com/kb/160957) – pf1957 2013-04-12 15:54:01

回答

0

很多年前,我用這種方式(只是一個片段):

... 
    DdeClientConv:=TDdeClientConv.Create(nil); 
    try with DdeClientConv do 
     begin 
     if SetLink(Browser, 'WWW_OpenURL') then 
      begin 
      PCH := RequestData(Format('"%s",,%d',[AURL,0])); 
      if Assigned(PCH) then 
       begin 
       PD := PDWORDS(PCH); 
       if PD^[0]=dword(-3) then 
        ShellExecute(GetDesktopWindow(),'Open',PChar(AURL),nil,nil,SW_SHOWNORMAL); 
       StrDispose(PCH); 
       end; 
      end 
     else 
      ShellExecute(GetDesktopWindow(),'Open',PChar(AURL),nil,nil,SW_SHOWNORMAL) 
     end; 
    finally 
     DdeClientConv.Free; 
    end; 
    ... 
+0

謝謝,我可以使用此代碼爲我的需要。 Regards Nuki – 2013-04-13 16:11:37