使用宏从对话框消息复制密码



有没有办法使用 imacros 或 greacemonkey 从对话框消息中复制密码并将其粘贴到另一个页面?请检查图片链接

看看如何使用 Firefox 的 'iMacros' 中的 JavaScript 脚本接口解决这个问题:

// just an imitation of your page js-dialog with one second delay
window.location.href = 'javascript:{window.setTimeout("window.location.href='javascript:{alert(\"Bla bla bla ... DDA9B7 ... bla bla bla\");}'", 1000); undefined;}';
// macro that waits for the dialog
var ret = iimPlayCode("WAIT SECONDS=1.5");
// extract dialog text
if (ret < 0) 
    var otp = iimGetErrorText();
// extract otp
otp = otp.match(/b[A-Z0-9]{6}b/);
// pass it to another macro or display as done below
iimDisplay(otp);

最新更新