ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Looking for White-on-Black or Transparent Menu-Less Text Displayer

<< < (12/13) > >>

CodeTRUCKER:
http://ahkscript.org/docs/commands/WinGetClass.htm

It looks like it's the active window for that one declaration.  You can use the window title or text to get it also.
-wraith808 (September 16, 2015, 04:00 PM)
--- End quote ---

Thanks.  I'll work with it and see what I can make happen.  I will report back once I have something figured out.

wraith808:
I'll try also when I get home.  Never worked with AHK, and this looks like a good excuse to try :)

MilesAhead:
I'll try also when I get home.  Never worked with AHK, and this looks like a good excuse to try :)
-wraith808 (September 16, 2015, 04:20 PM)
--- End quote ---

If I may be so presumptuous as to make a suggestion, go to this site:
http://ahkscript.org/boards/index.php

Lexikos is the man who forked ahk to a version that emphasizes expressions and objects so that it acts more like other programming languages.  Plus he regularly hangs on the forums and answers questions about implementation intrinsics and stuff.  His version used to be called AutoHotkey_L but now it is just a fork of ahk.  You can still write quick and dirty scripts without declaring variables in advance of use etc.. for those few line quickies.   ;D

wraith808:
Using AHK, This is what I was able to get:

---------------------------
GetWindowClass.ahk
---------------------------
The active window's class is "HwndWrapper[TextOverlayTool.exe;;ad8ebf4a-4653-4ee9-ad96-c472c3c202f6]".
---------------------------
OK   
---------------------------

And that was with that default code.  You just have to click on the TextOverlayTool window and click the hotkey.  And I get what you mean by windowspy now- the utility that comes with AHK.

With that, I figured out the problem.  There is a guid attached to the window - I guess to disambiguate multiple instances.  Notice the guid at the end of mine is different than the guid at the end of yours.  You'll have to use the following in your code:


--- Code: Autohotkey ---#SingleInstance ignore#NoEnvSendMode InputSetWorkingDir %A_ScriptDir%return ; instead of Progman for desktop change to the; class for Flight Simulator (use WinSpy to get it)SetTitleMatchMode, Regex#IfWinActive ahk_class FS98MAIN$Down::; instead of class for Notepad use the class; for StickiesControlSend,,{Down},ahk_class HwndWrapper\[TextOverlayTool.exe;;[\da-f\-]+]return

What follows is the script that I actually used:


--- Code: Autohotkey ---^k::        SetTitleMatchMode, Regex        totclass = HwndWrapper\[TextOverlayTool.exe;;[\da-f\-]+]        WinGetClass, class, A        IfWinExist, ahk_class %totclass%        {                WinActivate  ; Automatically uses the window found above.                Send, {Up}        }        WinActivate ahk_class %class%        return
It's a bit messy, and won't work for markdown files as the control can't get a focus in that case, so I'd have to manually focus it.  But for your purposes, as long as you load the file and set the cursor into the control, it should work.

And it was an interesting delve into AHK.  I used the basic version, as I wasn't sure that the other version would work with SciTE4AutoHotkey, and I wanted debugging to see what was going on.  But it was easy to get up and running in it.

wraith808:
Ok, after playing around a bit, I think I might know why it's still not on top.  I have to figure out a good way to fix it... but after getting your flight sim up, select the window for TextOverlayTool.  Then position it over your Flight Sim.  I was trying it out with Star Wars: The Old Republic in full screen windowed.  At first it wasn't on top... but then when I focused it on top, and went back to the game, it worked fine (shown below).  I'm bringing the window back topmost when the window is deactivated, and without that deactivate, it's only using the regular topmost method.

Looking for White-on-Black or Transparent Menu-Less Text Displayer

Let me know if that works.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version