Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; This is automatically generated file by XIM Link
- ; XIL Version=1,ForceOverwrite=False
- SetWorkingDir %A_AppData%\XIM Link\ScriptAdditionals\
- #SingleInstance force
- #UseHook On
- Suspend On
- if (A_PtrSize = 8)
- global XIL_libFile := "AhkLink64"
- else
- if (A_PtrSize = 4)
- global XIL_libFile := "AhkLink"
- global XIL_libFileModule := DllCall("LoadLibrary", "Str", XIL_libFile)
- OnExit("ExitCleanup")
- ExitCleanup(ExitReason, ExitCode)
- {
- DllCall("FreeLibrary", "Ptr", XIL_libFileModule)
- return 0
- }
- XIL_HostHandle = %1%
- DetectHiddenWindows, on
- XIL_ScriptHandle := WinExist("ahk_pid" DllCall("GetCurrentProcessId")) + 0
- XIL_ProcessID := 0
- WinGet, XIL_ProcessID, PID
- XIL_ProcessID := XIL_ProcessID + 0
- DllCall( XIL_libFile "\CopyDataCallback", "Int", XIL_HostHandle, "Int", XIL_ScriptHandle, "Int", XIL_ProcessID)
- OnMessage(WM_COPYDATA:=74, "WMCopyData")
- WMCopyData(wParam, lParam, msg, hWnd)
- {
- local XIL_ret := DllCall( XIL_libFile "\CopyDataParsing", "UInt", hWnd, "Uint", msg, "UInt", wParam, "UInt", lParam)
- if (XIL_ret = 1)
- Suspend On
- if (XIL_ret = 2)
- Suspend Off
- if (XIL_ret = 3)
- Reload
- return
- }
- XIMInputData(Function, Value1, Value2 := "null")
- {
- global XIL_HostHandle
- global XIL_ScriptHandle
- if (Function = "LeftStickDirectional" || Function = "RightStickDirectional")
- {
- if (Value2 = "null")
- {
- Value2 := 100.0
- }
- if (Value1 < 0)
- {
- Value1 := 0
- Value2 := 0
- }
- }
- DllCall( XIL_libFile "\DataInput", "Int", XIL_HostHandle, "Int", XIL_ScriptHandle, "Str", Function, "Double", Value1, "Double", Value2)
- }
- SetWorkingDir %A_ScriptDir%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement