找回密码
 加入
搜索
查看: 2247|回复: 0

[AU3基础] 修改的ACSB F12不能运行程序,但F1-F11都可以运行,谁帮忙看看怎么回事?

[复制链接]
发表于 2010-4-8 14:23:04 | 显示全部楼层 |阅读模式
修改的ACSB F12不能运行程序,但F1-F11都可以运行,谁帮忙看看怎么回事?
#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=D:\我的文档\32x32.ico
#AutoIt3Wrapper_Res_LegalCopyright=Any
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****


#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <Timers.au3>
#include <Date.au3>

Global $timer, $Secs, $Mins, $Hour
Dim $IniPath
Dim $G3name,$G3F1,$G3F2,$G3F3,$G3F4,$G3F5,$G3F6,$G3F7,$G3F8,$G3F9,$G3F10,$G3F11,$G3F12,$G3RF1,$G3RF2,$G3RF3,$G3RF4,$G3RF5,$G3RF6,$G3RF7,$G3RF8,$G3RF9,$G3RF10,$G3RF11,$G3RF12,$GameVisibel
Dim $TransType,$Trans,$Side,$letop

$IniPath=StringMid(@ScriptFullPath,1,StringLen(@ScriptFullPath)-3) & "ini"
$G3name=IniRead($IniPath,"Game","GameName","非编部署工具")
$G3F1=IniRead($IniPath,"Game","GameName1","扫雷aaaaaaaaaaaaaaaa")
$G3F2=IniRead($IniPath,"Game","GameName2","纸牌bbbbbbbbbbbbbbbbbb")
$G3F3=IniRead($IniPath,"Game","GameName3","空当接龙ccccccccccccccccc")
$G3F4=IniRead($IniPath,"Game","GameName4","扫雷dddddddddddddddd")
$G3F5=IniRead($IniPath,"Game","GameName5","纸牌eeeeeeeeeeeeeeeeee")
$G3F6=IniRead($IniPath,"Game","GameName6","空当接龙fffffffffffff")
$G3F7=IniRead($IniPath,"Game","GameName7","扫雷gggggggggggggggggggg")
$G3F8=IniRead($IniPath,"Game","GameName8","纸牌hhhhhhhhhhhhhhhhhhhhh")
$G3F9=IniRead($IniPath,"Game","GameName9","空当接龙llllllllllllllllll")
$G3F10=IniRead($IniPath,"Game","GameName10","扫雷mmmmmmmmmmmmmmmmm")
$G3F11=IniRead($IniPath,"Game","GameName11","纸牌nnnnnnnnnnnnnnnnnnnn")
$G3F12=IniRead($IniPath,"Game","GameName12","空当接龙zzzzzzzzzzz")
$G3RF1=IniRead($IniPath,"Game","GamePath1","C:\Windows\system32\winmine.exe")
$G3RF2=IniRead($IniPath,"Game","GamePath2","C:\Windows\system32\sol.exe")
$G3RF3=IniRead($IniPath,"Game","GamePath3","C:\Windows\system32\freecell.exe")
$G3RF4=IniRead($IniPath,"Game","GamePath4","C:\Windows\system32\winmine.exe")
$G3RF5=IniRead($IniPath,"Game","GamePath5","C:\Windows\system32\sol.exe")
$G3RF6=IniRead($IniPath,"Game","GamePath6","C:\Windows\system32\freecell.exe")
$G3RF7=IniRead($IniPath,"Game","GamePath7","C:\Windows\system32\winmine.exe")
$G3RF8=IniRead($IniPath,"Game","GamePath8","C:\Windows\system32\sol.exe")
$G3RF9=IniRead($IniPath,"Game","GamePath9","C:\Windows\system32\freecell.exe")
$G3RF10=IniRead($IniPath,"Game","GamePath10","C:\Windows\system32\winmine.exe")
$G3RF11=IniRead($IniPath,"Game","GamePath11","C:\Windows\system32\sol.exe")
$G3RF12=IniRead($IniPath,"Game","GamePath12","C:\Windows\system32\freecell.exe")
$GameVisibel=IniRead($IniPath,"Game","GameVisibel","1")
$TransType=IniRead($IniPath,"Other","TransType","1")
$Side=IniRead($IniPath,"Other","Side","Right")

if $side="Right" Then
$letop=@DesktopWidth-167 
Else
$letop=0
EndIf

$Form1 = GUICreate("fyh", 167, @DesktopHeight, $letop,0,$WS_POPUP , bitor($WS_EX_LAYERED,$WS_EX_TOOLWINDOW))
GUISetBkColor(0xFFFBF0)
if $TransType=1 then
$Trans=255
_API_SetLayeredWindowAttributes($Form1, 0xFFFBF0)
Else
$Trans=IniRead($IniPath,"Other","Trans","150")
_API_SetLayeredWindowAttributes($Form1, 0xFFFFFF)
EndIf


if $GameVisibel=1 then
$Group3 = GUICtrlCreateGroup($G3name, 0, 180, 165, 320, $BS_CENTER, $WS_EX_TRANSPARENT)
$Label07 = GUICtrlCreateLabel("F1:"&$G3F1, 16, 202, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label08 = GUICtrlCreateLabel("F2:"&$G3F2, 16, 226, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label09 = GUICtrlCreateLabel("F3:"&$G3F3, 16, 250, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label10 = GUICtrlCreateLabel("F4:"&$G3F4, 16, 274, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label11 = GUICtrlCreateLabel("F5:"&$G3F5, 16, 298, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label12 = GUICtrlCreateLabel("F6:"&$G3F6, 16, 323, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label13 = GUICtrlCreateLabel("F7:"&$G3F7, 16, 347, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label14 = GUICtrlCreateLabel("F8:"&$G3F8, 16, 371, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label15 = GUICtrlCreateLabel("F9:"&$G3F9, 16, 395, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label16 = GUICtrlCreateLabel("F10:"&$G3F10, 16, 419, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label17 = GUICtrlCreateLabel("F11:"&$G3F11, 16, 443, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label18 = GUICtrlCreateLabel("F12:"&$G3F12, 16, 467, 200, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlCreateGroup("", -99, -99, 1, 1)
EndIf
GUISetState()
WinSetOnTop("Anycrane","",1)
$timer = TimerInit()
AdlibEnable("CpuRamRate", 500)
_Timer_SetTimer($Form1, 100, "_UpdateClock")

HotKeySet("{F1}","game1")
HotKeySet("{F2}","game2")
HotKeySet("{F3}","game3")
HotKeySet("{F4}","game4")
HotKeySet("{F5}","game5")
HotKeySet("{F6}","game6")
HotKeySet("{F7}","game7")
HotKeySet("{F8}","game8")
HotKeySet("{F9}","game9")
HotKeySet("{F10}","game10")
HotKeySet("{F11}","game11")
HotKeySet("{F12}","game12")



While 1

WEnd

Func _API_SetLayeredWindowAttributes($hwnd, $i_transcolor, $Transparency = $Trans, $isColorRef = False)

Local Const $AC_SRC_ALPHA = 1
Local Const $ULW_ALPHA = 2
Local Const $LWA_ALPHA = 0x2
Local Const $LWA_COLORKEY = 0x1
If Not $isColorRef Then
$i_transcolor = Hex(String($i_transcolor), 6)
$i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2))
EndIf
Local $Ret = DllCall("user32.dll", "int", "SetLayeredWindowAttributes", "hwnd", $hwnd, "long", $i_transcolor, "byte", $Transparency, "long", $LWA_COLORKEY + $LWA_ALPHA)
Select
Case @error
Return SetError(@error, 0, 0)
Case $Ret[0] = 0
Return SetError(4, 0, 0)
Case Else
Return 1
EndSelect
EndFunc

Func _UpdateClock($hWnd, $Msg, $iIDTimer, $dwTime) 
EndFunc ;==>_UpdateClock


Func CpuRamRate()

Local $rCPU,$rRAM
$rCPU=CurrentCPURate()
$rRAM=CurrentRAMRate()
EndFunc


Func CurrentCPURate()
$wbemServices = ObjGet("winmgmts:\\.\root\cimv2") 
$wbemObjectSet= $wbemServices.ExecQuery("Select * from Win32_Processor")
For $wbemObject In $wbemObjectSet 
$dd=$wbemObject.LoadPercentage
Next
Return $dd
EndFunc

Func CurrentRAMRate()
Local $Array[7]
$Array=MemGetStats()
Return $Array[0]
EndFunc

Func game1()
Run($G3RF1)
EndFunc

Func game2()
Run($G3RF2)
EndFunc

Func game3()
Run($G3RF3)
EndFunc

Func game4()
Run($G3RF4)
EndFunc

Func game5()
Run($G3RF5)
EndFunc

Func game6()
Run($G3RF6)
EndFunc

Func game7()
Run($G3RF7)
EndFunc

Func game8()
Run($G3RF8)
EndFunc

Func game9()
Run($G3RF9)
EndFunc

Func game10()
Run($G3RF10)
EndFunc

Func game11()
Run($G3RF11)
EndFunc

Func game12()
Run($G3RF12)
EndFunc

Func quit()
Exit 0
EndFunc

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-16 15:36 , Processed in 0.079365 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表