|
本帖最后由 fyhwaijxnt78 于 2009-6-11 12:15 编辑
原代码在这网址!
http://redapple2008.5d6d.com/thread-1362-1-1.html
她这个网页代码加了别的字,复制了有其它字!
打过好像哪会出错,不指一个地方!
这是我照这写的,运行出错了,不知哪写错了!
请帮忙修改好下,谢谢了!
#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=game.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseAnsi=y
#AutoIt3Wrapper_Res_Description=恢复时游戏调用
#AutoIt3Wrapper_Res_LegalCopyright=linbsp
#EndRegion ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#include "misc.au3"
#include <GUIConstants.au3>
#include <A3LToolTip.au3>
_Singleton("myScript")
Global $start
Global $n = 0
Global $pos
Global $clickspeed = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "DoubleClickSpeed")
Opt("GUIOnEventMode", 1)
$title = "lin"
$AForm1 = GUICreate($title, 38, 38, @DesktopWidth-120, @DesktopHeight-500, BitOR($WS_SYSMENU, $WS_POPUP, $WS_POPUPWINDOW, $WS_BORDER), $WS_EX_TOOLWINDOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "_exit", $AForm1)
GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, '_PRIMARYdown', $AForm1)
GUISetOnEvent($GUI_EVENT_PRIMARYUP, '_PRIMARYup', $AForm1)
GUISetBkColor(0xBFDBFF)
$hTool = _ToolTip_Create($AForm1)
_ToolTip_AddTool ($hTool, $AForm1, "右击", 0, 0, 0, 400, 300)
$icon = GUICtrlCreateIcon(@WindowsDir & "\cursors\stopwtch.ani", -1, 3, 3)
GUICtrlSetState(-1, $GUI_DISABLE)
$Rm = GUICtrlCreateContextMenu()
$title1 = GUICtrlCreateMenuItem("挖雷", $Rm)
GUICtrlSetOnEvent(-1, "walei")
GUICtrlCreateMenuItem("", $Rm)
$title2 = GUICtrlCreateMenuItem("纸牌", $Rm)
QGUICtrlSetOnEvent(-1, "zipai")
GUICtrlCreateMenuItem("", $Rm)
$title3 = GUICtrlCreateMenuItem("红心大战", $Rm)
GUICtrlSetOnEvent(-1, "hongxin")
GUICtrlCreateMenuItem("", $Rm)
$title3 = GUICtrlCreateMenuItem("连连看", $Rm)
GUICtrlSetOnEvent(-1, "flash")
GUICtrlCreateMenuItem("", $Rm)
$Help = GUICtrlCreateMenuItem("关于", $Rm)
GUICtrlSetOnEvent(-1, "about")
GUICtrlCreateMenuItem("", $Rm)
$exit = GUICtrlCreateMenuItem("退出", $Rm)
GUICtrlSetOnEvent(-1, "_exit")
GUISetState(@SW_SHOW, $AForm1)
GUIRegisterMsg($WM_NOTIFY, "_ToolTip_WM_NOTIFY")
WinSetOnTop($AForm1, "", 1)
WinSetTrans($AForm1, "", 200)
ToolTip("休息一下,右键休闲", @DesktopWidth-160, @DesktopHeight-460)
sleep(8000)
GUIDelete()
Exit
While 1
Sleep(100)
WEnd
Func _exit()
GUIDelete()
Exit
EndFunc ;==>_exit
Func walei()
run("c:\windows\system32\winmine.exe")
GUIDelete()
Exit
EndFunc ;==>walei
Func zipai()
run("c:\windows\system32\sol.exe")
GUIDelete()
Exit
EndFunc ;==>zipai
Func hongxin()
run("c:\windows\system32\mshearts.exe")
GUIDelete()
Exit
EndFunc ;==>walei
Func flash()
run("c:\windows\flash.exe")
(GUIDelete()
Exit
EndFunc ;==>walei
Func about()
MsgBox(262144, "关于", "为打发恢复时无聊的等待时间," & @CRLF &"请右击上面的悬浮窗选择游戏。"& @CRLF [email=&@CRLF]&@CRLF[/email] & " 红苹果工作室出品")
EndFunc ;==>about
Func Move()
Dim $PosDiff[2], $MousePos, $WinPos
$MousePos = MouseGetPos()
$WinPos = WinGetPos($title, "")
$PosDiff[0] = $WinPos[0] - $MousePos[0]
$PosDiff[1] = $WinPos[1] - $MousePos[1]
While _IsPressed("01", DllOpen("user32.dll"))
$MousePos = MouseGetPos()
WinMove($title, "", $MousePos[0] + $PosDiff[0], $MousePos[1] + $PosDiff[1])
Sleep(10)
WEnd
EndFunc ;==>Move
Func _PRIMARYdown()
BMove()
$pos = MouseGetPos()
$guiPos = WinGetPos($AForm1, '')
If ($pos[0] >= $guiPos[0] And $pos[0] <= $guiPos[0] + $guiPos[2]) And _
($pos[1] >= $guiPos[1] And $pos[1] <= $guiPos[1] + $guiPos[3]) Then
$n += 1
EndIf
EndFunc ;==>_PRIMARYdown
Func _PRIMARYup()
If $n = 2 Then
$n = 0
Else
$start = TimerInit()
EndIf
EndFunc ;==>_PRIMARYup
Func _WinIsVisible($hWnd, $Text="")
Return BitAND(WinGetState($hWnd, $Text), 2)
EndFunc
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入
×
|