mhmdfvc / gtaradioplayer Goto Github PK
View Code? Open in Web Editor NEWA script that sends hotkeys for the purpose of controlling an external media player as if it were in-game GTA radio.
A script that sends hotkeys for the purpose of controlling an external media player as if it were in-game GTA radio.
So that it can be used with literally any media player without the hotkey mess. But this seems really complicated and I couldn't get much working.
Example of script I'd found for doing this with Spotify:
DetectHiddenWindows, On
getSpotifyHwnd() {
WinGet, spotifyHwnd, ID, ahk_exe spotify.exe
; We need the app's third top level window, so get next twice.
spotifyHwnd := DllCall("GetWindow", "uint", spotifyHwnd, "uint", 2)
spotifyHwnd := DllCall("GetWindow", "uint", spotifyHwnd, "uint", 2)
Return spotifyHwnd
}
spotifyKey(key) {
spotifyHwnd := getSpotifyHwnd()
; Chromium ignores keys when it isn't focused.
; Focus the document window without bringing the app to the foreground.
ControlFocus, Chrome_RenderWidgetHostHWND1, ahk_id %spotifyHwnd%
ControlSend, , %key%, ahk_id %spotifyHwnd%
Return
}
-::
{
;SendMessage,0x0400,0,122,,ahk_exe foobar2000.exe
;ControlClick, x382 y43, "ahk_exe foobar2000.exe"
;MsgBox, WinID: %WinID%`nControlID: %ControlID%
;ControlSend,Edit1,Kippa,ahk_exe notepad.exe
spotifyKey("{Space}")
return
}
Because apparently it's easy.
Suggested by Nabn00b
There's multiple different approaches to it, the one at https://www.autohotkey.com/boards/viewtopic.php?t=57994 seems to work pretty well with GitHub-hosted AHK scripts like this one.
Anti got started on this for GTA3 but it doesn't work consistently and is not suitable for release yet.
testing this will be annoying because it doesn't always happen
Probably super easy, just need to get around to it. The version detection is already in the code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.