syc1985 发表于 2009-8-11 15:14:18

脚本关闭代码

我时一个新手,想写一个脚本在关闭或退出的时候执行一些命令!

sxd 发表于 2009-8-11 15:29:27

3.3.1.0里是
#OnAutoItStartRegister <function>
OnAutoItExitRegister( "函数" )

之前的版本有差异
应该是
OnAutoItStart
OnAutoItExit

lynfr8 发表于 2009-8-12 21:44:39

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 100, 100, 242, 174)
GUISetState(@SW_SHOW)
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Run("Notepad.exe", "", @SW_MAXIMIZE)
                        Exit

        EndSwitch
WEnd

syc1985 发表于 2009-8-13 09:39:33

谢谢楼上的两位兄弟帮忙!
3#的兄弟最详细!
谢谢哦!

llm1978 发表于 2009-8-13 10:32:39

这个要标记下。

四海皆狂龙 发表于 2009-8-13 14:28:00

这个留个脚印,可能以后用到。
页: [1]
查看完整版本: 脚本关闭代码