V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Get Google Chrome
Vimium · 在 Chrome 里使用 vim 快捷键
youthcould
V2EX  ›  Chrome

windows版Chrome升级29后无法通过地址栏控件来获取网站的url了

  •  
  •   youthcould · 2013-08-22 11:17:18 +08:00 · 3866 次点击
    这是一个创建于 3900 天前的主题,其中的信息可能已经有所发展或是发生改变。
    RT,平时使用autohotkey做一个工作,需要获取chrome的地址栏中当前网站,升级chrome29后,功能失效,求指教chrome29中如何获取地址栏url
    5 条回复    1970-01-01 08:00:00 +08:00
    ksc010
        1
    ksc010  
       2013-08-22 11:19:32 +08:00
    你原来咋弄的
    chrome可以通过插件获取地址栏
    youthcould
        2
    youthcould  
    OP
       2013-08-22 13:54:12 +08:00
    @ksc010 以前是通过autohotkey的如下语句获得的
    ControlGetText,PageURL,Chrome_OmniboxView1,ahk_id %winid%
    laogui
        3
    laogui  
       2013-08-23 10:28:51 +08:00
    我升级到29后老卡死崩溃
    dlong82
        4
    dlong82  
       2013-08-31 15:25:48 +08:00   ❤️ 1
    兄弟,在chrome激活的状态下,试试
    get_url(ByRef url)
    {
    clipboard =
    trycount = 0

    again:
    SendEvent, {F6}
    sleep 100
    SendEvent, ^{ins}
    Clipwait, 0.1
    url = %clipboard%
    if( strlen(url) = 0 )
    {
    trycount += 1
    if( trycount < 3 )
    goto again
    }
    return url
    }
    youthcould
        5
    youthcould  
    OP
       2013-08-31 16:31:22 +08:00
    @dlong82 已感谢,想到过这个方法,不过还是没有之前那个方法好,这样对视觉效果有一定的影响
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5444 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 07:41 · PVG 15:41 · LAX 00:41 · JFK 03:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.