【问题标题】:Firefox get&change url from DelphiFirefox 从 Delphi 获取和更改 url
【发布时间】:2013-04-12 23:57:48
【问题描述】:

有没有办法获取在 Firefox 中输入的当前 url,然后基于重播来更改该文本。 我可以找到使用 DDEClient 打开的 url,但我不知道如何更改它?

【问题讨论】:

  • 你指的是DDEClient Spyglass SDI接口吗?如果是,您是否尝试过 WWW_OpenURL 命令?
  • 是的,我用过那个命令,但还没有尝试过这个命令,直到现在都不知道。你是怎么用的?

标签: delphi url firefox


【解决方案1】:

很多年前,我是这样用的(只是一个片段):

    ...
    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;
    ...

【讨论】:

    猜你喜欢
    • 2010-11-16
    • 2019-06-27
    • 2011-07-10
    • 1970-01-01
    • 2011-07-14
    • 1970-01-01
    • 1970-01-01
    • 2011-12-10
    • 2013-04-08
    相关资源
    最近更新 更多