It is currently March 28th, 2024, 9:05 am

second/third screen preview box

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: second/third screen preview box

Post by jsmorley »

BTW, it just crashed again...
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan
Contact:

Re: second/third screen preview box

Post by dgrace »

jsmorley wrote:BTW, it just crashed again...
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.
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan
Contact:

Re: second/third screen preview box

Post by dgrace »

Ok one more try. This one seems stable for me so far... (and I updated the plugin version)

dave
Attachments
ScreenShot_0.0.5.rmskin
(114 KiB) Downloaded 22 times
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: second/third screen preview box

Post by jsmorley »

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... ;-)

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
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.

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
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: second/third screen preview box

Post by jsmorley »

dgrace wrote:Ok one more try. This one seems stable for me so far... (and I updated the plugin version)

dave
I'll give it a go...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: second/third screen preview box

Post by jsmorley »

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.
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.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: second/third screen preview box

Post by jsmorley »

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.
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan
Contact:

Re: second/third screen preview box

Post by dgrace »

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
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: second/third screen preview box

Post by jsmorley »

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
Yeah, once per update, even at Update=16, shouldn't be an issue.
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan
Contact:

Re: second/third screen preview box

Post by dgrace »

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.
I'm doing this inside the Reload() of the plugin:

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);
	}
See anything suspicious?

dave
Post Reply