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.

Opposite reaction to "Find Window"?

If you have a question or need help, this is the place to be.
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Opposite reaction to "Find Window"?

Post by Pako »

Your solution is really not very good.
There is surely something better, but this occurred to me immediately:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1436">
    <Folder Name="Timer Sveglia New" Expanded="True">
        <Macro Name="Timer Sveglia">
            <Event Name="Timer.Sveglia" />
            <Action>
                MediaMonkey.Start()
            </Action>
            <Action>
                EventGhost.Wait(5.0)
            </Action>
            <Action>
                MediaMonkey.LoadPlaylist(u'Macchina', 1, 1, 1, True)
            </Action>
            <Action>
                MediaMonkey.Play()
            </Action>
            <Action Name="USB-UIRT: Transmit IR Accendi Stereo">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0042 0011 0010 0010 0032 0010 0011 0010 0011 0010 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0031 0011 0010 0011 0010 0010 0011 0010 0011 0010 0010 0011 0010 0011 0010 0010 0032 0010 0011 0010 0032 0010 0010 0011 0011 0011 0031 0010 0032 0010 0032 0010 0011 0010 0010 0011 0010 0011 0031 0011 0010 0010 0032 0010 0032 0010 0032 0010 0032 0010 0010 0011 0010 0011 0031 0011 0010 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0032 0010 0AEC', 4, 0)
            </Action>
            <Action>
                EventGhost.Wait(6.0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume -">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0043 0011 0011 0011 0032 0011 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0010 0010 0011 0010 0032 0010 0011 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0010 0032 0010 0011 0010 0032 0010 0011 0010 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0010 0032 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0032 0010 0AF8', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume -">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0043 0011 0011 0011 0032 0011 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0010 0010 0011 0010 0032 0010 0011 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0010 0032 0010 0011 0010 0032 0010 0011 0010 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0010 0032 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0032 0010 0AF8', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume -">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0043 0011 0011 0011 0032 0011 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0010 0010 0011 0010 0032 0010 0011 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0010 0032 0010 0011 0010 0032 0010 0011 0010 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0010 0032 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0032 0010 0AF8', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume -">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0043 0011 0011 0011 0032 0011 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0010 0010 0011 0010 0032 0010 0011 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0010 0032 0010 0011 0010 0032 0010 0011 0010 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0010 0032 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0032 0010 0AF8', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume -">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0043 0011 0011 0011 0032 0011 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0010 0010 0011 0010 0032 0010 0011 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0010 0032 0010 0011 0010 0032 0010 0011 0010 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0010 0032 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0032 0010 0AF8', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume -">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0043 0011 0011 0011 0032 0011 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0010 0010 0011 0010 0032 0010 0011 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0010 0032 0010 0011 0010 0032 0010 0011 0010 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0010 0032 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0032 0010 0AF8', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume -">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0043 0011 0011 0011 0032 0011 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0010 0010 0011 0010 0032 0010 0011 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0010 0032 0010 0011 0010 0032 0010 0011 0010 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0010 0032 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0032 0010 0AF8', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume -">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0043 0011 0011 0011 0032 0011 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0010 0010 0011 0010 0032 0010 0011 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0010 0032 0010 0011 0010 0032 0010 0011 0010 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0010 0032 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0032 0010 0AF8', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume -">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0043 0011 0011 0011 0032 0011 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0010 0010 0011 0010 0032 0010 0011 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0010 0032 0010 0011 0010 0032 0010 0011 0010 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0010 0032 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0032 0010 0AF8', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume -">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0043 0011 0011 0011 0032 0011 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0010 0010 0011 0010 0032 0010 0011 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0010 0032 0010 0011 0010 0032 0010 0011 0010 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0010 0032 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0032 0010 0AF8', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume -">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0043 0011 0011 0011 0032 0011 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0010 0010 0011 0010 0032 0010 0011 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0010 0032 0010 0011 0010 0032 0010 0011 0010 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0011 0011 0011 0011 0010 0032 0010 0011 0010 0011 0010 0032 0011 0011 0011 0010 0010 0011 0010 0011 0010 0011 0011 0011 0011 0032 0010 0AF8', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Ingresso Aux">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0083 0042 0011 0010 0011 0031 0010 0011 0010 0011 0010 0011 0011 0010 0011 0010 0010 0011 0010 0011 0010 0010 0011 0010 0011 0010 0010 0011 0010 0032 0010 0011 0011 0010 0011 0010 0010 0011 0010 0011 0010 0010 0011 0010 0010 0032 0010 0011 0010 0032 0010 0011 0011 0010 0011 0010 0010 0011 0010 0011 0010 0011 0011 0010 0011 0010 0010 0011 0010 0032 0010 0032 0010 0010 0011 0010 0011 0010 0010 0011 0010 0032 0010 0011 0011 0031 0011 0031 0011 0010 0010 0011 0010 0032 0010 0011 0010 0010 0011 0AF2', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume +">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0084 0043 0011 0011 0010 0033 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0032 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0033 0010 0011 0010 0032 0010 0010 0011 0011 0010 0012 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0032 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0010 0011 0010 0011 0010 0032 0010 0AF4', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume +">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0084 0043 0011 0011 0010 0033 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0032 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0033 0010 0011 0010 0032 0010 0010 0011 0011 0010 0012 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0032 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0010 0011 0010 0011 0010 0032 0010 0AF4', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume +">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0084 0043 0011 0011 0010 0033 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0032 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0033 0010 0011 0010 0032 0010 0010 0011 0011 0010 0012 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0032 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0010 0011 0010 0011 0010 0032 0010 0AF4', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume +">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0084 0043 0011 0011 0010 0033 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0032 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0033 0010 0011 0010 0032 0010 0010 0011 0011 0010 0012 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0032 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0010 0011 0010 0011 0010 0032 0010 0AF4', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume +">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0084 0043 0011 0011 0010 0033 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0032 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0033 0010 0011 0010 0032 0010 0010 0011 0011 0010 0012 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0032 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0010 0011 0010 0011 0010 0032 0010 0AF4', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume +">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0084 0043 0011 0011 0010 0033 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0032 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0033 0010 0011 0010 0032 0010 0010 0011 0011 0010 0012 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0032 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0010 0011 0010 0011 0010 0032 0010 0AF4', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume +">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0084 0043 0011 0011 0010 0033 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0032 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0033 0010 0011 0010 0032 0010 0010 0011 0011 0010 0012 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0032 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0010 0011 0010 0011 0010 0032 0010 0AF4', 4, 0)
            </Action>
            <Action Name="Pop Up Chiudi Sveglia Python Script">
                EventGhost.PythonScript(u'mBox = wx.MessageDialog(parent = None,message="Vuoi Chiudere la Sveglia?", caption=\'Chiudi Sveglia\', style=wx.YES_NO)\nif mBox.ShowModal() == wx.ID_YES:\n eg.TriggerEvent("YesPressed", prefix="ChiudiSveglia")')
            </Action>
            <Action>
                Timer.TimerAction(u'VolumePlus', 0, 4, 900.0, u'VolumePlus', False, False, 1, u'00:00:00')
            </Action>
        </Macro>
        <Macro Name="USB-UIRT: Transmit IR Volume +">
            <Event Name="Timer.VolumePlus" />
            <Action Name="USB-UIRT: Transmit IR Volume +">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0084 0043 0011 0011 0010 0033 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0032 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0033 0010 0011 0010 0032 0010 0010 0011 0011 0010 0012 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0032 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0010 0011 0010 0011 0010 0032 0010 0AF4', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume +">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0084 0043 0011 0011 0010 0033 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0032 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0033 0010 0011 0010 0032 0010 0010 0011 0011 0010 0012 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0032 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0010 0011 0010 0011 0010 0032 0010 0AF4', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume +">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0084 0043 0011 0011 0010 0033 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0032 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0033 0010 0011 0010 0032 0010 0010 0011 0011 0010 0012 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0032 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0010 0011 0010 0011 0010 0032 0010 0AF4', 4, 0)
            </Action>
            <Action Name="USB-UIRT: Transmit IR Volume +">
                USB_UIRT.TransmitIR(u'0000 006D 0000 0032 0084 0043 0011 0011 0010 0033 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0011 0011 0011 0011 0011 0010 0011 0010 0011 0010 0032 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0033 0010 0011 0010 0032 0010 0010 0011 0011 0010 0012 0010 0011 0010 0010 0011 0010 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0011 0011 0010 0011 0010 0032 0010 0010 0011 0011 0011 0011 0010 0011 0010 0011 0010 0010 0011 0011 0010 0011 0010 0011 0010 0032 0010 0AF4', 4, 0)
            </Action>
        </Macro>
    </Folder>
</EventGhost>
Pako
BigBlack
Posts: 45
Joined: Wed Jan 13, 2010 3:19 am

Re: Opposite reaction to "Find Window"?

Post by BigBlack »

mmm good... you have answered yet :P I tryed It... But it block after the python window... timer doesn't start... However the turn off now go... but not bring up volume because timer doesn't start
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Opposite reaction to "Find Window"?

Post by Pako »

Correction.jpg
Correction.jpg (15.59 KiB) Viewed 3455 times
Pako
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: Opposite reaction to "Find Window"?

Post by jitterjames »

you should not be using the "wait 900".

you should use the timer plugin instead!
badwait.jpg
edit: never mind. It looks like Pako is doing ALL the work for you...
BigBlack
Posts: 45
Joined: Wed Jan 13, 2010 3:19 am

Re: Opposite reaction to "Find Window"?

Post by BigBlack »

I've tested it... With python script in last position... but the Eventghost icon is still yellow... So python script windows make macro run until I click yes or no... And timer doesn't start.. I don't know why...

edit: when i click on yes or no the timer, that still didn't start, start immediately the volumeplus event... and after, even if the turn off macro is complete, the volume plus event repeat and loop 4 times...
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Opposite reaction to "Find Window"?

Post by Pako »

BigBlack wrote:I've tested it... With python script in last position... but the Eventghost icon is still yellow...
Yes, you're right.
Python script with the popup dialogue is causing the problem.
You can try to replace it with this new:

Code: Select all

from eg.WinApi.Dynamic import CreateEvent, SetEvent

class Popup(wx.MiniFrame):
    def __init__(self):
        wx.MiniFrame.__init__(
            self,
            None,
            -1,
            "Chiudi Sveglia",
            style=wx.CAPTION|wx.RESIZE_BORDER
        )
        panel = wx.Panel(self, -1)
        label = wx.StaticText(panel,-1,"Vuoi Chiudere la Sveglia?")
        btnYes = wx.Button(panel, -1, "Yes")
        btnNo = wx.Button(panel, -1, "No")
        buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
        buttonSizer.Add(btnYes)
        buttonSizer.Add((20,1))
        buttonSizer.Add(btnNo)
        mainSizer=wx.BoxSizer(wx.VERTICAL)
        panel.SetSizer(mainSizer)
        mainSizer.Add(label,0,wx.ALL,10)
        mainSizer.Add(buttonSizer,0,wx.LEFT|wx.RIGHT|wx.BOTTOM,10)
        mainSizer.Fit(self)
        btnYes.Bind(wx.EVT_BUTTON,self.onYes)
        btnNo.Bind(wx.EVT_BUTTON,self.onNo)

    def onYes(self,event):
        eg.TriggerEvent("YesPressed",prefix = "ChiudiSveglia")
        self.MakeModal(False)
        self.Show(False)
        self.Destroy()

    def onNo(self,event):
        self.MakeModal(False)
        self.Show(False)
        self.Destroy()

    def ShowPopup(self,evt):
        self.MakeModal(True)
        self.Centre()
        self.Show(True)
        wx.Yield()
        SetEvent(evt)

popup = Popup()
event = CreateEvent(None, 0, 0, None)
wx.CallAfter(popup.ShowPopup,evt = event)
eg.actionThread.WaitOnEvent(event)
I tried it many times and almost always works correctly.
Sometimes, however, after clicking the button appears in the logger an error message.
I tried to remove this problem, but I failed it.

Pako
You know flattr ? You can Image
BigBlack
Posts: 45
Joined: Wed Jan 13, 2010 3:19 am

Re: Opposite reaction to "Find Window"?

Post by BigBlack »

mmmmm it's a odyssey :) I've pasted it but EG stop to answer to mouse click... Log on the left still work but i can't click nothing and i need to terminate it... It makes both in test windows and when I execute the macro... mmm toooooo difficult to wake up me :) ahah sorry guy!! I'm making you crazy!

edit: even if I terminated the process and then reopened eventghost, timer continued to work and send Ir signals to increase volume..
BigBlack
Posts: 45
Joined: Wed Jan 13, 2010 3:19 am

Re: Opposite reaction to "Find Window"?

Post by BigBlack »

I don't understand... But in your pc this script it's ok? So no other solutions?
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Opposite reaction to "Find Window"?

Post by Pako »

Attach your EventGhost config file.
Pako
BigBlack
Posts: 45
Joined: Wed Jan 13, 2010 3:19 am

Re: Opposite reaction to "Find Window"?

Post by BigBlack »

This is the xml file! Thank you
Attachments
Backup Prova nuovo.xml
(105.15 KiB) Downloaded 74 times
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Opposite reaction to "Find Window"?

Post by Pako »

Try this modified file.
Pako
Attachments
Backup Prova nuovo-Pako.xml
(81.72 KiB) Downloaded 88 times
BigBlack
Posts: 45
Joined: Wed Jan 13, 2010 3:19 am

Re: Opposite reaction to "Find Window"?

Post by BigBlack »

It's the same! It "freeze" my eventghost... The pop up with yes or No doesn't appear and i can see the event log but i can't click nowhere on the program window... I have to close it and reopen...
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Opposite reaction to "Find Window"?

Post by Pako »

I think I understand your problem until now .
I thought that you have EventGhost "frozen" so that the icon is red and EventGhost not process other events.
But now I see that it's different.
Bothers you, that is displayed when the popup dialog, you can not EventGhost controlled using the keyboard and mouse.
This is normal behavior of a modal dialog.
Why not simply close the dialogue? Why do you need to leave open?
But if you really need, then you can easily edit the script as follows:

Code: Select all

    def ShowPopup(self,evt):
        #self.MakeModal(True)
        self.Centre()
        self.Raise()
        self.Show(True)
        wx.Yield()
        SetEvent(evt)
I.e. enter "#" character at the beginning of the line self.MakeModal(True).
But it has one big disadvantage. Once you then click on the window EventGhost,
popup dialog hiding underneath.
Pako
BigBlack
Posts: 45
Joined: Wed Jan 13, 2010 3:19 am

Re: Opposite reaction to "Find Window"?

Post by BigBlack »

mmmm sorry i think now it go fine.... I was trying with EG windows open.. now I closed it and seem to work fine.. I'll try well tomorrow to know if all go well :P Thank you guy!
BigBlack
Posts: 45
Joined: Wed Jan 13, 2010 3:19 am

Re: Opposite reaction to "Find Window"?

Post by BigBlack »

Fine :) Finally all it's ok :) Thank you guy!! Now I'll try to study your python script to begin to understand something on python! ;) Thank you again bye bye!!
Post Reply