Mein Request wäre eine Convertierung eines AutoHotkey Scripts zu Autoit.
Es ist ein Combat Mode für Guild Wars 2, es beinhaltet MOUSLOOK, die freie Belegung der Maustasten, des Mausrads und ein Fadenkreuz.
Natürlich habe ich Google mit der Suche gequält, aber nix passendes für Autoit gefunden.
English:
My request is a conversion of an autohotkey script to autoit source code.
This script is a combat mode for Guild Wars 2 with mouselook, konfigurable mouse buttons and a crosshair.
Original Autohotkey Script:
Code:
#SingleInstance force
#NoEnv
#UseHook
#MaxThreadsBuffer On
#MaxHotkeysPerInterval 200
#KeyHistory 0
SendMode Input
SetKeyDelay, -1
SetBatchLines -1
SetWorkingDir %A_ScriptDir%
; Tray Menu
Menu, Tray, NoStandard
Menu, Tray, Add, Reload, ReloadScript
Menu, Tray, Add, Exit, Exit
onexit Exit
; Settings
IniRead, hkToggle, %A_ScriptDir%\GW2CmLite.ini, Keybinds, TOGGLE, LAlt
IniRead, hkLMB, %A_ScriptDir%\GW2CmLite.ini, Keybinds, LMB, 1
IniRead, hkRMB, %A_ScriptDir%\GW2CmLite.ini, Keybinds, RMB, 2
IniRead, hkMWU, %A_ScriptDir%\GW2CmLite.ini, Keybinds, MWU, ^
IniRead, hkMWD, %A_ScriptDir%\GW2CmLite.ini, Keybinds, MWD, ^
IniRead, y_cross_pos, %A_ScriptDir%\GW2CmLite.ini, Crosshair, YPOS, 0.40
; Initialization
bActive := false
iYPos := (A_ScreenHeight*y_cross_pos) - 30
iXPos := (A_ScreenWidth/2 - 4)
; Register Hotkeys
Hotkey, IfWinActive, ahk_class ArenaNet_Dx_Window_Class
Hotkey,%hkToggle%,ToggleCombatMode
return
; Trap the following keys in Guild Wars 2
#IfWinActive, ahk_class ArenaNet_Dx_Window_Class
$LButton::
if (bActive == true){
send, {%hkLMB%}
} else {
Click down left
KeyWait, LButton
Click up left
}
return
$RButton::
if (bActive == true) {
send, {%hkRMB%}
} else {
Click down right
KeyWait, RButton
Click up right
}
return
$WheelUp::
if (bActive == true){
send, {%hkMWU%}
} else {
send, {WheelUp}
}
return
$WheelDown::
if (bActive == true){
send, {%hkMWD%}
} else {
send, {WheelDown}
}
return
#IfWinActive
ToggleCombatMode:
if (bActive == false) {
bActive := true
BlockInput, MouseMove
DllCall("SetCursorPos", int, (iXPos) , int, (iYPos))
send {LButton up}
send {RButton down}
MouseMove 4, 0, 0, R
sleep, 50
BlockInput, MouseMoveOff
SplashImage, crosshair.bmp,y%iYPos% b,,,Crosshair ;Crosshair Image
WinSet, TransColor, Lime, Crosshair
Sleep, 50
SplashImage, Show,,,Crosshair
} else {
deactivate()
}
return
ReloadScript:
Reload
return
Exit:
ExitApp
return
; Combat Mode Off
deactivate(){
global bActive
SplashImage, Off
send, {RButton Up}
bActive := false
return
}