It is currently September 29th, 2024, 7:19 pm

@Including Bangs

General topics related to Rainmeter.
Wolfgang DelaSangre
Posts: 35
Joined: December 14th, 2010, 6:11 am

@Including Bangs

Post by Wolfgang DelaSangre »

A simple enough question: Can .inc files have bangs in them? For example, commands to execute programs or update the skin itself?
User avatar
jsmorley
Developer
Posts: 22793
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: @Including Bangs

Post by jsmorley »

A bang in and of itself doesn't do anything, unless it is associated with some "action" like LeftMouseUpAction or IfEqualAction or something else that is part of a meter or measure.

I'm not clear what you are trying to do.
Wolfgang DelaSangre
Posts: 35
Joined: December 14th, 2010, 6:11 am

Re: @Including Bangs

Post by Wolfgang DelaSangre »

I'd like to create a skin with a few .inc files that each execute a specific set of actions and then change the skin to the next .inc file.
User avatar
jsmorley
Developer
Posts: 22793
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: @Including Bangs

Post by jsmorley »

You can't dynamically load and unload .inc files. They are loaded when the skin is loaded or refreshed.
Wolfgang DelaSangre
Posts: 35
Joined: December 14th, 2010, 6:11 am

Re: @Including Bangs

Post by Wolfgang DelaSangre »

jsmorley wrote:You can't dynamically load and unload .inc files. They are loaded when the skin is loaded or refreshed.
I know. That's what I intended for each one to do. The first .inc would load with the skin, perform its actions, which includes changing which .inc the skin gets its stuff from, and refreshes the skin.

But that's beside the point. I just need to know if a .inc can include action options and bangs so that the skin in question will execute them.

EDIT: Eh, nevermind. Found my answer by looking into the Enigma code. Yes, I can include bangs and actions to call them in .inc files.
User avatar
jsmorley
Developer
Posts: 22793
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: @Including Bangs

Post by jsmorley »

Sure, as long a either you have the measures and meters in the .inc as well, so the actions are on the appropriate measure or meter, or have the bangs in a [Variables] section in the .inc and have LeftMouseUpAction=#BangVar# or whatever on the appropriate measure or meter.
User avatar
jsmorley
Developer
Posts: 22793
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: @Including Bangs

Post by jsmorley »

Yeah .inc files are really pretty simple at the end of the day. Wherever you put the .inc file in the skin, that is where any code in it will be added when the skin is loaded or refreshed. It will exactly as if you had just pasted the contents of the .inc file right there in the skin. So whatever works in that context will work fine.

The exception is that if there is a [Variables] section in a .inc file, those variables are in effect added to the end of any existing [Variables] section in the skin.