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.

Is the a way to abort the currently running script?

If you have a question or need help, this is the place to be.
Post Reply
ishahak
Posts: 2
Joined: Mon Feb 23, 2009 3:02 pm

Is the a way to abort the currently running script?

Post by ishahak »

[using version 0.3.5c build 908]

Hello,

Must say EventGhost is a great tool.

I'm using a macro for testing of some IR controlled device.
my macro is running an endless loop, in order to stress my device.

I could not find a way to abort that endless loop.
any idea?

I'm really missing a "stop execution" button.

thank you!
-Itay
User avatar
topix
Experienced User
Posts: 441
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: Is the a way to abort the currently running script?

Post by topix »

I don't know a direct stop action, but one way could be to have a specific window open while the test is running. EG searches for the window and stops the macro if it doesn't find it. Here is an example what i mean:
The script loops between the two macros as long as an internet explorer window is found.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="851">
    <Folder Name="endless" Expanded="True">
        <Macro Name="Show OSD: Part 1" id="888">
            <Action>
                EventGhost.ShowOSD(u'Part 1', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 0, 0), (0, 0, 0), 4, (0, 0), 0, 1.0, False)
            </Action>
            <Action>
                Window.FindWindow(u'iexplore.exe', None, None, None, None, None, False, 0.0, 0)
            </Action>
            <Action>
                EventGhost.NewJumpIf(XmlIdLink(890), 2, False)
            </Action>
        </Macro>
        <Macro Name="Show OSD: Part 2" id="890">
            <Action>
                EventGhost.ShowOSD(u'Part 2', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (0, 128, 0), (0, 0, 0), 4, (0, 0), 0, 1.0, False)
            </Action>
            <Action>
                Window.FindWindow(u'iexplore.exe', None, None, None, None, None, False, 0.0, 0)
            </Action>
            <Action>
                EventGhost.NewJumpIf(XmlIdLink(888), 2, False)
            </Action>
        </Macro>
    </Folder>
</EventGhost>
ishahak
Posts: 2
Joined: Mon Feb 23, 2009 3:02 pm

Re: Is the a way to abort the currently running script?

Post by ishahak »

many thanks for the reply. what you describe is exactly what I did before but I find it to be quite annoying.

I'm also wondering why no GUI way to create a loops and branches.

regards,
-Itay
Post Reply