Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 28, 2016, 10:28:35 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Looking for White-on-Black or Transparent Menu-Less Text Displayer  (Read 6072 times)

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,060
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #50 on: September 15, 2015, 10:27:42 PM »
Just uploaded a new version of TextOverlayTool that might solve your problem.  Again, it depends on whether your application is Full Screen, or Full Screen Windowed.  If it's full screen, it would require a lot of low level coding and display via the mechanism it is using to draw, i.e. OpenGL or DirectX.  If it's fullscreen windowed, this should work.

I mentioned above I cannot use Full Screen.  I can only use windowed mode, so you're safe there.  I'll give it a test and report back.  Thanks.

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,060
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #51 on: September 15, 2015, 11:11:01 PM »
Just uploaded a new version of TextOverlayTool that might solve your problem.  Again, it depends on whether your application is Full Screen, or Full Screen Windowed.  If it's full screen, it would require a lot of low level coding and display via the mechanism it is using to draw, i.e. OpenGL or DirectX.  If it's fullscreen windowed, this should work.

Not working yet, but is the ahk_class, "TextOverlayToolView" or something else?  The "TextOverlayToolView" as ahk_class does not work.


wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,274
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #52 on: September 16, 2015, 09:44:13 AM »
Hmmm.. that's the class in C#.  I haven't worked in AHK much... what is it actually looking for?  The name?  Or the Handle?

I found this.. .maybe it could be wrapped up to get the window class that AHK is looking for?

Code: Autohotkey [Select]
  1. WinGetClass, class, A
  2. MsgBox, The active window's class is "%class%".

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,060
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #53 on: September 16, 2015, 01:51:52 PM »
Unfortunately, that code will only give the class of the active window which can only be a folder or the Desktop.  I will be researching how to read the class of desired "active" window instead.

@MilesAhead - I might be able to use the existing script if I can make it Always-On-Top.  How can I do that?


wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,274
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #54 on: September 16, 2015, 04:00:45 PM »
http://ahkscript.org...ands/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.

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,060
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #55 on: September 16, 2015, 04:12:45 PM »
http://ahkscript.org...ands/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.

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

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,274
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #56 on: September 16, 2015, 04:20:10 PM »
I'll try also when I get home.  Never worked with AHK, and this looks like a good excuse to try :)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,161
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #57 on: September 16, 2015, 04:31:48 PM »
I'll try also when I get home.  Never worked with AHK, and this looks like a good excuse to try :)

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

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,274
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #58 on: September 16, 2015, 08:13:38 PM »
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 [Select]
  1. SetWorkingDir %A_ScriptDir%
  2. return
  3.  
  4. ; instead of Progman for desktop change to the
  5. ; class for Flight Simulator (use WinSpy to get it)
  6. #IfWinActive ahk_class FS98MAIN
  7. $Down::
  8. ; instead of class for Notepad use the class
  9. ; for Stickies
  10. ControlSend,,{Down},ahk_class HwndWrapper\[TextOverlayTool.exe;;[\da-f\-]+]
  11. return


What follows is the script that I actually used:

Code: Autohotkey [Select]
  1. ^k::
  2.         SetTitleMatchMode, Regex
  3.         totclass = HwndWrapper\[TextOverlayTool.exe;;[\da-f\-]+]
  4.         WinGetClass, class, A
  5.         IfWinExist, ahk_class %totclass%
  6.         {
  7.                 WinActivate  ; Automatically uses the window found above.
  8.                 Send, {Up}
  9.         }
  10.         WinActivate ahk_class %class%
  11.        
  12. 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

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,274
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #59 on: September 16, 2015, 09:38:24 PM »
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.

overlaytool.pngLooking for White-on-Black or Transparent Menu-Less Text Displayer

Let me know if that works.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,274
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #60 on: September 16, 2015, 09:47:09 PM »
Playing around some more- there's another problem that if something else is modal (SSC screen for instance), then I can't make it on top while it's modal, then after, it doesn't become topmost again, because I already tried and failed.  *sigh*

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,060
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #61 on: September 18, 2015, 02:27:47 PM »
@MilesAhead - Thanks for that heads-up.  It looks like a good resource, but I probably need to learn AHK better so I can ask intelligent questions.

@wraith808 - I appreciate your work on our efforts.  Fortunately, I have a usable workaround with the Desktop Coral/Notezilla/AHK combo, so we can take some time.  Frankly, I have a bit of a gimpy noodle and am somewhat overwhelmed trying to keep the AHK code straight in my mind.  Overload!  I will report back after awhile, hopefully with a solution. 

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,161
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #62 on: September 18, 2015, 02:38:11 PM »
@MilesAhead - Thanks for that heads-up.  It looks like a good resource, but I probably need to learn AHK better so I can ask intelligent questions.

They have no problem helping newbs to the language.  About the only things that annoy the regulars there are things like saying "it doesn't work" without telling what happens when it doesn't work or "I get errors" without specifying the errors, or refusal to post a test case that shows the problem.

Everyone has a bit of trouble with AHK syntax when starting out since it mixes old and new syntax styles.

But in any case it's up to you.  :)

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,060
    • View Profile
    • Donate to Member
Re: Looking for White-on-Black or Transparent Menu-Less Text Displayer
« Reply #63 on: September 18, 2015, 02:43:51 PM »
@MilesAhead - Thanks for that heads-up.  It looks like a good resource, but I probably need to learn AHK better so I can ask intelligent questions.

They have no problem helping newbs to the language.  About the only things that annoy the regulars there are things like saying "it doesn't work" without telling what happens when it doesn't work or "I get errors" without specifying the errors, or refusal to post a test case that shows the problem.

Everyone has a bit of trouble with AHK syntax when starting out since it mixes old and new syntax styles.

But in any case it's up to you.  :)


Thanks for that.  I'll keep your words in mind.