It is currently April 27th, 2024, 4:34 pm
second/third screen preview box
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: second/third screen preview box
BTW, it just crashed again...
-
- Developer
- Posts: 265
- Joined: June 28th, 2014, 8:32 am
- Location: Tokyo, Japan
Re: second/third screen preview box
Yeah, for me too. Not sure what's wrong. The code I added is basically doing a !SetVariable bang during the Update to store the new mouse position to those SCREENSHOTMOUSEX/Y vars. I suspect it's something about the execution path there but not sure what's wrong. The actual call to get the mouse should be very safe and fast, so I doubt that's it.jsmorley wrote:BTW, it just crashed again...
-
- Developer
- Posts: 265
- Joined: June 28th, 2014, 8:32 am
- Location: Tokyo, Japan
Re: second/third screen preview box
Ok one more try. This one seems stable for me so far... (and I updated the plugin version)
dave
dave
You do not have the required permissions to view the files attached to this post.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: second/third screen preview box
As to the version stuff, We have changed SkinInstaller so it won't overlay plugins with an older or same version by default. it uses the .exe metadata that you create with the .rc when you build.
I didn't bring up the stuff you are putting in your skin .ini file, as I know you just used some ancient version of illustro as a template when you started this, and it's not really important. However, pretty much none of what you have there is right...
Author has been moved from [Rainmeter] to [Metadata], AppVersion has been entirely deprecated and is handled by a setting in the .rmskin, Description has been deprecated in favor of Information.
I didn't bring up the stuff you are putting in your skin .ini file, as I know you just used some ancient version of illustro as a template when you started this, and it's not really important. However, pretty much none of what you have there is right...
Code: Select all
[Rainmeter]
Author=dgrace
AppVersion=2003000
Update=50
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14
[Metadata]
Description=Test skin for screenshot plugin.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0
Code: Select all
[Rainmeter]
Update=50
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14
[Metadata]
Author=dgrace
Information=Test skin for screenshot plugin.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: second/third screen preview box
I'll give it a go...dgrace wrote:Ok one more try. This one seems stable for me so far... (and I updated the plugin version)
dave
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: second/third screen preview box
So how often are you sending a !SetVariable to Rainmeter? If that is really just "constantly", I could see that being an issue, as I'd be concerned with overrunning the message queue. However, although I could see that being a problem for Rainmeter itself, the fact that it impacts explorer or DWM or something more fundamental is strange.dgrace wrote:Yeah, for me too. Not sure what's wrong. The code I added is basically doing a !SetVariable bang during the Update to store the new mouse position to those SCREENSHOTMOUSEX/Y vars. I suspect it's something about the execution path there but not sure what's wrong. The actual call to get the mouse should be very safe and fast, so I doubt that's it.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: second/third screen preview box
Crashed and burned again....
You mentioned something about "execution path". I assumed you are using this:
http://docs.rainmeter.net/developers/#SendMessage
And not just a call to Rainmeter.exe with the bang as a parm?
Edit: Maybe that doesn't matter in the context of a plugin, where you are already "connected" to the calling skin.
You mentioned something about "execution path". I assumed you are using this:
http://docs.rainmeter.net/developers/#SendMessage
And not just a call to Rainmeter.exe with the bang as a parm?
Edit: Maybe that doesn't matter in the context of a plugin, where you are already "connected" to the calling skin.
-
- Developer
- Posts: 265
- Joined: June 28th, 2014, 8:32 am
- Location: Tokyo, Japan
Re: second/third screen preview box
It does it once per update, so it depends on the update rate of the skin, but I wouldn't think setting a variable even 20x a second should be any kind of big deal. I still suspect it's something about the skin update running on one thread and the ExecuteCommand running on a different one. Maybe I'll try to think of a different way to do it tomorrow.
dave
dave
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: second/third screen preview box
Yeah, once per update, even at Update=16, shouldn't be an issue.dgrace wrote:It does it once per update, so it depends on the update rate of the skin, but I wouldn't think setting a variable even 20x a second should be any kind of big deal. I still suspect it's something about the skin update running on one thread and the ExecuteCommand running on a different one. Maybe I'll try to think of a different way to do it tomorrow.
dave
-
- Developer
- Posts: 265
- Joined: June 28th, 2014, 8:32 am
- Location: Tokyo, Japan
Re: second/third screen preview box
I'm doing this inside the Reload() of the plugin:jsmorley wrote:Crashed and burned again....
You mentioned something about "execution path". I assumed you are using this:
http://docs.rainmeter.net/developers/#SendMessage
And not just a call to Rainmeter.exe with the bang as a parm?
Edit: Maybe that doesn't matter in the context of a plugin, where you are already "connected" to the calling skin.
Code: Select all
// update absolute mouse position vars
CURSORINFO cinfo; cinfo.cbSize = sizeof(CURSORINFO);
void* skin;
if(
GetCursorInfo(&cinfo)
&& ((skin=RmGetSkin(rm)) != nullptr)
) {
static WCHAR s_cmdX[64];
wsprintf(s_cmdX, L"!SetVariable SCREENSHOTMOUSEX %ld", cinfo.ptScreenPos.x);
RmExecute(skin, s_cmdX);
static WCHAR s_cmdY[64];
wsprintf(s_cmdY, L"!SetVariable SCREENSHOTMOUSEY %ld", cinfo.ptScreenPos.y);
RmExecute(skin, s_cmdY);
}
dave