Jump to content
LaunchBox Community Forums

LBCC - Open-Source cursor hiding thing.


Recommended Posts

Hi all,
I've seen a few cursor removal tools on the forum. Figured I'd make one open source, and with some extra functionality so as to make my life easier. Long story short, you simply add the window titles you want to hide to config.txt, and it hides your cursor when those windows are present.

Contents:

LaunchBox Cursor Changer.exe - Add as an additional application through launchbox to hide the cursor for a specific emulator. Will stop itself once the target program has exited. It's got a built-in timer, so even if your emulator takes a while to show up, it won't matter. If you're having issues getting it to target the correct window, you can edit the config.txt on-the-fly, it will recognize the changes.

LaunchBox Cursor Changer NoQuit.exe - Run this separate from launchbox so as to constantly hide the cursor for all windows in config.txt, without having to add it as an additional application. Same as above re: config.txt

config.txt - Text file containing the window titles for which you want the cursor to be hidden. (Ex: "Retroarch", "Snes9x", etc). It's not case sensitive, and will match substrings, so as long as the main title remains the same, version numbers shouldn't change anything.

Normal.cur - Normal cursor icon used to reinstate cursor after hiding is completed.

Hidden.cur - Transparent cursor icon the cursor is changed to once the program detects that one of the target windows from config.txt is active.

Warning - There is a reason why most programs don't globally hide the cursors, things can go wrong. The program has multiple failsafes built in to reinstate the normal cursor if something goes catastrophically wrong, and it is also the first thing is does on a new run, so, If your mouse cursor disappears, and you didn't want it to, either re-launch the program (it will reinstate the cursor), load a target application and exit it (it will reinstate the cursor) or restart windows. This shouldn't really be a problem, as I don't see how it could happen, but still. I don't want a bunch of people mad at me :P.

All in all, this is a beta version, I've played around with it a lot and it works well. I'll remove the console once I've gotten some feedback from people :).

P.s. I know my code is all horrific and nausea-inducing. Gives me nightmares as well. 

UPDATE:

- LBCC still checks for window names initially so as to make window matchin easy for end-users, but then grabs PIDs to monitor processes so as to correct for windows that have changing names. What does this mean? Simply, LBCC only needs to grab one of any of the window names that a program uses. @Maddoc1007, this should solve the issue you were having.

- LBCC normal version (no the NoQuit version) now has a five second window before closing automatically, instead of automatically ending when it loses sight of a process. Should correct for processes that end and spawn new processes.

- Debug console now is minimized at all times, except when encountering an error. One step forward to removing it completely. Should be gone soon, once I'm happy with the results.

FAQ:

- My cursor disappears even though the program I listed isn't active! What gives?

A: LBCC checks window names for any match between the text you entered in the config file and *any* opened window. So, if you have a website with "Snes9x" in the title open somewhere, and "snes9x" is in your config file, it will assume that this may be a new version of snes9x and hide your cursor. Either be more specific in your entries in config.txt, or make sure no windows are open that may screw up the search algorithm :).

LaunchBox Cursor Changer.zip

Source.zip

SourceV2.zip

LaunchBox Cursor Changer v2.zip

Edited by Vlansix
update
Link to comment
Share on other sites

@Vlansix Very cool will try this out later, on a side note could you create something like this to say have an emulator go fullscreen ie demul for Sega Hikaru games (using a standalone version of demul for hikaru games) that will press Alt+F4 on your keyboard after the emulator has started, have tried autohotkey scripts but on the most they don't seem to work or not as intended for the Alt+F4 and dont work if added to the emulator autohotkey, or even a how to if you have this working would be appreciated.

Link to comment
Share on other sites

@Maddoc1007 - I'm just looking over demul and... well, I understand why you want these options. Basically, there's no means to get demul into fullscreen mode through command line, and no means to close it once it's fullscreen. Rightyo. I'm having a call of cthulhu night tonight, so i won't have it done today, but i'll have it up tomorrow.

Link to comment
Share on other sites

@Vlansix thats fine thank you will you try your cursor app with demul as well as cant seem to get it to hide the cursor even though i added demul to the config or do i need to add the exe as well ie:-demul.exe

 

sorry for the double post there seems to be a major problem with replying to posts at the moment as it seems it is not posting even though it apparently is

Edited by Maddoc1007
Link to comment
Share on other sites

@Maddoc1007 Aye, just looked into it. Seems to be working fine on my end. See, it checks for window names. Demul's window changes its name depending on what you're asking it to do. Make sure to add the correct window title :). for example, I added "Demul" and "gpu" to mine to get it to hide for demul.

Edited by Vlansix
Link to comment
Share on other sites

Yeah. Problem is the fact that Demul keeps changing the name of the window it is using, which makes the program think that the window it is tracking has closed. I'll add a fix tomorrow that addresses that in the normal version.

As for background, aye, once I get a bit more feedback i'll turn off the console. Right now though, it's handy to see what it's doing in case there are problems like this one :).

Edited by Vlansix
  • Like 1
Link to comment
Share on other sites

15 hours ago, Vlansix said:

Yeah. Problem is the fact that Demul keeps changing the name of the window it is using, which makes the program think that the window it is tracking has closed. I'll add a fix tomorrow that addresses that in the normal version.

As for background, aye, once I get a bit more feedback i'll turn off the console. Right now though, it's handy to see what it's doing in case there are problems like this one :).

Forgot to post, fix is uploaded. See description in first post.

  • Like 1
Link to comment
Share on other sites

@SentaiBrad No if you read my post i want sega hikaru to launch in fullscreen from a standalone demul, i have no problem with any other games naomi, naomi2 atomiswave going fullscreen, and know about the fullscreen setting.  But Sega hikaru games need you to alt+F4 in order to go fullscreen that is why i asked @Vlansix if he would be kind enough to create a little program for just sega hikaru through a standalone demul.

Link to comment
Share on other sites

@Maddoc1007 - Here's the program you requested, in part: 

Now, it launches hikaru games in fullscreen automatically. (it's not an emulator, it just passes keystrokes to the hikaru window), i'd need to know more about your setup to make something that works for you in relation to exiting the application. (i.e., what do you want to do to exit the application? Hit a specific key? A keyboard combination? A button on your arcade cab? etc)

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...