Windows脚步开发工具Autoit及网页刷新实例介绍

来源:互联网 发布:淘宝白猪商店有假货吗 编辑:程序博客网 时间:2024/05/18 01:25

今天想写一个论坛在线刷新工具,无意间看到了autoit这个windows下的脚步工具,自带帮助文档,学习起来很快,正常情况下一天即可写成很出色的脚步工具来,根据帮助文档的引导我知道可以写一些自动化安装,字符串处理,定时执行等工具,非常方便。

再有一个是自动化脚步的编辑工具Scite也非常好用,输入函数后会有参数自动提示,下面我讲一下如何进行论坛定时刷新。

第一步

找到论坛的标题,点开始->所有程序->autoit v3->autoit v3 Window Info

使用界面中的Finder Tool下面的按钮拖拽到你想要刷新的论坛网页上,这是可以看到autoit v3 Window Info中已经获得了你所选择的窗体的Tiltle等信息,拷贝Title信息。

第二步

编写脚本:点开始->所有程序->autoit v3->SciTe Script Editor,输入如下代码

;refresh web page every 30 seconds

;WinWaitActive Pauses execution of the script until the requested window is active.
WinWaitActive("AutoIt Script Editor Installation - AutoItScript - Mozilla Firefox“)

 

;into the while loop function forever,execute the refresh with the command F5,Waiting 30 seconds after the refreshing.

While(True)
   Send("{F5}")
   sleep(30*1000)
WEnd
第3步:

点击Tools ->build(F7) -> go(F5)执行即可。

 

auto官网:http://www.autoitscript.com/site/autoit/

AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying “runtimes” required!

AutoIt was initially designed for PC “roll out” situations to reliably automate and configure thousands of PCs. Over time it has become a powerful language that supports complex expressions, user functions, loops and everything else that veteran scripters would expect.

Features:

  • Easy to learn BASIC-like syntax
  • Simulate keystrokes and mouse movements
  • Manipulate windows and processes
  • Interact with all standard windows controls
  • Scripts can be compiled into standalone executables
  • Create Graphical User Interfaces (GUIs)
  • COM support
  • Regular expressions
  • Directly call external DLL and Windows API functions
  • Scriptable RunAs functions
  • Detailed helpfile and large community-based support forums
  • Compatible with Windows 2000 / XP / 2003 / Vista / 2008 / Windows 7 / 2008 R2
  • Unicode and x64 support
  • Digitally signed for peace of mind
  • Works with Windows Vista’s User Account Control (UAC)

AutoIt has been designed to be as small as possible and stand-alone with no external .dll files or registry entries required making it safe to use on Servers. Scripts can be compiled into stand-alone executables withAut2Exe.

Also supplied is a combined COM and DLL version of AutoIt called AutoItX that allows you to add the unique features of AutoIt to your own favourite scripting or programming languages!

Best of all, AutoIt continues to be FREE – but if you want to support the time, money and effort spent on the project and web hosting then you maydonate.

Take me to the downloads page!

原创粉丝点击