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.

hold down a key

If you have a question or need help, this is the place to be.
longplayer
Posts: 35
Joined: Sun Mar 31, 2013 10:13 am
Location: Dordogne France

hold down a key

Post by longplayer »

Hi all.

I am trying to achieve the following -

Press a specific key ( Q in this case )
make that key behave as if it is being held down until --
any other key is pressed ( or in this case any number keys 1-8 )
then held down key is released

I have got key repeat turned off in windows

Any help on this would be appreciated.

Longplayer
User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: hold down a key

Post by yokel22 »

Does the send keys action with "set buttons down" parameter not work for your situation? Kinda need to know what your trying to do to solve this better. This should accomplish what your wanting. It's gonna cause some lag if you try to repeat the key too often. Keep it above 0.2

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4">
    <Folder Name="repeat Q" XML_Guid="{5E543AAD-C592-48CC-9374-6A7E5D047288}" Expanded="True">
        <Macro Name="Timer: Start new or control running timer" XML_Guid="{27F01B74-4FAE-41D2-B73D-A47BBAA6D362}">
            <Action Name="Add an event to start timer to repeat Q key" XML_Guid="{CD729522-0CA0-468D-81DD-BD2A0F6C1931}">
                EventGhost.Comment()
            </Action>
            <Action XML_Guid="{189D0AFD-A420-4F9A-93FA-316C5F84C1B7}">
                Timer.TimerAction(u'repeatQ', 0, 0, 0.2, u'repeatQ', False, True, 0, u'00:00:00')
            </Action>
        </Macro>
        <Macro Name="Send Keystrokes: q" XML_Guid="{8365B0BB-B363-45F7-B891-A0EB44FD3B63}">
            <Event Name="Timer.repeatQ" XML_Guid="{DC370120-D5DC-49D8-A668-653CBD965B26}" />
            <Action XML_Guid="{6FE0D6E6-ABF2-4EA8-B32B-53A07B18F938}">
                Window.SendKeys(u'q', False, 2)
            </Action>
        </Macro>
        <Macro Name="Timer: Start new or control running timer" XML_Guid="{27F01B74-4FAE-41D2-B73D-A47BBAA6D362}">
            <Event Name="Keyboard.1" XML_Guid="{FE636D21-EA11-4117-A105-A542E82DD6B2}" />
            <Event Name="Keyboard.2" XML_Guid="{E2973340-07C3-46E8-BD63-5ED1800B92AB}" />
            <Event Name="Keyboard.3" XML_Guid="{E97ED3C2-7304-4AFE-B57C-2EFCF30394E7}" />
            <Event Name="Keyboard.4" XML_Guid="{564AE170-8B0E-4D25-88B8-E5E62724AE8F}" />
            <Event Name="Keyboard.5" XML_Guid="{D8E91D08-C231-4A74-A8D3-AB703FBA9D5E}" />
            <Event Name="Keyboard.6" XML_Guid="{7301FFCA-A48E-4A5D-B3E0-272ECCA95AF1}" />
            <Event Name="Keyboard.7" XML_Guid="{B6CC30F6-5F7F-4107-9C43-A122D6DCC7A4}" />
            <Event Name="Keyboard.8" XML_Guid="{0D487CF9-9AB5-4277-B6C7-D185909BA727}" />
            <Action Name="abort Q timer" XML_Guid="{CD729522-0CA0-468D-81DD-BD2A0F6C1931}">
                EventGhost.Comment()
            </Action>
            <Action Name="Timer: Abort Q timer" XML_Guid="{189D0AFD-A420-4F9A-93FA-316C5F84C1B7}">
                Timer.TimerAction(u'repeatQ', 4, 0, 0.1, u'repeatQ', False, True, 0, u'00:00:00')
            </Action>
        </Macro>
    </Folder>
</EventGhost>
longplayer
Posts: 35
Joined: Sun Mar 31, 2013 10:13 am
Location: Dordogne France

Re: hold down a key

Post by longplayer »

Hi and many thanks for your reply. I have used your script but at the moment it seems to be throwing up errors on most lines. I need to get down to it and see what is going on.
Meantime here is a clearer picture of what I am trying to do -
I am using Q+1 through to Q+8 to trigger the opening of a program and close the previously running one. These 8 programs are 8 different front ends for a juke-box I have built. The key combinations close the running jukebox and select one of the other 7 remaining. So far so good.
I have to hold down Q then press the number key to change programs. No problem so far. However, because of the way my hardware/software is set up
I would like to be able to press Q, release it, and then press any key 1-8 to do the job. At this point the Q key would need to release.
Hope that gives a clearer idea on my task

Longplayer
User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: hold down a key

Post by yokel22 »

It's not a script, it's several macros in xml. Select/copy Code. Within eventghost, right click somewhere in your e.g. tree & choose paste. This will add a folder & three macros to your tree.
longplayer
Posts: 35
Joined: Sun Mar 31, 2013 10:13 am
Location: Dordogne France

Re: hold down a key

Post by longplayer »

Hi again.
Sorry if I appear to be completely mad, but I can not get your macros etc to paste int my EG tree. I tried several times - select/copy/paste but it is not behaving as it should. Nothing appears in the tree, only a heap of lines in the left pane ( all red ) As far as I know and having used this method with other macros etc, it should, as you say paste in ok. I am baffled

Longplayer
User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: hold down a key

Post by yokel22 »

What version of eg are you using? Working properly for me on eg 0.5.0-rc4. Can you paste the logged errors here too?
longplayer
Posts: 35
Joined: Sun Mar 31, 2013 10:13 am
Location: Dordogne France

Re: hold down a key

Post by longplayer »

Hi again. Yes that is the version I am running. I am using the example file that comes with EG just to test things out.
Here is what I get as the error log. -



---> Welcome to EventGhost <---
Traceback (most recent call last) (0.5.0-rc4):
File "C:\Program Files\EventGhost\eg\Classes\MainFrame\__init__.py", line 272, in FuncWrapper
func()
File "C:\Program Files\EventGhost\eg\Classes\MainFrame\__init__.py", line 872, in OnCmdPaste
self.DispatchCommand("OnCmdPaste")
File "C:\Program Files\EventGhost\eg\Classes\MainFrame\__init__.py", line 492, in DispatchCommand
getattr(self.document, command[2:])()
File "C:\Program Files\EventGhost\eg\Classes\Document.py", line 229, in CmdPaste
eg.UndoHandler.Paste(self).Do(self.selection)
File "C:\Program Files\EventGhost\eg\Classes\UndoHandler\Paste.py", line 50, in Do
dataObj.GetText()
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 324, in __call__
self.returnValue = self.func(*self.args, **self.kwargs)
File "C:\Program Files\EventGhost\eg\Classes\UndoHandler\Paste.py", line 110, in PasteXml
newNode = childCls(selection, childXmlNode)
File "C:\Program Files\EventGhost\eg\Classes\ContainerItem.py", line 34, in __init__
for childNode in node
File "C:\Program Files\EventGhost\eg\Classes\ContainerItem.py", line 34, in __init__
for childNode in node
File "C:\Program Files\EventGhost\eg\Classes\ActionItem.py", line 60, in __init__
plugin = getattr(eg.plugins, pluginStr).plugin
AttributeError: 'Bunch' object has no attribute 'Timer'


Longplayer
User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: hold down a key

Post by yokel22 »

Okay, it's an error related to the timer plugin. I think it's stock to e.g.. Try adding the timer plugin to your tree(add the keyboard plugin too if it's not already). Then try repasting the xml.
longplayer
Posts: 35
Joined: Sun Mar 31, 2013 10:13 am
Location: Dordogne France

Re: hold down a key

Post by longplayer »

OK that works! Holds the Q key until key 1-8 is pressed, then releases Q.
I have pasted it into my EG on the jukebox. Works the same although I am running earlier version of EG.
My next problem is to get the jukebox program to accept my key presses. The setup at the moment is as follows -

<?xml version="1.0" encoding="UTF-8" ?>
- <EventGhost Version="1722" Guid="{661365F1-2B64-46EB-AC81-965BACCF8A07}" Time="1137863987.32">
- <Autostart Name="Autostart" Expanded="True">
<Plugin Identifier="Keyboard" Guid="{59CBD10F-C1D8-4ADB-999B-9B76BA360F1F}" File="Keyboard">gAKIhXEALg==</Plugin>
<Plugin Identifier="Timer" Guid="{6149CA99-1FCD-4450-9160-7543BC20CFD3}" File="Timer">gAIpLg==</Plugin>
</Autostart>
- <Folder Name="repeat Q" Expanded="True">
- <Macro Name="Timer: Start new or control running timer" Expanded="True">
<Action Name="Add an event to start timer to repeat Q key">EventGhost.Comment()</Action>
<Action>Timer.TimerAction(u'repeatQ', 0, 0, 0.20000000000000001, u'repeatQ', False, True, 0, u'00:00:00')</Action>
</Macro>
- <Macro Name="Send Keystrokes: q" Expanded="True">
<Event Name="Timer.repeatQ" />
<Action>Window.SendKeys(u'q', False, 2)</Action>
</Macro>
- <Macro Name="Timer: Start new or control running timer" Expanded="True">
<Event Name="Keyboard.1" />
<Event Name="Keyboard.2" />
<Event Name="Keyboard.3" />
<Event Name="Keyboard.4" />
<Event Name="Keyboard.5" />
<Event Name="Keyboard.6" />
<Event Name="Keyboard.7" />
<Event Name="Keyboard.8" />
<Action Name="abort Q timer">EventGhost.Comment()</Action>
<Action Name="Timer: Abort Q timer">Timer.TimerAction(u'repeatQ', 4, 0, 0.10000000000000001, u'repeatQ', False, True, 0, u'00:00:00')</Action>
</Macro>
</Folder>
- <Folder Name="Jukebox Control" Expanded="True">
- <Macro Name="JUKEBOX 1" Expanded="True">
<Event Name="Keyboard.Q+1" />
<Action>EventGhost.Wait(1.0)</Action>
<Action>Window.SendKeys(u'{Escape}', False, 2)</Action>
<Action>EventGhost.Wait(2.0)</Action>
<Action>System.Execute(u'C:\\Jukeboxes\\Jukebox Collection\\wincab.exe', u'', 0, False, 2, u'', False, False, u'', False, False, False, False)</Action>
</Macro>
- <Macro Name="JUKEBOX 2" Expanded="True">
<Event Name="Keyboard.Q+2" />
<Action>EventGhost.Wait(1.0)</Action>
<Action>Window.SendKeys(u'{Escape}', False, 2)</Action>
<Action>EventGhost.Wait(2.0)</Action>
<Action>System.Execute(u'C:\\Jukeboxes\\Jukebox Hits\\wincab2.exe', u'', 0, False, 2, u'', False, False, u'', False, False, False, False)</Action>
</Macro>
- <Macro Name="JUKEBOX 3" Expanded="True">
<Event Name="Keyboard.Q+3" />
<Action>EventGhost.Wait(1.0)</Action>
<Action>Window.SendKeys(u'{Escape}', False, 2)</Action>
<Action>EventGhost.Wait(2.0)</Action>
<Action>System.Execute(u'C:\\Jukeboxes\\Sixties Jukebox\\wincab3.exe', u'', 0, False, 2, u'', False, False, u'', False, False, False, False)</Action>
</Macro>
- <Macro Name="JUKEBOX 4" Expanded="True">
<Event Name="Keyboard.Q+4" />
<Action>EventGhost.Wait(1.0)</Action>
<Action>Window.SendKeys(u'{Escape}', False, 2)</Action>
<Action>EventGhost.Wait(2.0)</Action>
<Action>System.Execute(u"C:\\Jukeboxes\\The 70's and 80's\\wincab4.exe", u'', 0, False, 2, u'', False, False, u'', False, False, False, False)</Action>
</Macro>
- <Macro Name="JUKEBOX 5" Expanded="True">
<Event Name="Keyboard.Q+5" />
<Action>EventGhost.Wait(1.0)</Action>
<Action>Window.SendKeys(u'{Escape}', False, 2)</Action>
<Action>EventGhost.Wait(2.0)</Action>
<Action>System.Execute(u'C:\\Jukeboxes\\Country Jukebox\\wincab5.exe', u'', 0, False, 2, u'', False, False, u'', False, False, False, False)</Action>
</Macro>
- <Macro Name="JUKEBOX 6" Expanded="True">
<Event Name="Keyboard.Q+6" />
<Action>EventGhost.Wait(1.0)</Action>
<Action>Window.SendKeys(u'{Escape}', False, 2)</Action>
<Action>EventGhost.Wait(2.0)</Action>
<Action>System.Execute(u'C:\\Jukeboxes\\Motown Jukebox\\wincab6.exe', u'', 0, False, 2, u'', False, False, u'', False, False, False, False)</Action>
</Macro>
- <Macro Name="JUKEBOX 7" Expanded="True">
<Event Name="Keyboard.Q+7" />
<Action>EventGhost.Wait(1.0)</Action>
<Action>Window.SendKeys(u'{Escape}', False, 2)</Action>
<Action>EventGhost.Wait(2.0)</Action>
<Action>System.Execute(u'C:\\Jukeboxes\\One Hit Wonders\\wincab7.exe', u'', 0, False, 2, u'', False, False, u'', False, False, False, False)</Action>
</Macro>
- <Macro Name="JUKEBOX 8" Expanded="True">
<Event Name="Keyboard.Q+8" />
<Action>EventGhost.Wait(1.0)</Action>
<Action>Window.SendKeys(u'{Escape}', False, 2)</Action>
<Action>EventGhost.Wait(2.0)</Action>
<Action>System.Execute(u'C:\\Jukeboxes\\French Collection\\wincab.exe', u'', 0, False, 2, u'', False, False, u'', False, False, False, False)</Action>
</Macro>
</Folder>
</EventGhost>


As you will see, at the moment each jukebox is started by Q+1, Q+2 etc. What I am looking to do is press Q and then as it is held I would like the 1-8 keys to carry out the action that the Q+1 etc did before.
Any ideas?

Longplayer
User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: hold down a key

Post by yokel22 »

Typically you'd use a find window/bring to front action before sending the keys. I seem to recall this program had problems being pulled up via this method in the past. Have you tried doing it that way yet?

Are you wanting to cycle through each of these like this?

press 1 = Q+1
press 2 = Q+2
press 3 = Q+3
etc.

if that's the case. Give this a shot.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4">
    <Macro Name="Send Q+num" XML_Guid="{51B37E00-2B89-4E2A-B0BD-3FB658AA6CAF}" Expanded="True">
        <Action XML_Guid="{1299002D-8270-4DB2-B3D4-7C783CE0147F}">
            System.Execute(u'C:\\WINDOWS\\system32\\notepad.exe', u'', 0, False, 2, u'', False, False, u'', False, False, False, False)
        </Action>
        <Action XML_Guid="{F6F69BEB-F19D-4925-BB99-2AEF6E9CA7B4}">
            EventGhost.Wait(1.0)
        </Action>
        <Action XML_Guid="{4A1E1D4A-E88B-40BC-8765-AD40564CED5B}">
            Window.FindWindow(u'notepad.exe', u'Untitled - Notepad', u'Notepad', u'', u'Edit', 1, False, 0.0, 0)
        </Action>
        <Action XML_Guid="{185F5071-3DE5-48BB-B40B-4134EB387AF9}">
            Window.BringToFront()
        </Action>
        <Action XML_Guid="{45A3A6B1-8A24-4495-949A-80C18E62B09E}">
            EventGhost.PythonScript(u"numbers = range(1,9)\n\nfor i in numbers:\n    key = 'Q+' + str(i) + '\\n'\n    eg.plugins.Window.SendKeys(key, False, 2)")
        </Action>
    </Macro>
</EventGhost>
longplayer
Posts: 35
Joined: Sun Mar 31, 2013 10:13 am
Location: Dordogne France

Re: hold down a key

Post by longplayer »

Hi again.

This is where I am at.
My present setup which works without a hitch allows me to change between the 8 jukeboxes by doing this -
Press and hold Q. Then press a number key 1-8. Jukebox which is running, closes and another will open depending on which number key I press.
I have 8 macros ( jukebox 1 through to jukebox 8 )
Each one uses event - Keyboard Q+1 ( through to Q+8 )
then actions - Emulate Keystroke{escape} escape is set as jukebox close key in jukebox program
- Start program wincab1.exe ( through to wincab8.exe )

That is how it is set up to open and close the jukeboxes
If I press escape key when a jukebox is running I get to see Windows desktop - for admin etc.
Keys 1-8 on there own ( along with keys A to E) are used within the jukebox as selection keys
The Q key is not used within the jukebox program and is just for the purpose as above
As I said, everything works fine like this.

BUT. here is my problem. Because of various ways in which I want to operate things, I am trying to get it so that the Q key can be pressed and released
and then a key 1-8 can be pressed to perform the same job as pressing Q+ number key together.

The first set of macros that you gave me work to an extent in that key Q is in effect held down as if it were being still pressed, but when I hit the number key the Q key is not read as being pressed any more. Could this be some sort of timing problem where Q needs to still be down for a short time after number key is pressed and only release then?
Hope that all makes sense.

Longplayer
User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: hold down a key

Post by yokel22 »

Well, if the first one works the way you're wanting. Then you just need to add a "send keys" action to the macro that aborts the timer. Give this a shot.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4">
    <Folder Name="repeat Q" XML_Guid="{5E543AAD-C592-48CC-9374-6A7E5D047288}" Expanded="True">
        <Macro Name="Timer: Start new or control running timer" XML_Guid="{27F01B74-4FAE-41D2-B73D-A47BBAA6D362}">
            <Action Name="Add an event to start timer to repeat Q key" XML_Guid="{CD729522-0CA0-468D-81DD-BD2A0F6C1931}">
                EventGhost.Comment()
            </Action>
            <Action XML_Guid="{189D0AFD-A420-4F9A-93FA-316C5F84C1B7}">
                Timer.TimerAction(u'repeatQ', 0, 0, 0.2, u'repeatQ', False, True, 0, u'00:00:00')
            </Action>
        </Macro>
        <Macro Name="Send Keystrokes: q" XML_Guid="{8365B0BB-B363-45F7-B891-A0EB44FD3B63}">
            <Event Name="Timer.repeatQ" XML_Guid="{DC370120-D5DC-49D8-A668-653CBD965B26}" />
            <Action XML_Guid="{6FE0D6E6-ABF2-4EA8-B32B-53A07B18F938}">
                Window.SendKeys(u'Q', False, 2)
            </Action>
        </Macro>
        <Macro Name="Timer: Abort running timer" XML_Guid="{27F01B74-4FAE-41D2-B73D-A47BBAA6D362}">
            <Event Name="Keyboard.1" XML_Guid="{FE636D21-EA11-4117-A105-A542E82DD6B2}" />
            <Event Name="Keyboard.2" XML_Guid="{E2973340-07C3-46E8-BD63-5ED1800B92AB}" />
            <Event Name="Keyboard.3" XML_Guid="{E97ED3C2-7304-4AFE-B57C-2EFCF30394E7}" />
            <Event Name="Keyboard.4" XML_Guid="{564AE170-8B0E-4D25-88B8-E5E62724AE8F}" />
            <Event Name="Keyboard.5" XML_Guid="{D8E91D08-C231-4A74-A8D3-AB703FBA9D5E}" />
            <Event Name="Keyboard.6" XML_Guid="{7301FFCA-A48E-4A5D-B3E0-272ECCA95AF1}" />
            <Event Name="Keyboard.7" XML_Guid="{B6CC30F6-5F7F-4107-9C43-A122D6DCC7A4}" />
            <Event Name="Keyboard.8" XML_Guid="{0D487CF9-9AB5-4277-B6C7-D185909BA727}" />
            <Action Name="abort Q timer" XML_Guid="{CD729522-0CA0-468D-81DD-BD2A0F6C1931}">
                EventGhost.Comment()
            </Action>
            <Action Name="Timer: Abort Q timer" XML_Guid="{189D0AFD-A420-4F9A-93FA-316C5F84C1B7}">
                Timer.TimerAction(u'repeatQ', 4, 0, 0.2, u'repeatQ', False, True, 0, u'00:00:00')
            </Action>
            <Action XML_Guid="{40774BDD-3528-4CDF-8C78-C2971A2427A6}">
                Window.SendKeys(u'Q+{str(eg.event.suffix)}', False, 2)
            </Action>
        </Macro>
    </Folder>
</EventGhost>
or this one if you want to skip the send keys and just run the correct wincab.exe.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4">
    <Folder Name="repeat Q" XML_Guid="{5E543AAD-C592-48CC-9374-6A7E5D047288}" Expanded="True">
        <Macro Name="Timer: Start new or control running timer" XML_Guid="{27F01B74-4FAE-41D2-B73D-A47BBAA6D362}">
            <Action Name="Add an event to start timer to repeat Q key" XML_Guid="{CD729522-0CA0-468D-81DD-BD2A0F6C1931}">
                EventGhost.Comment()
            </Action>
            <Action XML_Guid="{189D0AFD-A420-4F9A-93FA-316C5F84C1B7}">
                Timer.TimerAction(u'repeatQ', 0, 0, 0.2, u'repeatQ', False, True, 0, u'00:00:00')
            </Action>
        </Macro>
        <Macro Name="Send Keystrokes: q" XML_Guid="{8365B0BB-B363-45F7-B891-A0EB44FD3B63}">
            <Event Name="Timer.repeatQ" XML_Guid="{DC370120-D5DC-49D8-A668-653CBD965B26}" />
            <Action XML_Guid="{6FE0D6E6-ABF2-4EA8-B32B-53A07B18F938}">
                Window.SendKeys(u'Q', False, 2)
            </Action>
        </Macro>
        <Macro Name="Timer: Abort running timer" XML_Guid="{27F01B74-4FAE-41D2-B73D-A47BBAA6D362}">
            <Event Name="Keyboard.1" XML_Guid="{FE636D21-EA11-4117-A105-A542E82DD6B2}" />
            <Event Name="Keyboard.2" XML_Guid="{E2973340-07C3-46E8-BD63-5ED1800B92AB}" />
            <Event Name="Keyboard.3" XML_Guid="{E97ED3C2-7304-4AFE-B57C-2EFCF30394E7}" />
            <Event Name="Keyboard.4" XML_Guid="{564AE170-8B0E-4D25-88B8-E5E62724AE8F}" />
            <Event Name="Keyboard.5" XML_Guid="{D8E91D08-C231-4A74-A8D3-AB703FBA9D5E}" />
            <Event Name="Keyboard.6" XML_Guid="{7301FFCA-A48E-4A5D-B3E0-272ECCA95AF1}" />
            <Event Name="Keyboard.7" XML_Guid="{B6CC30F6-5F7F-4107-9C43-A122D6DCC7A4}" />
            <Event Name="Keyboard.8" XML_Guid="{0D487CF9-9AB5-4277-B6C7-D185909BA727}" />
            <Action Name="abort Q timer" XML_Guid="{CD729522-0CA0-468D-81DD-BD2A0F6C1931}">
                EventGhost.Comment()
            </Action>
            <Action Name="Timer: Abort Q timer" XML_Guid="{189D0AFD-A420-4F9A-93FA-316C5F84C1B7}">
                Timer.TimerAction(u'repeatQ', 4, 0, 0.2, u'repeatQ', False, True, 0, u'00:00:00')
            </Action>
            <Action Name="run wincab.exe" XML_Guid="{93023BAE-C9C5-44B3-BEDC-E5A3B4F86AF5}">
                EventGhost.PythonScript(u"if eg.event.suffix == '1' or eg.event.suffix == '8':\n    eg.plugins.System.Execute(u'C:\\\\Jukeboxes\\\\One Hit Wonders\\\\wincab.exe', u'', 0, False, 2, u'', False, False, u'', False, False, False, False)\n\nelse:\n    eg.plugins.System.Execute(u'C:\\\\Jukeboxes\\\\One Hit Wonders\\\\wincab' + str(eg.event.suffix) + '.exe', u'', 0, False, 2, u'', False, False, u'', False, False, False, False)")
            </Action>
        </Macro>
    </Folder>
</EventGhost>
Last edited by yokel22 on Mon Jan 22, 2018 5:15 pm, edited 1 time in total.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: hold down a key

Post by kgschlosser »

the Error is in the fact that the plugins are not installed and it is trying to make actions for plugins that do not exist.


This is going to be rectified when we get the plugin repository up and running. It is going to prompt you if you want to download and install any missing plugins on paste, or if you open a saved tree in which you do not have the plugin locally installed.

(kinda nifty actually)
If you like the work I have been doing then feel free to Image
User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: hold down a key

Post by yokel22 »

That's a good idea, i sometimes forget it does that.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: hold down a key

Post by kgschlosser »

I am thinking maybe in the time being instead of that traceback. maybe pop up a dialog letting you know that you need to install some plugins before pasting the code.
If you like the work I have been doing then feel free to Image
Post Reply