谁把这个AHK的代码用au3重写一下
刚学au3,对GUI的东西不熟悉,主要想学习一下au3.--------------------------------ahk 代码--------------------------------
Hotkey = F9 ; toggles Invert screen colors
RepaintPeriod = 300 ; repaint screen period (don't set it too low! --> heavy CPU load)
;===Auto-execute continuation===========================================================
#SingleInstance ignore
OnExit ExitSub
Gui, +AlwaysOnTop +ToolWindow +E0x00000020
Gui, color, black
Gui, Show, na X0 Y0 W%A_ScreenWidth% H%A_ScreenHeight%, InvertScreenColors
WinSet, Transparent, 255, InvertScreenColors
Gui, -Caption
WinGet, PrintSourceID, id
hdd_frame := DllCall("GetDC", UInt, PrintSourceID)
WinGet, PrintScreenID,id, InvertScreenColors
hdc_frame := DllCall("GetDC", UInt, PrintScreenID)
DllCall("gdi32.dll\SetStretchBltMode", "uint", hdc_frame, "int", 4)
SetTimer, Repaint, %RepaintPeriod%
Hotkey, %Hotkey%, ISC
Return ;===Auto-execute ends here===
;===Subroutines=========================================================================
Repaint:
DllCall("gdi32.dll\StretchBlt", UInt, hdc_frame, Int, 0, Int, 0, Int, A_ScreenWidth, Int, A_ScreenHeight, UInt, hdd_frame, Int, 0, Int, 0, Int, A_ScreenWidth, Int, A_ScreenHeight, UInt, 0x330008)
Return
ISC:
ISC ++
if ISC = 1
{
SetTimer, Repaint, off
Gui, hide
}
Else
{
SetTimer, Repaint, %RepaintPeriod%
Gui, show, na
ISC = 0
}
Return
ExitSub:
DllCall("gdi32.dll\DeleteDC", UInt, hdc_frame)
DllCall("gdi32.dll\DeleteDC", UInt, hdd_frame)
ExitApp
;===Exit Hotkey=====================================================Escape::ExitApp 对AHK不懂,飘过,等达人解决 AHk我只是用来进行快捷键的设置,其它方面没有涉及,我怕我脑子被搅昏了在AU3界和AHK界都一事无成。{:face (197):} 我最开始接触的也是AHK虽然强大 好多高手发有示例 但是关注的人太少了对初学者来说是个大问题 有什么不懂的 提个问题可能要等几天 AU3就不一样热心的会员和版主太多了 不懂的提问要不了多久就可以和答案很快就可以进入下一个阶段 其实就个改变屏幕颜色和透明度的一段ahk代码。 ahk的东东也需要借鉴哦。有些都是现成的,拿过来改改就成 那个大侠帮改写一下嘛
比如这句:Gui, +AlwaysOnTop +ToolWindow +E0x00000020
在au3里怎么写呀 $Form1 = GUICreate("Form1", 615, 438, 192, 124, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST,$WS_EX_TRANSPARENT,$WS_EX_WINDOWEDGE))
+AlwaysOnTop +ToolWindow +E0x00000020
$WS_EX_TOPMOST $WS_EX_TOOLWINDOW $WS_EX_TRANSPARENT
页:
[1]