windows 在对话框上自动单击确定的工具/代码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5868801/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 16:46:55  来源:igfitidea点击:

Tools/code to automatically click ok on dialogs

windowswindows-xpautomationdialog

提问by codeulike

We have an 'enterprisey' system with a scheduling component which gets floored if any dialogs come up. If any modal dialogs come up in the processes it is running, it gets 'paused' and can't kick off any new processes.

我们有一个带有调度组件的“企业”系统,如果出现任何对话,它就会被搁置。如果它正在运行的进程中出现任何模式对话框,它就会“暂停”并且无法启动任何新进程。

Excuse me a minute ...

原谅我一分钟...

*goes outside*
*laughs*
*cries*
*comes back*

*出去*
*笑*
*哭*
*回来*

.. ahem ... so anyway we need some sort of tool/technique that can lurk in the background and automatically detect specific dialogs and click OK on them. Any recommendations?

.. 咳咳......所以无论如何我们需要某种工具/技术,可以潜伏在后台并自动检测特定对话框并在它们上单击“确定”。有什么建议吗?

The offending system is running in Windows XP.

有问题的系统在 Windows XP 中运行。

(NB: changing the third-party-enterprisey system or making its developers sit on the naughty step until they improve it are not options in the short term)

(注意:改变第三方企业系统或让其开发人员坐在顽皮的步骤直到他们改进它在短期内不是选项)

采纳答案by codeulike

From this similar questionI found:

从这个类似的问题我发现:

Buzof by Basta Computing

Basta Computing 的 Buzof

which did the trick.

成功了。

There is also a product called DialogDevilwhich looked promising but didn't work in our situation for some reason.

还有一种叫做DialogDevil的产品,它看起来很有前途,但由于某种原因在我们的情况下不起作用。

回答by planetjones

AutoITis absolutely perfect for this. You can use the tool to help identify the dialog, write your own simple code and distribute the "auto clicker" via exe. It lurks in the background by running from the task tray.

AutoIT在这方面绝对是完美的。您可以使用该工具来帮助识别对话框,编写您自己的简单代码并通过 exe 分发“自动点击器”。它通过从任务托盘运行而潜伏在后台。

回答by Gaurav Gundecha

DialogDavil will require exact same parameters on your dialog (for which you want buttons to be autoclicked) every time that same dialog pops up. And thats why it didnt work for me in first pass. Then i changed the control file at the following path to remove the changing items (a text box text in my case) C:\Users\userName\AppData\Roaming\DAIR\DialogDevil\control.xml And then it worked like a charm. HTH,

每次弹出相同的对话框时,DialogDavil 都需要在对话框上使用完全相同的参数(您希望自动单击按钮)。这就是为什么它在第一次通过时对我不起作用。然后我更改了以下路径中的控制文件以删除更改项(在我的情况下为文本框文本) C:\Users\userName\AppData\Roaming\DAIR\DialogDevil\control.xml 然后它就像一个魅力。哈,