It is currently May 1st, 2024, 6:09 pm

Quitting processes when skin is unloaded

Report bugs with the Rainmeter application and suggest features.
r0k
Posts: 78
Joined: March 9th, 2012, 10:06 am

Quitting processes when skin is unloaded

Post by r0k »

Hello. I'd like to know if it's possible to quit a process that was started by a skin when the skin is unloaded. Alternatively, is there a way to make some test to check wheter a skin is actually laoded or not?

I have tested the recycle bin plus skin that demonstrate how to use DropIt with rainmeter and noticed that if you unload the skin, DropIt will keep running. I think it would really help when doing such integration of third party applications inside a skin to be able to terminate the process when the skin is unloaded.
Last edited by r0k on March 17th, 2012, 8:09 am, edited 1 time in total.
User avatar
Brian
Developer
Posts: 2689
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Quitting processes when skin is unloaded

Post by Brian »

I believe the command taskkill is what you are looking for.

-Brian
User avatar
santa_ryan
Posts: 397
Joined: June 22nd, 2010, 4:11 am

Re: Quitting processes when skin is unloaded

Post by santa_ryan »

He wants it to not have to be a button though. I believe he wants it integrated into rainmeter itself; On unload, execute the following.

I wouldn't mind having this ability myself. :P

I mean there technically is an "On Load" execute ability (OnRefreshAction) but there is no "On Unload" action. I find it would make a good compliment.

Code: Select all

OnRefreshAction=!Execute [*START APP*]
OnUnloadAction=!Execute [*TASKKILL STARTED APP*]
I have three rules when I'm trying to help you.
  • Don't get mad when you don't understand something
  • Be VERY specific with what you ask for.
    The more specific you are, the higher the quality of support you receive.
  • Do not just copy and paste what I put in examples and come back saying it doesn't work.
    It does work, but I purposely left blanks that you need to fill for your specific needs.
r0k
Posts: 78
Joined: March 9th, 2012, 10:06 am

Re: Quitting processes when skin is unloaded

Post by r0k »

santa_ryan : yes something like this. Well, from your answer it looks like there is no built-in way to do this currently.

Some kind of limited workaroud currently would be to have a check built in another skin to parse rainmeter.ini and look for "active=0" for a given skin, then pass taskkill command. I guess it can be done with either webparser or a LUA script but it would only work for skin suites and only if there is some kind of "master" skin that won't be unloaded.

Not sure how hard it would be to implement but it could definitely be useful I'll put a feature request tag to my first post.

EDIT : maybe a mod can move this to the Bugs and Features forum. I didn't post there because i wanted to know if there was an existing feature before asking for.
Thanks :)
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Quitting processes when skin is unloaded

Post by jsmorley »

This has been implemented as OnCloseAction in the next beta coming tomorrow.
User avatar
~Faradey~
Posts: 366
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: Quitting processes when skin is unloaded

Post by ~Faradey~ »

jsmorley wrote:This has been implemented as OnCloseAction in the next beta coming tomorrow.
Wow! Great! really :bounce:
r0k
Posts: 78
Joined: March 9th, 2012, 10:06 am

Re: Quitting processes when skin is unloaded

Post by r0k »

jsmorley wrote:This has been implemented as OnCloseAction in the next beta coming tomorrow.
Wow. That's great :YESSS:
I hope it wasn't too much trouble to code.
User avatar
Brian
Developer
Posts: 2689
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Quitting processes when skin is unloaded

Post by Brian »

It was like 4 lines of code. :)

-Brian
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Quitting processes when skin is unloaded

Post by jsmorley »

Brian wrote:It was like 4 lines of code. :)

-Brian
Never, ever let on that anything was easy! It was a complete re-write of the __rmCoreInterOp() routines, and took 100 man hours to code and 40 to debug and unit test.

:-)
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Quitting processes when skin is unloaded

Post by dragonmage »

jsmorley wrote: Never, ever let on that anything was easy! It was a complete re-write of the __rmCoreInterOp() routines, and took 100 man hours to code and 40 to debug and unit test.

:-)
Don't forget the lawyer we had to hire to make sure we weren't violating any patents.