我有 4 个 AutoHotKey 程序,现在有没有办法将自动热键代码转换为 Visual Studio 代码?我需要这个,因为我正在制作一个 Visual Studio 程序,并且需要一个可以做某事的代码,所以我可以用 autohotkey 来做,但不能用 Visual Studio。也许有一个网站可以转换它或什么的?
其中一个代码是:
#SingleInstance force
#Persistent
OnExit, ExitRoutine
xpos := A_ScreenWidth/2
ypos := A_ScreenHeight/2
hDrwArea := DllCall("GetDC", "uint", Null)
SetTimer, SetPixel, 1
SetPixel:
DllCall("SetPixel", "uint", hDrwArea, "int", xpos, "int", ypos, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos, "int", ypos - 2, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos, "int", ypos + 2, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 2, "int", ypos, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 2, "int", ypos, "uint", 255, "uint", 0, "uint", 0)
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 6, "int", ypos - 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 6, "int", ypos - 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 6, "int", ypos + 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 6, "int", ypos + 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 6, "int", ypos + 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 6, "int", ypos - 6, "uint", 255, "uint", 0, "uint", 0)
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 9, "int", ypos - 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 9, "int", ypos - 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 9, "int", ypos + 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 9, "int", ypos + 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 9, "int", ypos + 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 9, "int", ypos - 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos, "int", ypos, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos, "int", ypos - 2, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos, "int", ypos + 2, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 2, "int", ypos, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 2, "int", ypos, "uint", 255, "uint", 0, "uint", 0)
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 6, "int", ypos - 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 6, "int", ypos - 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 6, "int", ypos + 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 6, "int", ypos + 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 6, "int", ypos + 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 6, "int", ypos - 6, "uint", 255, "uint", 0, "uint", 0)
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 9, "int", ypos - 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 9, "int", ypos - 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 9, "int", ypos + 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 9, "int", ypos + 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 9, "int", ypos + 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 9, "int", ypos - 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos, "int", ypos, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos, "int", ypos - 2, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos, "int", ypos + 2, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 2, "int", ypos, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 2, "int", ypos, "uint", 255, "uint", 0, "uint", 0)
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 6, "int", ypos - 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 6, "int", ypos - 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 6, "int", ypos + 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 6, "int", ypos + 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 6, "int", ypos + 6, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 6, "int", ypos - 6, "uint", 255, "uint", 0, "uint", 0)
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 9, "int", ypos - 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 9, "int", ypos - 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 9, "int", ypos + 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 9, "int", ypos + 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos - 9, "int", ypos + 9, "uint", 255, "uint", 0, "uint", 0)
DllCall("SetPixel", "uint", hDrwArea, "int", xpos + 9, "int", ypos - 9, "uint", 255, "uint", 0, "uint", 0)
Return
ExitRoutine:
ExitApp