when using AddAction it will generate the actions but all of them only have the plugin's name and they are all the same for each action. I can't seem to figure out how to have them name properly. I have use the name= and the clsName= parameters and neither will alter the name of the action. I am unsure how to do this. Since there appears to be more activity in this topic I figured I would ask here.
the script is attached to a post in coders corner System Database is the name I have given the plugin it should be one of the top items in that topic.
K
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
AddAction problems
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: AddAction problems
Problem Solved. I got it sorted.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: AddAction problems
...and the problem was ????
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: AddAction problems
what i had found was since i was using the Text class when using the AddAction it wants to pull the name a description from the Text class first instead of from the name and description variables. so i had to make classes inside of the Text class for each of the actions and under each of those classes i had to add the name and description variables.
apparently if the AddAction sees the Text class inside of the action you want to add it will default to the name and description being in there under a subclass. and if it can't find it. it will add the default description and name that is provided at the beginning of the plugin.
apparently if the AddAction sees the Text class inside of the action you want to add it will default to the name and description being in there under a subclass. and if it can't find it. it will add the default description and name that is provided at the beginning of the plugin.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: AddAction problems
Aha, good to know and good you found out!
Thank you!
Thank you!
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: AddAction problems
I posted the corrected plugin in coders corner. I still have other things i am going to add and I am sure other bugs will arise but for the most part i thing it will simplify the use of python datatypes for people. I did this as a centralized way to store remote codes and power states
example.
using EG to make an ordinary remote control an activity based remote.
so if my TV and my Audio is on for instance.
the volume button will then control the Audio.
if i shut the Audio down and leave the TV on the remote will change to controlling just the TV
because the states are stored using this database thing i made
example.
using EG to make an ordinary remote control an activity based remote.
so if my TV and my Audio is on for instance.
the volume button will then control the Audio.
if i shut the Audio down and leave the TV on the remote will change to controlling just the TV
because the states are stored using this database thing i made
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: AddAction problems
Good ideas !!
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: AddAction problems
I like to think so. I have 5 TV's so this make it easier for my situation because I can use EG and the TCP Events to just send the data to a centralized EG which will contain and control everything in the home. allows for better centralized management.
If you have any Ideas for this thing let me know. This is my 1st plugin I have posted publicly. and it only allows for 3 tiers of data storage but I thought that should be more than enough.
and what I have done is have it return True or False for most things and trigger an event if successful. And it will also return the data for a query as well as trigger an event.
I like it that way because it gives a visual that a script is working but you don't have to add additional scripts off of those Events to have it keep on running.
and if you do something like a ModifyItem and it doesn't exist. it will return a False. you will see an error generated in the log. but because it returns a False you can then have it use the AddItem Action
now i believe I have coded around the whole adding the double quotes thing in the value slot. for example
if you want to add a list you can simply put in ['index1','index2','index3'] without the double quotes surrounding it. I have found that rather confusing to do with the whole \ thing when I first started using EG. I am hoping that it will make it easier for new users that way.
I have also added having it add the additional \ to the path if it is not there for loading and saving.
I am trying to code it to make it as simple to use and to correct all the common mistakes that "newbies" make when using EG.
I have not tested the functionality of this 100%. so if there are errors I would love to know about them to fix any issues.
K
If you have any Ideas for this thing let me know. This is my 1st plugin I have posted publicly. and it only allows for 3 tiers of data storage but I thought that should be more than enough.
and what I have done is have it return True or False for most things and trigger an event if successful. And it will also return the data for a query as well as trigger an event.
I like it that way because it gives a visual that a script is working but you don't have to add additional scripts off of those Events to have it keep on running.
and if you do something like a ModifyItem and it doesn't exist. it will return a False. you will see an error generated in the log. but because it returns a False you can then have it use the AddItem Action
now i believe I have coded around the whole adding the double quotes thing in the value slot. for example
if you want to add a list you can simply put in ['index1','index2','index3'] without the double quotes surrounding it. I have found that rather confusing to do with the whole \ thing when I first started using EG. I am hoping that it will make it easier for new users that way.
I have also added having it add the additional \ to the path if it is not there for loading and saving.
I am trying to code it to make it as simple to use and to correct all the common mistakes that "newbies" make when using EG.
I have not tested the functionality of this 100%. so if there are errors I would love to know about them to fix any issues.
K
