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.

[FIXED] Jump and return does not return on disabled macros

Found a bug in EventGhost? Report it here.
Post Reply
User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

[FIXED] Jump and return does not return on disabled macros

Post by dexter98 »

I've noticed that the 'Jump to.... and return' action does not return when it calls disabled macros. I would expect that execution continues or that another option is added like 'continue if disabled'.
User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: Jump to.... and return does not return on disabled macros

Post by dexter98 »

Anyone? Or is there any other way to 'call' commonly used routines?

I'm now using Trigger Event to 'call' commonly used routines, but this makes it a bit difficult to determine in what order the commands are executed, since the newly triggered events are executed AFTER the current commands are done. For some of my macros, execution order is important.

A 'call' would be nicer, but the current function does not return on disabled macros.

I've been looking into this, but it seems that handling events is quite embedded in the framework.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Jump to.... and return does not return on disabled macros

Post by Bitmonster »

Confirmed. I will look at it, if I have some time.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: [OPEN] Jump to and return does not return on disabled macros

Post by Bitmonster »

I currently can't reproduce the error. Might be possible I fixed it sometime and doesn't remember it now. Please grab the latest beta, test it out and report your findings. If you find the bug again, please post an example here.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: [OPEN] Jump to and return does not return on disabled macros

Post by dexter98 »

Hmmm, I also can't reproduce the error now anymore...

The only thing I could find in MacroItem.py is:

Code: Select all

        if self.isEnabled:
            del eg.lastFoundWindows[:]
            if eg.config.logMacros:
                self.Print(self.name)
            if self.shouldSelectOnExecute:
                wx.CallAfter(self.Select)
                
            if self.childs:
                eg.programCounter = (self.childs[0], 0)
            else:
                eg.programCounter = None

So, if not enabled, the programCounter is not changed at all. I think it should be set to None however, if not enabled:

Code: Select all

        else:
            eg.programCounter = None

Since in this code, a None programCounter forces it to jump back to the caller:

Code: Select all

            if self.programCounter is None:
                # we have no next item in this level. So look in the return 
                # stack if any return has to be executed
                if self.programReturnStack:
                    item, idx = self.programReturnStack.pop()
                    self.programCounter = item.parent.GetNextChild(idx)
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: [OPEN] Jump to and return does not return on disabled macros

Post by Bitmonster »

EDIT: Posted bullshit. :)

Yes, so it looks like the code should run correctly (since a macro has never a macro as parent and isinstance(item.parent, eg.MacroItem) will return False every time).

So I set this bug to FIXED currently, till we see it again.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
jsonnabend
Experienced User
Posts: 127
Joined: Wed Apr 23, 2008 7:35 pm

Re: [FIXED] Jump and return does not return on disabled macros

Post by jsonnabend »

I think I'm still seeing this bug. I have a JumpTo set to always for debug purposes (the jumped-to routine displays some debug text on screen). If I enable the target of the jump and then later disable it, the macro containing the jump action dies at that action. Maybe that's not the same bug, but related perhaps?

Please let me know if there's any additional information that I can provide that might be helpful.

- Jeff
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: [FIXED] Jump and return does not return on disabled macros

Post by Bitmonster »

Can't reproduce it here.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Post Reply