Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
Show current game playing plugin?
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Show current game playing plugin?
Hi guys. I was thinking about a plugin for showing which game are you playing.
Could be a plugin that shows if an exe from a txt file is running, and show the name according to the txt file.
Just, if xxx.exe (game exe or whatever you want) is running, show xxxx (correct game, app, etc name)
User will have to check the .exe name and write it on the txt file.
ie. txt file
dyinglight.exe = Dying Light
bf5.exe = Battlefield V
So it will show Dying light instead of dyinglight.exe
Any other suggestion is welcome.
Thanks.
Could be a plugin that shows if an exe from a txt file is running, and show the name according to the txt file.
Just, if xxx.exe (game exe or whatever you want) is running, show xxxx (correct game, app, etc name)
User will have to check the .exe name and write it on the txt file.
ie. txt file
dyinglight.exe = Dying Light
bf5.exe = Battlefield V
So it will show Dying light instead of dyinglight.exe
Any other suggestion is welcome.
Thanks.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
This should be fairly easy, I'll have a look over the next few days.
There was a plugin called 'activ' I think which you could do something similar by putting it in line in the smartie display e.g. something like:
$if($dll(activ,1,"game.exe",),"this game",,)
but I'll have a play anyway.
There was a plugin called 'activ' I think which you could do something similar by putting it in line in the smartie display e.g. something like:
$if($dll(activ,1,"game.exe",),"this game",,)
but I'll have a play anyway.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Show current game playing plugin?
Hi. Thanks. Couldnt find that plugin but seems to be the same purpose I was looking for.dperrow wrote:This should be fairly easy, I'll have a look over the next few days.
There was a plugin called 'activ' I think which you could do something similar by putting it in line in the smartie display e.g. something like:
$if($dll(activ,1,"game.exe",),"this game",,)
but I'll have a play anyway.
Also could be used for other programs. But other programs has more chance to be running at the same time. Not sure how the plugin should handle this. Maybe if more than one program is active, just show all of them in different screens.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
Okay, here we go. the attached dll goes in the plugins file along with the cfg file.
it gets called in smartie by $dll(Chkexe,1,,)
the cfg file contains what you suggested but things to note are:
a hash(#) at the start of a line means that line is ignored, for comments etc.
the line format is thing.exe=output string
the whole line is case sensitive
note that you need the .exe included in the string
no spaces before the exe or before or after the =
try it and let me know.
it gets called in smartie by $dll(Chkexe,1,,)
the cfg file contains what you suggested but things to note are:
a hash(#) at the start of a line means that line is ignored, for comments etc.
the line format is thing.exe=output string
the whole line is case sensitive
note that you need the .exe included in the string
no spaces before the exe or before or after the =
try it and let me know.
You do not have the required permissions to view the files attached to this post.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
ignore the counter.zip please. slip of the finger!!!
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Show current game playing plugin?
dperrow wrote:ignore the counter.zip please. slip of the finger!!!
Hi. Downloaded chkexe.zip.
Tried chrome browser, worked fine. Tried some games and worked but with a few exceptions.
I noticed that if a game or app is run as admin, wont show on lcd screen.
Not sure if this can be solved.
Thanks!
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
trying to get info on an admin process from a user process sounds like a direct violation of Windows security so this doesn't entirely surprise me. Short term solution would be to run LcdSmartie as admin which I've tried and it seems to work. However, I'll have a look at the windows API and see if can be done from a user process.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
okay, found a way to lower the access made to get the process name so give this a try and let me know.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Show current game playing plugin?
dperrow wrote:okay, found a way to lower the access made to get the process name so give this a try and let me know.
Hi. Thanks!
Yes, works great now for apps that require admin privileges. So no need to run lcdsmartie as admin

Will configure a couple of .exe and see how it goes.
There should be any entries limit for .exe cfg file list?
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
I set the limit to 16 and the maximum string size to 64 but I can increase these easily.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Show current game playing plugin?
dperrow wrote:I set the limit to 16 and the maximum string size to 64 but I can increase these easily.
Hi. You mean 16 games on the list?
I think it should be increased to 100 at least

I have many emulators that could add to the list, among media players, apps, etc
It will be great if you can increase it

String size maybe up to 96? 64 should be fine, but there are some games with really large names. Just to make it future proof

Thanks
Edit. I was wondering if we can have some kind of info on the second lcd line.
It will be a little more difficult I guess. But we can add some description of the app or game to a second line that should show on the second line on the lcd?
I mean ie cfg file:
Mkx.exe=Mortal Kombat X
Mkx.exe=Fighting Game Released on 2015 Up To 2 players, etc.
Maybe using something like
1mkx.exe=
2mkx.exe=
So 1 will be showed on lcd line 1 and 2 on second line/row.
Last edited by trihy on April 25th, 2019, 6:26 pm, edited 1 time in total.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
Okay, i've increased the limit to 256 and the maximum string size to 128.
I've also added function 2 to do something the same as the Activ dll it takes 2 parameters, the exe name and what to return if it's active. e.g.
$dll(Chkexe,2,firefox.exe,Browser)
have fun....
I've also added function 2 to do something the same as the Activ dll it takes 2 parameters, the exe name and what to return if it's active. e.g.
$dll(Chkexe,2,firefox.exe,Browser)
have fun....
You do not have the required permissions to view the files attached to this post.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Show current game playing plugin?
dperrow wrote:Okay, i've increased the limit to 256 and the maximum string size to 128.
I've also added function 2 to do something the same as the Activ dll it takes 2 parameters, the exe name and what to return if it's active. e.g.
$dll(Chkexe,2,firefox.exe,Browser)
have fun....
Thanks! That was really fast. Let me check later when on the pc. And report back

-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Show current game playing plugin?
dperrow wrote:Okay, i've increased the limit to 256 and the maximum string size to 128.
I've also added function 2 to do something the same as the Activ dll it takes 2 parameters, the exe name and what to return if it's active. e.g.
$dll(Chkexe,2,firefox.exe,Browser)
have fun....
Hi. Not sure how to work with the second line.
I did this
$dll(Subst,1,$dll(Chkexe,1,,),)
And
$dll(Subst,1,$dll(Chkexe,2,DyingLightGame.exe,Dying Light es un juego de acción en primera persona del género survival horror),)
And works great, but second line should be defined on cfg file, If not it will be only for this particular game. Right?
Also since game description are quite large, maybe string size for line 2 should be a little higher.
Sorry for the on the fly changes

-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
what if i put a / in the string to indicate the second, third and fourth display lines and added a parameter to the dll call to select which line e.g.
game1.exe=line 1 display/line 2 display/line three display
$dll(Chkexe,1,1,) would show "line 1 display"
$dll(Chkexe,1,2,) would show "line 2 display"
$dll(Chkexe,1,3,) would show "line three display"
$dll(Chkexe,1,4,) would show nothing
what do you think?
game1.exe=line 1 display/line 2 display/line three display
$dll(Chkexe,1,1,) would show "line 1 display"
$dll(Chkexe,1,2,) would show "line 2 display"
$dll(Chkexe,1,3,) would show "line three display"
$dll(Chkexe,1,4,) would show nothing
what do you think?
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
Hi,
I've implemented this but rather than change what is working i've added it as function 3.
So the idea is that you put a / in the string to indicate the second, third and fourth display lines and added a parameter to the dll call to select which line e.g.
game1.exe=line 1 display/line 2 display/line three display
$dll(Chkexe,3,1,) would show "line 1 display"
$dll(Chkexe,3,2,) would show "line 2 display"
$dll(Chkexe,3,3,) would show "line three display"
$dll(Chkexe,3,4,) would show nothing
as usual, let me know how it goes.
I've implemented this but rather than change what is working i've added it as function 3.
So the idea is that you put a / in the string to indicate the second, third and fourth display lines and added a parameter to the dll call to select which line e.g.
game1.exe=line 1 display/line 2 display/line three display
$dll(Chkexe,3,1,) would show "line 1 display"
$dll(Chkexe,3,2,) would show "line 2 display"
$dll(Chkexe,3,3,) would show "line three display"
$dll(Chkexe,3,4,) would show nothing
as usual, let me know how it goes.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
oops, no attachment. Here we go.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Show current game playing plugin?
dperrow wrote:oops, no attachment. Here we go.
Hi. Thanks for all the great work. Seems a nice approach doing that way.
I tried this
$dll(Chkexe,3,1,)
$dll(Chkexe,3,2,)
And on cfg file this
DyingLightGame.exe=Dying Light/Dying Light es un juego de acción en primera persona del género survival horror, el cual se desarrolla durante un apocalipsis zombie
Works fine for first line, but only show this part on second line:
Dying Light es un juego de acción en primera persona del género survival horror, el cual se des
And start over
Its missing:
arrolla durante un apocalipsis zombie
Seems it`s showing around 90 characters. Maybe this needs to be increased? If it need this, maybe 256 characters will be fine or even 512. Descriptions are always large.
Thanks
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Show current game playing plugin?
Hi again.
Been playing a game for 20 minutes or so. And noticed that second line scroll started to lag a lot.
Then I checked task manager and lcdsmartie was using between 5 and 10% cpu usage. I have this plugin and scp2. When lcdsmartie switch to scp2, cpu use is 0,1%, when changes to chkexe it goes again to 5-10%. Not sure if this can be improved.
Thanks
Been playing a game for 20 minutes or so. And noticed that second line scroll started to lag a lot.
Then I checked task manager and lcdsmartie was using between 5 and 10% cpu usage. I have this plugin and scp2. When lcdsmartie switch to scp2, cpu use is 0,1%, when changes to chkexe it goes again to 5-10%. Not sure if this can be improved.
Thanks
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
Don't see why it should be using 5-10% cpu, doesn't on mine but I'll keep looking.
Meanwhile I increased the string size to 512 and decreased the min refresh interval to see if that will do anything.
Meanwhile I increased the string size to 512 and decreased the min refresh interval to see if that will do anything.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Show current game playing plugin?
dperrow wrote:Don't see why it should be using 5-10% cpu, doesn't on mine but I'll keep looking.
Meanwhile I increased the string size to 512 and decreased the min refresh interval to see if that will do anything.
Hi. Thanks.
Tried but cpu usage still goes high. Even frequency step up from 800mhz to 2.5ghz when chkexe is on screen and goes back to 800mhz when other plugin is on screen.
Here are my lcdsmartie settings and chkexe cfg file if you want to replicate it. Also uploaded cpu usage when chkexe is on screen. Then goes to 0,1% using clock or scpv2 plugins.
You do not have the required permissions to view the files attached to this post.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
I suspect that the high usage is because of the dll check interval being set to 30ms combined with the amount of code being executed. Do you really need it refreshing 33 times a second??? I'll have a look at optimizing the code anyway.
BTW there was a 128 character line limit elsewhere in the program which I've fixed and will issue with the next update.
BTW there was a 128 character line limit elsewhere in the program which I've fixed and will issue with the next update.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
Made some changes, optimized code a bit, so try this. No real scope to optimize further cpu use must be caused by context switching between user mode and system to get process info.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Show current game playing plugin?
dperrow wrote:Made some changes, optimized code a bit, so try this. No real scope to optimize further cpu use must be caused by context switching between user mode and system to get process info.
Hi. Im not sure why Im using 30ms dll check. Maybe winamp equalizer required this? Cant remember when I changed this. SCPv2 will be fine with 50 or more ms?
Tried new build of chkexe and cpu usage went down to 0,9-1%. Not sure what changed to the code but it`s a really great improvement!
Later will try to change the dll check interval and report back.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Show current game playing plugin?
hi, here's something else to try. I've added function 4 same parameters as function 3 and does the same thing except that it uses the values returned by the previous f1 or f3 call so uses very little cpu. So if you have 2 lines on display you can use:
$dll(Chkexe,3,1,)
$dll(Chkexe,4,1,)
$dll(Chkexe,3,1,)
$dll(Chkexe,4,1,)