Skip to content

Instantly share code, notes, and snippets.

@zudsniper
Last active April 24, 2023 11:07
Show Gist options
  • Save zudsniper/228627cb3123bed1979776d0b9271797 to your computer and use it in GitHub Desktop.
Save zudsniper/228627cb3123bed1979776d0b9271797 to your computer and use it in GitHub Desktop.
[ARTEMIS] Little guide to adding Conditional Profiles, and a small fore into Nodescripts to accomplish goal.

ARTEMIS HELP

tutorial by @zudsniper

codebase - ARTEMIS

#0001 Profiles & Condition Scripts

Spinning Color Wheel

INTRO

This is meant as a short guide for the non-programming inclined -- or the lazy -- can have an easy step by step guide to displaying a Profile when any specific app is open.

CONCEPT

This task is accomplished via the Conditional mode of a Profile. This can be configured when creating a new Profile, as shown.

image

image

Condition Script

You are now greeted with a drag & drop automation system built into Artemis called nodescripts.
These can be very powerful when combined with the default, and then even 3rd-party plugins to receive data from wherever you want,
and manipulate it to define the parameter you'd like to modify.

In this case, we have a Condition nodescript, which determines whether or not our new Profile will be ACTIVE or not.


example of object data-event

An example of the Window Title Changed Module within the Object Data-Event Node type.


EXAMPLE -- Display on [name] Window Title

RECEIVING DATA

As shown above, one of the many helpful automation features within Artemis is the Object Data-Event source.
To generate one, simply RIGHT CLICK within the Condition Script editor. (Scroll down)
Once this is generated, you will need to select a Data source.
For this example,

Choose Processes -> Active Window -> Window Title Changed from the Data Sources.

USING DATA

For this data to be of any use to us, we'll need to (1) determine if the New value of Window Title is the name of the window / application we want to detect, and (2) turn this data into a boolean value which can be passed to the Activate profile Terminal Node.
Here is that logic.

condition script on window changed

This is a very simple nodescript in action as it changes the activation of a Profile based on its Data bindings.

EXAMPLE SOURCE

You can download the .json file representation of the nodescript displayed in the animation above by clicking the button, or copying the file which is included with this document.

Import Script

I want to force at least a modicum of effort onto you reader, so you will have to find the Import Profile option yourself.
(already shown in this document once)
Once you find it, simply change the Text data field which is attached to the Contains Logic Node to a substring which you would like to match.
(For example, this could be the name of the game you want this Profile to display while active -- or any other application.)

nodescript - View Raw

CONCLUSION

This is a fantastic tool, and I hope this short explainer shed some light on the process of displaying a Profile on Window Title Changed, as well as perhaps shed some light on the underlying systems which make all of this work.

Discord - Enable RGB


tutorial by zod.tf

Discord GitHub issue custom search GitHub followers

fullstack development, server administration, web design, branding creation, musical composition & performance, video editing, and whatever else you need.

second zod.tf logo

{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeScriptEntity, Artemis.Storage",
"Name": "Activate profile",
"Description": "Whether or not the profile should be active",
"Nodes": {
"$type": "System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Nodes.NodeEntity, Artemis.Storage]], System.Private.CoreLib",
"$values": [
{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeEntity, Artemis.Storage",
"Id": "410c824d-c5e3-4e3a-8080-d50f6c8b83b8",
"Type": "ExitNode`1",
"PluginId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"Name": "Activate profile",
"Description": "Whether or not the profile should be active",
"IsExitNode": true,
"X": 350.0,
"Y": -90.0,
"Storage": "",
"PinCollections": {
"$type": "System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Nodes.NodePinCollectionEntity, Artemis.Storage]], System.Private.CoreLib",
"$values": []
}
},
{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeEntity, Artemis.Storage",
"Id": "9d587683-bc71-4dbc-822f-4e934c12addf",
"Type": "DataModelEventNode",
"PluginId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"Name": "Data Model-Event",
"Description": "Outputs the latest values of a data model event.",
"IsExitNode": false,
"X": -630.0,
"Y": -260.0,
"Storage": "{\"$type\":\"Artemis.Storage.Entities.Profile.DataModelPathEntity, Artemis.Storage\",\"Path\":\"ActiveWindow.WindowTitle\",\"DataModelId\":\"Artemis.Plugins.Modules.Processes.ProcessesModule-7c490c59\"}",
"PinCollections": {
"$type": "System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Nodes.NodePinCollectionEntity, Artemis.Storage]], System.Private.CoreLib",
"$values": []
}
},
{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeEntity, Artemis.Storage",
"Id": "7831b6a0-206c-4232-b084-ae734b49e2c9",
"Type": "DisplayValueNode",
"PluginId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"Name": "Display Value",
"Description": "Displays an input value for testing purposes.",
"IsExitNode": false,
"X": -330.0,
"Y": 70.0,
"Storage": "null",
"PinCollections": {
"$type": "System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Nodes.NodePinCollectionEntity, Artemis.Storage]], System.Private.CoreLib",
"$values": []
}
},
{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeEntity, Artemis.Storage",
"Id": "359c09c8-243f-4318-9f30-4ca54bfc08f5",
"Type": "DisplayValueNode",
"PluginId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"Name": "Display Value",
"Description": "Displays an input value for testing purposes.",
"IsExitNode": false,
"X": -40.0,
"Y": -370.0,
"Storage": "null",
"PinCollections": {
"$type": "System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Nodes.NodePinCollectionEntity, Artemis.Storage]], System.Private.CoreLib",
"$values": []
}
},
{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeEntity, Artemis.Storage",
"Id": "abbcb8c4-de9d-4603-8132-c89615c8bc71",
"Type": "StringContainsNode",
"PluginId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"Name": "Contains",
"Description": "Checks whether the first input is contained in the second input.",
"IsExitNode": false,
"X": 60.0,
"Y": -180.0,
"Storage": "",
"PinCollections": {
"$type": "System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Nodes.NodePinCollectionEntity, Artemis.Storage]], System.Private.CoreLib",
"$values": []
}
},
{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeEntity, Artemis.Storage",
"Id": "bca66ac1-5f4f-4b67-a6e9-c54b6a49af57",
"Type": "StaticStringValueNode",
"PluginId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"Name": "Text",
"Description": "Outputs a configurable static text value.",
"IsExitNode": false,
"X": -250.0,
"Y": -100.0,
"Storage": "\"Team Fortress 2\"",
"PinCollections": {
"$type": "System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Nodes.NodePinCollectionEntity, Artemis.Storage]], System.Private.CoreLib",
"$values": []
}
}
]
},
"Connections": {
"$type": "System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Nodes.NodeConnectionEntity, Artemis.Storage]], System.Private.CoreLib",
"$values": [
{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeConnectionEntity, Artemis.Storage",
"SourceType": "Boolean",
"SourceNode": "410c824d-c5e3-4e3a-8080-d50f6c8b83b8",
"TargetNode": "abbcb8c4-de9d-4603-8132-c89615c8bc71",
"SourcePinCollectionId": -1,
"SourcePinId": 0,
"TargetType": "Boolean",
"TargetPinCollectionId": -1,
"TargetPinId": 2
},
{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeConnectionEntity, Artemis.Storage",
"SourceType": "Object",
"SourceNode": "7831b6a0-206c-4232-b084-ae734b49e2c9",
"TargetNode": "9d587683-bc71-4dbc-822f-4e934c12addf",
"SourcePinCollectionId": -1,
"SourcePinId": 0,
"TargetType": "String",
"TargetPinCollectionId": -1,
"TargetPinId": 3
},
{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeConnectionEntity, Artemis.Storage",
"SourceType": "Object",
"SourceNode": "359c09c8-243f-4318-9f30-4ca54bfc08f5",
"TargetNode": "9d587683-bc71-4dbc-822f-4e934c12addf",
"SourcePinCollectionId": -1,
"SourcePinId": 0,
"TargetType": "String",
"TargetPinCollectionId": -1,
"TargetPinId": 2
},
{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeConnectionEntity, Artemis.Storage",
"SourceType": "String",
"SourceNode": "abbcb8c4-de9d-4603-8132-c89615c8bc71",
"TargetNode": "9d587683-bc71-4dbc-822f-4e934c12addf",
"SourcePinCollectionId": -1,
"SourcePinId": 0,
"TargetType": "String",
"TargetPinCollectionId": -1,
"TargetPinId": 3
},
{
"$type": "Artemis.Storage.Entities.Profile.Nodes.NodeConnectionEntity, Artemis.Storage",
"SourceType": "String",
"SourceNode": "abbcb8c4-de9d-4603-8132-c89615c8bc71",
"TargetNode": "bca66ac1-5f4f-4b67-a6e9-c54b6a49af57",
"SourcePinCollectionId": -1,
"SourcePinId": 1,
"TargetType": "String",
"TargetPinCollectionId": -1,
"TargetPinId": 0
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment