Jump doesn't work in script with new GUID

This is where you report any issues if you are running a beta version of EventGhost
Forum rules
To submit a possible bug report please follow this template

Version: 0.5 beta 2 (the version you are running)
Traceback: Traceback (most recent call last):
File "<SOME_EVENTGHOST_FILE.py>", line 10, in <module>
SOME_FUNCTION()
File "<SOME_EVENTGHOST_FILE.py>", line 4, in SOME_EVENTGHOST_MODULE
SOME_FUNCTION()

copy and past any traceback information from the log if there is no traceback put NONE

Event:
Main.test.0.1.2.3.4.5.6.7.8
1
2

in the Event field you will want to put the event that was triggered just prior to the traceback occurring, if there is personal data put PERSONAL DATA if there was no traceback or no event triggered right before the traceback put NO EVENT

Description: if you have the ability to replicate the issue then put in here a description of what you are doing to create the problem.

Screen Shots: screen shots of the error and any events/macros/acrions that were run before the issue or screen shots of the problem

Files: any files that may be used to isolate where the issue is. something like the log.txt file would go here

if you provide the above information before hand it will greatly speed up the diagnostic process. we will not have to ask for the bits and pieces. And also having a well formatted Bug Report filled out will get answered sooner then the ones that aren't
User avatar
Luca Brasi
Experienced User
Posts: 259
Joined: Sat Oct 11, 2008 12:39 pm

Re: Jump doesn't work in script with new GUID

Post by Luca Brasi » Tue Aug 01, 2017 8:21 pm

topix wrote:In your 20170723.egtree i see a few XmIdLink's. Some are in a Python Script which aren't actually catched/changed by EG.
Yes, I guess those came back in when I tested what happens when I create a jump after I noticed that eg is back to XmIdLink mode. I got rid of them again and did the convert again.
topix wrote:Also i see Macros with the same GUID ("Set Headset 1" and "Headset 2"). I think that comes from copy/paste though i think it shouldn't.
Not sure if that's where your problems comes from, but definitly something to investigate further.
That is really odd. I did some testing: Those two jumps where created after each other. The second one was a copy of the first one. So I thought that something must have gone wrong here. Deleted Headset 2 completely and created it again from the scratch. And it did get the same GUID again! So is it possible that every new jump gets the same GUID right now?
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 3030
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Jump doesn't work in script with new GUID

Post by kgschlosser » Wed Aug 02, 2017 2:48 pm

its the pasting mechanism that is not working properly. I am trying to think of how to get it right. the reason for this is the actions make reference to the tree item. so if you cut the item and move it we do not want it to delete the GUID and have the action lose the reference. But if you simply copy and paste it it will need to make a new GUID reference. the hard thing is because of how EG is coded. when you do a cut it actually deletes the existing tree item and then uses paste to move it.. this is not the correct way to go about it. and this is the mechanism we will need to change. and this is the reason why we didn't want to simply add the GUID to EG. we had a feeling that there would be some things that would cause issues and could screw up someones tree.
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 259
Joined: Sat Oct 11, 2008 12:39 pm

Re: Jump doesn't work in script with new GUID

Post by Luca Brasi » Wed Aug 02, 2017 3:26 pm

Sounds logical to me :-) If I get you right this should not happen if I created a new macro with a new jump right? Cause the duplicate GUID happened to me there as well.
kgschlosser wrote:and this is the reason why we didn't want to simply add the GUID to EG. we had a feeling that there would be some things that would cause issues and could screw up someones tree.
Yeah, good practice for new features right? I am happy to test whatever you shoot at me :-)
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 3030
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Jump doesn't work in script with new GUID

Post by kgschlosser » Thu Aug 03, 2017 5:08 pm

well the use of the GUID's is to say the least very complex. and it has forced me to have to rewrite the whole clipboard end of things, the good thing is it has enabled me to remove a really really really annoying bug/design flaw. when you cut an item it asks if it is ok to delete it. this is now gone. YAY!!! The only time in which it will ask if you wan to delete it is if you have the ask for delete enabled in the options and you cut an item and then paste it into a different program.. if you paste it back into the EG tree it does not delete the item it simply moves it to the new location (retaining the correct GUID) and any pastes there after will create a new GUID. the other nice thing is that if you cut an item.. and go ooops. i meant to copy it.. all you have to do now is go and copy the thing.

because of having to rework the clipboard i was able to add better clipboard events. and the event will tell you what the last program was/is that modified the clipboard as well as the type of data that was written to the clipboard. if it was text, or an image. you copied or cut some files. this is also going to be expanded to letting you know what program pasted the data as well as the type of data that was pasted. I am debating on adding a means to grab the data when one of those events occur. here is a cool thing about this.. windows permissions just became a little easier. you can create a macro that would check the currently logged in username and if it is not one that you specify and someone tried to cut or copy the files you can force this to be undone. or someone tried to cut or copy some image data from a specific program.. you can undo this as well. pretty snazzy eh?

and also because of how i did this up i should be able to now allow for the selection of multiple tree items to be selected for copying/cutting/deleting from different spots within your tree. which will allow us to be able to give the user the option of deleting all actions associated to a plugin upon removal.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 3030
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Jump doesn't work in script with new GUID

Post by kgschlosser » Thu Aug 03, 2017 5:11 pm

we had a version that did not cause the duplicate GUID issue. the problemwith this was it would always create a new GUID. regardless. well this was no good if a specific action was pointed to a specific GUID. so if you copied and pasted a folder from some other tree. it would go and create all new GUID's for each of the items. but the action would not be able to update to the newly assigned GUID without having to parse and modify the xml data being pasted.. not the best/ideal way to go about it.

we wanted to have a means to keep the GUID the same.
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 259
Joined: Sat Oct 11, 2008 12:39 pm

Re: Jump doesn't work in script with new GUID

Post by Luca Brasi » Fri Aug 04, 2017 6:16 am

kgschlosser wrote:well the use of the GUID's is to say the least very complex. and it has forced me to have to rewrite the whole clipboard end of things, the good thing is it has enabled me to remove a really really really annoying bug/design flaw. when you cut an item it asks if it is ok to delete it. this is now gone. YAY!!! The only time in which it will ask if you wan to delete it is if you have the ask for delete enabled in the options and you cut an item and then paste it into a different program.. if you paste it back into the EG tree it does not delete the item it simply moves it to the new location (retaining the correct GUID) and any pastes there after will create a new GUID. the other nice thing is that if you cut an item.. and go ooops. i meant to copy it.. all you have to do now is go and copy the thing.

because of having to rework the clipboard i was able to add better clipboard events. and the event will tell you what the last program was/is that modified the clipboard as well as the type of data that was written to the clipboard. if it was text, or an image. you copied or cut some files. this is also going to be expanded to letting you know what program pasted the data as well as the type of data that was pasted. I am debating on adding a means to grab the data when one of those events occur. here is a cool thing about this.. windows permissions just became a little easier. you can create a macro that would check the currently logged in username and if it is not one that you specify and someone tried to cut or copy the files you can force this to be undone. or someone tried to cut or copy some image data from a specific program.. you can undo this as well. pretty snazzy eh?

and also because of how i did this up i should be able to now allow for the selection of multiple tree items to be selected for copying/cutting/deleting from different spots within your tree. which will allow us to be able to give the user the option of deleting all actions associated to a plugin upon removal.
That's very cool! I was always wondering about the delete message and not being able to select several items in the tree and do something with them is a pain in the a sometimes.
kgschlosser wrote: version that did not cause the duplicate GUID issue. the problemwith this was it would always create a new GUID. regardless. well this was no good if a specific action was pointed to a specific GUID. so if you copied and pasted a folder from some other tree. it would go and create all new GUID's for each of the items. but the action would not be able to update to the newly assigned GUID without having to parse and modify the xml data being pasted.. not the best/ideal way to go about it.

we wanted to have a means to keep the GUID the same.
Alright. So if I get you right this would explain the behaviour I got earlier. So I guess we will some sort of logic which differentiates between copy and move of items? So when copying get a new GUID, when moving not?
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 3030
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Jump doesn't work in script with new GUID

Post by kgschlosser » Fri Aug 04, 2017 9:39 am

depends on what behavior you are talking about.. LOL with the current code of EG 0.5 it will not create a new id for each and every single item pasted. (I think) bah I don't remember honestly. I could have changed that about in one of the patches i sent ya.. i can't remember. LOL

I am trying to sort out how to render clipboard data on demand. this is the mechanism we are going to use to tell us when the data gets pasted. if it gets pasted by eg. when the past button is pressed a flag gets set. so then when eg goes to retrieve the clipboard data which actually there is no clipboard data just a marker telling windows to ask for the data. then when windows asks eg for the data EG will check to see if that flag has been set or not. if it has not been set this would mean that some other program pasted the data and then the item gets deleted. and the xml data will get passed back to Windows so it can hand it off to whatever program it is that pasted it. if it was EG that pasted the data the xml simply gets handed back to Windows and then Windows will hand the data back to EG.. and EG will then move the item instead of deleting it.

But I am having an issue with passing the clipboard data like that.. I will work on it again later today to see what I can come up with.
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 259
Joined: Sat Oct 11, 2008 12:39 pm

Re: Jump doesn't work in script with new GUID

Post by Luca Brasi » Fri Aug 04, 2017 11:38 am

Haha, to be honest this is a little bit above my paygrade :-)
Did you think about why I get Actions with the same GUID even if they are completely new? I mean created by adding an action from the dialog?
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 3030
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Jump doesn't work in script with new GUID

Post by kgschlosser » Sat Aug 05, 2017 2:46 am

Oh i didn't tell you that is a special feature i added just for you. to make your tree go completely wild when a jump action or an enable/disable action occurs.. it will be like a disco show and you would have a clue what in the world is going on.. LMAO
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 259
Joined: Sat Oct 11, 2008 12:39 pm

Re: Jump doesn't work in script with new GUID

Post by Luca Brasi » Sat Aug 05, 2017 1:57 pm

Nice, thanks you so much for that dude :lol:
No man, I just didn't get why this would happen too and probably didn't understand your explanations entirely. I know that you got it covered
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
Luca Brasi
Experienced User
Posts: 259
Joined: Sat Oct 11, 2008 12:39 pm

Re: Jump doesn't work in script with new GUID

Post by Luca Brasi » Sun Aug 06, 2017 6:13 pm

update:
I could just see when eg goes back to xmlid mode. I configured one of my earlier existing but now converted jumps and hit OK after that. Eg instantly froze and after restarting it gave me the warning about converting to guid again when I initialized the process again. After doing the convert I could replicate this. So the convert seems to work on those jumps. They work properly as long as they are not saved again from their config menu.

[Edit:] This seems to happen on jumps. Not on Enable/Disable actions.
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
Luca Brasi
Experienced User
Posts: 259
Joined: Sat Oct 11, 2008 12:39 pm

Re: Jump doesn't work in script with new GUID

Post by Luca Brasi » Tue Sep 19, 2017 8:24 am

And one more update:
That eg is set back to using xmlids seems to be specific to my system. I have some failsave actions in place which restart eg in the case of some plugins (standby control, system audio) appear to not work properly. I use the eg app control plugin for that but will have to check if I still have some external bat active which used to kill eg and restart is. Either way after the restart eg will use an previously used config tree and it will be set back to xmlids.
I'll have to get rid of this failsave/restart bs...
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

Post Reply