TitanWrapper - Titan One API for AHK (Control a gaming console from AHK, Hardware Required)

Post gaming related scripts
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

TitanWrapper - Titan One API for AHK (Control a gaming console from AHK, Hardware Required)

09 Jul 2017, 05:35

This is a C# DLL that you load via Lexikos' CLR library, which makes it easy to control a Titan One device from AutoHotkey.

The Titan One is a USB device that you control from a PC via a USB cable.
It has an input port on it that you can plug a Xbox / PS / Wii controller into

You can then either plug it into a PC or a Console (While still leaving the control cable attached to the PC) and it will fake a controller on that PC/Console.
The PC/Console will not be able to see the real controller.
It is also possible to control a controller on one PC from another PC using this device.

Using this library, you can subscribe to inputs on the real controller, much like you would with regular AHK hotkeys.
You can then call the library to set the state of the fake controller.

This sample code would remap Button 1 (Xbox A/PS Cross) to Button 2 (Xbox B / PS Circle) and Left Stick X to Left Stick Y:

Code: Select all

#SingleInstance force

; Load CLR library that allows us to load C# DLLs
#include CLR.ahk

; Instantiate class from C# DLL
asm := CLR_LoadLibrary("TitanWrapper.dll")
global titan := asm.CreateInstance("TitanWrapper.Wrapper")

; Subscribe to some buttons and axes on the Titan input port
titan.SubscribeButton(1, Func("ButtonEvent"))
titan.SubscribeAxis(1, Func("AxisEvent"))

ButtonEvent(state){
	; Press button 2 on Titan controller
	titan.SetButton(2, state)
}

AxisEvent(state){
	; Move axis 2 on Titan controller
	titan.SetAxis(2, state)
}

^Esc::
	ExitApp
Github Page
Downloads are in Releases Section
Documentation is on main page

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 26 guests