It is currently September 16th, 2019, 11:28 pm

Looking to be pointed in the right direction

Help with creating, editing & fixing problems with skins
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3539
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Looking to be pointed in the right direction

eclectic-tech » March 25th, 2019, 6:12 pm

Yes, text manipulation is a much less of a concern regarding lag; where as the size of the image being animated is what can really cause issues (I was thinking about that in my original reply :D ).

But I would still say moving text constantly (as in a marquee) is better done without using an ActionTimer measure. Of course that's just my opinion... some may do it that way.
ActionTimer simply was not intended to provide constant animation. :uhuh:

-=-
BTW, good luck with your 10,000 item reader project :o ... I cannot for the life of me understand the usefulness of that, but you already mentioned you are in the "It is possible" camp... I'll think I'll remain in the K.I.S.S. camp ;-)

EDIT: Actually, I have been reading your posts about your project, and would be interesting in seeing what you have accomplished (when you are ready to share) :thumbup:

Happy coding! :great:
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Looking to be pointed in the right direction

Yincognito » March 25th, 2019, 6:50 pm

eclectic-tech wrote:
March 25th, 2019, 6:12 pm
Yes, text manipulation is a much less of a concern regarding lag; where as the size of the image being animated is what can really cause issues (I was thinking about that in my original reply :D ).

But I would still say moving text constantly (as in a marquee) is better done without using an ActionTimer measure.
ActionTimer simply was not intended to provide constant animation. :uhuh:

-=-
BTW, good luck with your 10,000 item reader project :o ... I cannot for the life of me understand the usefulness of that, but you already mentioned you are in the "It is possible" camp... I'll think I'll remain in the K.I.S.S. camp ;-)

Happy coding! :great:
No need for luck anymore, it's already done and working perfectly (hopefully no unknown bugs) - I'm just a bit lazy to update the list of changes compared to the previous version, so I can post it here and on DeviantArt. In fact, I like so much how it turned out (you know, it might very well support more items, but I ran out of feed links before I could break the skin or its regexes, LOL) that now I try to shrink my other skins a few pixels more so that this one can fit next to them in the first row on my "small" 1366px laptop screen... 8-)

This morning I was calculating how much time would someone need to see 10000 items sliding at a random sliding time of 30 seconds per item, and boy I was terrified: 3 days and a half (days like 24h days). :rolmfao: But see, it's not so much about the number of items or feeds, but rather about being so flexible that it could work with pretty much any parameters the user likes to configure it with (since those parameters, from text size to feed links or items per feed, are easily editable through the Settings skin). And considering that I like round numbers, 100 (as in 100x100) seemed as good of a number as any other. Plus, when jsmorley doubted the possibility, that made me want to prove it even more, so...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3539
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Looking to be pointed in the right direction

eclectic-tech » March 25th, 2019, 7:08 pm

Image
"I just read 10,000 items over the past week!"


Kidding aside, nice work. Look forward to seeing the result. :rosegift:
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Looking to be pointed in the right direction

Yincognito » March 25th, 2019, 7:24 pm

eclectic-tech wrote:
March 25th, 2019, 7:08 pm
Kidding aside...
Thanks, you made my day :rolmfao:

I never said I read all those items though...
Crazy People.gif
I only said I built it... :sly:
Not Crazy People.gif
You do not have the required permissions to view the files attached to this post.
Ferbstorm
Posts: 36
Joined: March 9th, 2019, 12:50 am

Re: Looking to be pointed in the right direction

Ferbstorm » March 26th, 2019, 10:26 pm

Yincognito wrote:
March 25th, 2019, 2:44 pm
First question: you might want to investigate using the RunCommand plugin to run a command line along the lines of start /max winamp (I used winamp here, since this is my music player, but it might work with Musicbee as well). If that doesn't work, you might want to check Musicbee's documentation and see if there is a command line (or parameters that you can start Musicbee with) that can instruct it to start maximized, and then use the above RunCommand method to do what you aim for. The above command works for me as it opens up winamp even if it's minimized in the notification area or the taskbar. Just use the example at the bottom of the webpage I linked to, and replace wmic cpu get Name with the start /max winamp equivalent for Musicbee, see if it's working and then adapt it to your specific needs.
So unfortunately this won't work, as it looks like command prompt doesn't have any effect on programs that are already open. According to the help section though, the "Open Player" Command ought to bring the program to the front. So my theory is that there's an actual windows setting that's interfering with the program being brought to the front. Unfortunately I have no idea where to start looking for such a setting. Anyone have any ideas? I'm thoroughly stumped
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Looking to be pointed in the right direction

Yincognito » March 27th, 2019, 12:11 am

Ferbstorm wrote:
March 26th, 2019, 10:26 pm
So unfortunately this won't work, as it looks like command prompt doesn't have any effect on programs that are already open. According to the help section though, the "Open Player" Command ought to bring the program to the front. So my theory is that there's an actual windows setting that's interfering with the program being brought to the front. Unfortunately I have no idea where to start looking for such a setting. Anyone have any ideas? I'm thoroughly stumped
You can also try creating a shortcut that you configure to start the program maximized, and then run that shortcut through RunCommand. Other options are using some sort of script to do the job, or have an utility like NirCmd (make sure it's clean though) to help you do that. I tried again opening another minimized program than winamp using the method I wrote about, and it seems you're right: for example, doing the above for mspaint spans another mspaint window, instead of restoring the already existing (and minimized) one. I guess that the method worked in winamp's case because it was already configured to use a single program window when running (e.g. disabled running multi instances of the program).

Anyway, out of curiosity, what exactly happens when using that method? A new instance of musicbee is started or nothing happens at all?
Ferbstorm
Posts: 36
Joined: March 9th, 2019, 12:50 am

Re: Looking to be pointed in the right direction

Ferbstorm » March 27th, 2019, 12:43 am

Yincognito wrote:
March 27th, 2019, 12:11 am
You can also try creating a shortcut that you configure to start the program maximized, and then run that shortcut through RunCommand. Other options are using some sort of script to do the job, or have an utility like NirCmd (make sure it's clean though) to help you do that. I tried again opening another minimized program than winamp using the method I wrote about, and it seems you're right: for example, doing the above for mspaint spans another mspaint window, instead of restoring the already existing (and minimized) one. I guess that the method worked in winamp's case because it was already configured to use a single program window when running (e.g. disabled running multi instances of the program).

Anyway, out of curiosity, what exactly happens when using that method? A new instance of musicbee is started or nothing happens at all?
Nothing happens at all. At least with the "OpenPlayer" Command through Rainmeter there was a visible response, even if that response wasn't what I wanted.

So I've got NirCmd, and I thought the code I wrote for it is right, but it's not doing anything, so clearly not

Code: Select all

NirCMD=#@#C:\Program Files\NirCMD\nircmd.exe

LeftMouseUpAction=[#NirCMD# win max title "MusicBee"]

Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Looking to be pointed in the right direction

Yincognito » March 27th, 2019, 2:20 am

Ferbstorm wrote:
March 27th, 2019, 12:43 am
So I've got NirCmd, and I thought the code I wrote for it is right, but it's not doing anything, so clearly not

Code: Select all

NirCMD=#@#C:\Program Files\NirCMD\nircmd.exe

LeftMouseUpAction=[#NirCMD# win max title "MusicBee"]

You've installed NirCmd to C:\Users\[YourUserName]\Documents\Rainmeter\Skins\[YourSkinName]\@Resources\C:\Program Files\NirCMD\nircmd.exe?! :jawdrop Because that's exactly what your NirCMD variable looks like. Beside the fact that it's an invalid path (since there will be 2 C: substrings in your path), I'm confused as to why you didn't just install in directly in your Program Files folder, so that NirCMD would be "C:\Program Files\NirCMD\nircmd.exe" (without any #@#, which is the path to your current skin's @Resources folder). Anyway, that's not the problem (although fixing the path would give you another shot), read below...
Ferbstorm wrote:
March 27th, 2019, 12:43 am
Nothing happens at all. At least with the "OpenPlayer" Command through Rainmeter there was a visible response, even if that response wasn't what I wanted.
So, since these "Windows issues" usually make me wanna solve them, I've installed MusicBee and yes, nothing happens when trying to launch it with the program already running. I suspected this, after reading a couple of posts on their forum about the fact that the program doesn't really like to run in multiple instances (unless installed as portable and using different libraries), and I was proven right: nothing happens when you try to launch it ... because MusicBee itself is "killing" its second instance. This can be easily seen by clicking repeatedly on the skin below with Task Manager open (so you can see what's happening "behind the curtain"):

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Parameter=start "" /MAX /B "MusicBee"
State=Hide
OutputType=ANSI

[MeterRun]
Meter=String
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Click to Run
LeftMouseUpAction=[!CommandMeasure MeasureRun "Run"]

In other words, there is no problem on Rainmeter or CMD's end, as they launch the second MusicBee instance ... but only for its process to be killed by the existing MusicBee instance.

Unfortunately, I don't see a solution for this, but I might have another idea: set a (global) hotkey for View: Application Minimise/Restore in MusicBee's Preferences->Hotkeys, and then use RunCommand to run a program that can simulate pressing that hotkey (like NirCmd, AutoIt, etc. - apparently, you can do it this way in NirCmd). If everything is done correctly (no more wrong paths, if you know what I mean...) then you should achieve what you want. I've already set a global hotkey (CTRL+SHIFT+M, in my case) and when pressing it, MusicBee is restoring its window.

Of course, if MusicBee is not running, you'd have to execute it the "old" way, since the above hotkey doesn't have any effect if the program isn't running already. But you could do both, in the same mouse action: execute MusicBee normally and simulate the chosen hotkey (so basically 2 bangs, one launching MusicBee the usual way and the other launching a RunCommand measure with either NirCmd or AutoIt). If the program is not running, then the first command will trigger the desired effect and the second will silently fail; if the program is already running, the first command will fail and the second will simulate the hotkey to restore MusicBee's window.

EDIT: You probably don't even need to use RunCommand, as a LeftMouseUpAction=["C:\Program Files (x86)\MusicBee\MusicBee.exe"]["C:\Program Files\NirCMD\nircmd.exe sendkeypress ctrl+shift+m"] (adapt to your desired hotkey here) should be more than enough.
Ferbstorm
Posts: 36
Joined: March 9th, 2019, 12:50 am

Re: Looking to be pointed in the right direction

Ferbstorm » March 27th, 2019, 7:15 am

Yincognito wrote:
March 27th, 2019, 2:20 am

EDIT: You probably don't even need to use RunCommand, as a LeftMouseUpAction=["C:\Program Files (x86)\MusicBee\MusicBee.exe"]["C:\Program Files\NirCMD\nircmd.exe sendkeypress ctrl+shift+m"] (adapt to your desired hotkey here) should be more than enough.
So I went ahead and did exactly this, and something still isn't working. I set the hotkey in musicbee, and made sure to check the global box. It matches the code as well, and I changed the filepath to reflect where NirCMD lives. It seems to me that everything should be working. Plus if I use the hotkey manually it works fine, so there must be something going wrong with NirCMD. Should I use the HotKey Plugin instead?

Edit***
Nevermind, I misunderstood how the hotkey plugin worked. I'm gonna need to make NirCmd work
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Looking to be pointed in the right direction

Yincognito » March 27th, 2019, 7:32 am

Ferbstorm wrote:
March 27th, 2019, 7:15 am
So I went ahead and did exactly this, and something still isn't working. I set the hotkey in musicbee, and made sure to check the global box. It matches the code as well, and I changed the filepath to reflect where NirCMD lives. It seems to me that everything should be working. Plus if I use the hotkey manually it works fine, so there must be something going wrong with NirCMD. Should I use the HotKey Plugin instead?
I had a look at the Hotkey plugin before writing my previous reply and it won't help much, IMO, since as far as I know it doesn't simulate hotkeys, it only allows Rainmeter to detect them. Basically, it won't be able to pass a hotkey to another program, which is what you'd want to do.

I'm surprised it didn't work as well, since it should have to. I didn't test it with NirCMD, just set the hotkey and then manually press the hotkey to see if MusicBee's window shows up, and it did. If you did everything right and it still doesn't work, the only two causes I see for this is that either NirCMD doesn't pass the hotkey properly to MusicBee or that MusicBee is using a more sophisticated way of detecting hotkeys (as in it looks for actual physical press of the keys and doesn't get fooled by simulating them).

Maybe I'll give it a shot as well, to see what's going on...