Author Topic: Trying to add an AutoHotKey GUI on top of my game, fails.  (Read 412 times)

0 Members and 1 Guest are viewing this topic.

Offline Kiloku

  • 27
  • I like to code. Code doesn't like me.
    • Minecraft
Trying to add an AutoHotKey GUI on top of my game, fails.
I'm modifying an AHK script I found elsewhere, which was previously used to display mouse coords. My goal is to simply display my current Controller mode, as I'm using XPadder to switch between modes.

This is the code I have at the moment:
Code: [Select]
; Example: On-screen display (OSD) via transparent window:
#SingleInstance, force
CustomColor = EEAA99  ; Can be any RGB color (it will be made transparent below).
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow  ; +ToolWindow avoids a taskbar button and an alt-tab menu item.
Gui, Color, %CustomColor%
Gui, Font, s28  ; Set a large font size (32-point).
Gui, Add, Text, vMyText cLime, XXXXXXXXXXXXXXXXXXXXX  ; to auto-size the window.
; Make all pixels of this color transparent and make the text itself translucent (150):
WinSet, TransColor, %CustomColor% 200
Gui, Show, x0 y400 NoActivate  ; NoActivate avoids deactivating the currently active window.
return


!1::Gosub, Mode1
!2::Gosub, Mode2

Mode1:
GuiControl,, MyText, Mode 1 Selected
return

Mode2:
GuiControl,, MyText, Mode 2 Selected
return

Documentation states that the +AlwaysOnTop parameter should do what I want, but when I start FSO, it gets hidden under the game. I saw nothing saying that it doesn't work with OpenGL or something like that.

Does anyone who knows AHK and FSO know what to do?

(I'm using FSO 3.8.0 SSE2, btw)

  

Offline Kiloku

  • 27
  • I like to code. Code doesn't like me.
    • Minecraft
Re: Trying to add an AutoHotKey GUI on top of my game, fails.
I figured out that if I use -window instead of -fullscreen_window, it works fine. In -window mode, the window is positioned perfectly such that I don't see the borders, so it makes no practical difference in that regard.

I wonder why it doesn't work with -fullscreen_window, though.