谷歌浏览器登录了微信公众号或者个人微信号 网页版
由于来新信息后浏览器的提醒声音太小,导致看不到或错过信息现在要写一个程序来提醒用Spy ++ 可以获得窗口的类是Chrome_WidgetWin_2网上查找各种方法的获取窗口和类及句柄都不行,获取不到请问怎么用delphi 获取这个 通知提醒如图:

解决方案 »

  1.   

    有种东西叫做Tampermonkey有种语言叫做JS 哈哈哈
      

  2.   


    那你帮我写一个获取网页微信新消息的脚本
    网页微信声音地址是https://res.wx.qq.com/zh_CN/htmledition/swf/msg17ced3.mp3
    我想自定义这个声音,你写出来,我给分,并谢谢你
      

  3.   

    工具都告诉你了,方法例子网上也可以找 http://blog.csdn.net/earthcto/article/details/42151643
    你叫我写出来你给我分????分是什么东西?能当饭吃么?
      

  4.   


    好吧,这是我写的
    // ==UserScript==
    // @name         微信提醒
    // @namespace    http://tampermonkey.net/
    // @version      0.1
    // @description  try to take over the world!
    // @author       You
    // @match        *//wx.qq.com/*
    // @grant        none
    // ==/UserScript==
    /* jshint -W097 */
    'use strict';var tempStr =  "mp3" ;  if(tempStr.indexOf("Text") > 0 )   
    {    
        var audio = document.createElement("audio");
       audio.src = "http://192.168.0.9:8012/update/nyxdxx.wav";
       audio.play();  }但是没有用,不知道为什么?
      

  5.   

    // ==UserScript==
    // @name         微信提醒
    // @namespace    http://tampermonkey.net/
    // @version      0.1
    // @description  try to take over the world!
    // @author       You
    // @match        *.wx.qq.com/*
    // @grant        none
    // ==/UserScript==
    /* jshint -W097 */
    'use strict';var tempStr =  "msg" ;  if(tempStr.indexOf("Text") > 0 )   
    {    
        var audio = document.createElement("audio");
       audio.src = "http://192.168.0.9:8012/update/nyxdxx.wav";
       audio.play();  }但是没有用,不知道为什么?
      

  6.   


    // ==UserScript==
    // @name         test
    // @namespace    http://tampermonkey.net/
    // @version      0.1
    // @description  try to take over the world!
    // @author       You
    // @match        http://bbs.csdn.net/topics/392264723
    // @require      https://code.jquery.com/jquery-latest.js
    // @run-at       document-start
    // @grant        unsafeWindow
    // @grant        GM_setClipboard
    // ==/UserScript==(function() {
        'use strict';
        var audio = document.createElement("audio");
        audio.src = "http://s.2gei.com/src/aud/wav/ee/ee904d6b96984e729d59f8f21414e13e.wav?download/%E4%BA%BA%E7%B1%BB%E7%9A%84%E7%AC%91-%E7%94%B7%E6%80%A7-%E6%BB%91%E7%A8%BD_%E7%88%B1%E7%BB%99%E7%BD%91_aigei_com.wav&e=1505935800&token=P7S2Xpzfz11vAkASLTkfHN7Fw-oOZBecqeJaxypL:5yJbal28XKLbwIKH7zxHdDjUfPU=";
        audio.play();
        // Your code here...
    })();
    把这个放进去,重新打开你这个帖子
      

  7.   

    // @run-at       document-start有设置,设置这程序是在什么时候运行,你好好多看看教程还有,想替换微信资源不是那么简单的事,资源是经过webpack重新整理打包的,每次资源名会有不一样,你最好找到然后用正则替换只能帮到你这里了,没时间研究微信资源
      

  8.   

    对了,你可别傻傻的用// @run-at       document-start你要用 // @run-at       document-end
      

  9.   


    -------------------------我那个不是替换,是检测有没有msg这个字符,检查到就返回大于0,这样就播放下面的提示音。谷歌浏览器在按F12代码里在NETwork的Media中才能看到这个提示音代码油猴不知道怎么写才能获取得到。或许正如你所说,是打包的。
      

  10.   

    浏览器能拿到的东西,油猴肯定也能拿到了这点没什么问题问题关键在于 微信 对于资源的加载机制的了解如果是变量,可能需要用 eval 去取,然后判断
    如果是资源名,可能就在加载时机完成时,去正则查找搞清加载机制不是那么简单的,尤其是不了解机理的情况下,需要花大量时间去研究验证