It is currently March 28th, 2024, 2:24 pm

RunCommand

Share and get help with Plugins and Addons
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RunCommand 1.0

Post by jsmorley »

They will need two things to use this right.

1) The RunCommand plugin. Pointing them to Brian's example skin is one way to do this, or better, you can include the 32bit and 64bit plugin .dll files in your .rmskin so it is installed with your suite.

2) They must be running a version of Rainmeter that supports the !CommandMeasure bang. I would suggest that you create your .rmskin to require the latest "release" version of Rainmeter, which is 3.1.0 r2290. !CommandMeasure has been supported for 3 years since Rainmeter 2.1, so if they don't already have at least that, you should also tell them they are idiots while you are at it.
User avatar
.raptor
Posts: 220
Joined: April 3rd, 2013, 11:03 pm
Location: Norway

Re: RunCommand 1.0

Post by .raptor »

jsmorley wrote:They will need two things to use this right.

1) The RunCommand plugin. Pointing them to Brian's example skin is one way to do this, or better, you can include the 32bit and 64bit plugin .dll files in your .rmskin so it is installed with your suite.

2) They must be running a version of Rainmeter that supports the !CommandMeasure bang. I would suggest that you create your .rmskin to require the latest "release" version of Rainmeter, which is 3.1.0 r2290. !CommandMeasure has been supported for 3 years since Rainmeter 2.1, so if they don't already have at least that, you should also tell them they are idiots while you are at it.
Yeah, about that...
Not to derail this completely but the source for bangs have been rather lacking. Had to steal this from the source of some plugin i found hidden inside a forum thread. Why is not bangs in the plugin SDK to begin with? (Would also love to know if this is the actual code thats supposed to be used or not)

Code: Select all

[DllExport]
        public unsafe static void ExecuteBang(void* data, char* args)
        {
            uint id = (uint)data;
            Measures[id].ExecuteBang(new string(args));
        }
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RunCommand 1.0

Post by jsmorley »

.raptor wrote: Yeah, about that...
Not to derail this completely but the source for bangs have been rather lacking. Had to steal this from the source of some plugin i found hidden inside a forum thread. Why is not bangs in the plugin SDK to begin with? (Would also love to know if this is the actual code thats supposed to be used or not)

Code: Select all

[DllExport]
        public unsafe static void ExecuteBang(void* data, char* args)
        {
            uint id = (uint)data;
            Measures[id].ExecuteBang(new string(args));
        }
The only bang you should need to support in the plugin is !CommandMeasure, and I suspect there are good examples in the source for either NowPlaying or FileView.

https://github.com/rainmeter/rainmeter/tree/master/Plugins
User avatar
.raptor
Posts: 220
Joined: April 3rd, 2013, 11:03 pm
Location: Norway

Re: RunCommand 1.0

Post by .raptor »

I'm just going to assume that means yes then, as ExecuteBang is the only related function i can find :???:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RunCommand 1.0

Post by jsmorley »

.raptor wrote:I'm just going to assume that means yes then, as ExecuteBang is the only related function i can find :???:
Yes, when a !CommandMeasure bang is sent to the Rainmeter parent measure supporting your plugin, you will handle it there.

!CommandMeasure used to be called !PluginBang, which while maybe more intuitive, limited any future ability to use it for measures other than plugins. You send a "command argument" to the plugin with !CommandMeasure, and that is handled in ExecuteBang().

We are perilously close to the limits of my knowledge about C++ so if you have additional questions you might want to open an "on topic" new thread and we can let poiru or Brian weigh in.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: RunCommand 1.0

Post by fonpaolo »

jsmorley wrote:They will need two things to use this right.

1) The RunCommand plugin. Pointing them to Brian's example skin is one way to do this, or better, you can include the 32bit and 64bit plugin .dll files in your .rmskin so it is installed with your suite.

2) They must be running a version of Rainmeter that supports the !CommandMeasure bang. I would suggest that you create your .rmskin to require the latest "release" version of Rainmeter, which is 3.1.0 r2290. !CommandMeasure has been supported for 3 years since Rainmeter 2.1, so if they don't already have at least that, you should also tell them they are idiots while you are at it.
Thanks jsmorley, as always, for the fast reply. :D
In my rmskin I have added the plugins for both 32 and 64bit, but since they have reported this problem, I suggested them to try to install directly from the source.
I've also set as minimum requirement the last beta, mostly because some skins are using the latest features and plugins (as AudioLevel...).

...so do you think they're using an older version? :???:
...well, I know that this has already happened with the first release of my suite, trying to help I have discovered they were using an older version and I still have to understand how they installed the rmskin.
I had the suspect that they extracted the code, I do this often, but I know how to do it in the right way.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RunCommand 1.0

Post by jsmorley »

fonpaolo wrote: Thanks jsmorley, as always, for the fast reply. :D
In my rmskin I have added the plugins for both 32 and 64bit, but since they have reported this problem, I suggested them to try to install directly from the source.
I've also set as minimum requirement the last beta, mostly because some skins are using the latest features and plugins (as AudioLevel...).

...so do you think they're using an older version? :???:
...well, I know that this has already happened with the first release of my suite, trying to help I have discovered they were using an older version and I still have to understand how they installed the rmskin.
I had the suspect that they extracted the code, I do this often, but I know how to do it in the right way.
Hard to say. I think an "old" version of Rainmeter would be the only logical explanation for that error message, but yeah, if you are requiring the latest release in your .rmskin, I'm skeptical that a user who isn't smart enough (or can't be bothered) to upgrade in 3 years IS smart enough (and can be bothered) to extract the skin from the .rmskn.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: RunCommand 1.0

Post by moshi »

you'd be surprised. in Rainlendar for example plenty people use administrator privileges to still extract skins to the program's directory. even though Rainlendar since a decade has the default skins folder in the user's directory.

and there are even more people paying money for memory optimizers, registry defraggers and similar snake oil and consider themselves experts.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RunCommand 1.0

Post by jsmorley »

moshi wrote:you'd be surprised. in Rainlendar for example plenty people use administrator privileges to still extract skins to the program's directory. even though Rainlendar since a decade has the default skins folder in the user's directory.

and there are even more people paying money for memory optimizers, registry defraggers and similar snake oil and consider themselves experts.
True enough. Seems to me though that if they are using a 3 year-old version of Rainmeter that doesn't support !CommandMeasure, a whole bunch of other stuff in his skins should be blowing up as well. We have added just tons of functionality since 2.1, and surely he is using lots of it. His entire suite should just shit itself and die as soon as it is loaded.

Just no idea what else it could be though. I don't think any version of RunCommand itself, no matter when posted or how old, didn't support !CommandMeasure. If they are somehow manually installing the wrong "bit" version of RunCommand.dll for their version of Rainmeter, I would think that would cause a more fatal sounding error than "!CommandMeasure not supported". More likely "RunCommand.dll not found".

One thing that comes to mind is that if they are on XP, they really need to be sure they have all the "service packs" for XP installed. There are parts of Rainmeter that just require that at least Service Pack 2 be installed with XP. If they haven't updated Rainmeter in 3 years, or XP in 14 years, then I probably won't have a lot of sympathy...

fonpaolo. you should have them send you these two screenshots:
1.png
2.png
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: RunCommand 1.0

Post by fonpaolo »

I'm sure, given that I already asked, that the plugin version is correct, now I'll ask for the Rainmeter version.
Post Reply