problam with mouse macro

If you have a question or need help, this is the place to be.

problam with mouse macro

Postby nakneket » Thu Mar 22, 2012 11:43 pm

hi, im using v0.4.1r1544 on win 7 with auvisio vrc-1100rc plugin (mainly xbmc)
everything is working perfactly exept the mouse on my remote
in the log it reconizes the mouse (auvisio.mousedir 0.0 auvisio.mousedir 0.27 auvisio.mousedir 0.45 ....)
where the numbers is the angle i press.
only problam is when i try to add the evant (also by dragging)to the macro it dosent capture the angle (i only get auvisio.mousedir) so that no matter which direction i use it's the same evant.

help please...
nakneket
 
Posts: 11
Joined: Thu Mar 22, 2012 11:30 pm

Re: problam with mouse macro

Postby Pako » Fri Mar 23, 2012 9:43 am

That is correct.
The angle is transmitted as event payload.
It is nonsense to have a special event for each value of angle.
Your macro should be able to handle the event payload.

Pako
User avatar
Pako
Plugin Developer
 
Posts: 1282
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: problam with mouse macro

Postby nakneket » Fri Mar 23, 2012 2:18 pm

first of all thanks for replaying
now im having truble with the syntax:( it will be best if it is possible to do it strait from the evantghost window, but if not)

this is where i start from:

</Macro>
<Macro Name="Start mouse movement in direction 0.00°" Expanded="True">
<Event Name="Auvisio.MouseDir" />
<Action>
Mouse.GoDirection(0.0)
</Action>
</Macro>

how do i add the paylaod?, ive tried a few different ways but with no success.
nakneket
 
Posts: 11
Joined: Thu Mar 22, 2012 11:30 pm

Re: problam with mouse macro

Postby Pako » Fri Mar 23, 2012 2:47 pm

You can try to use Python Command action instead of the Start Mouse Movement action as follows:
StartMouseMovement.png
However, I unfortunately do not know if it works. I do not have the opportunity to try it.

Pako
User avatar
Pako
Plugin Developer
 
Posts: 1282
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: problam with mouse macro

Postby nakneket » Sat Mar 24, 2012 7:33 pm

im very new to eventghost and pyton, i tried but with no succes.
you can see in my attachment how the event is displayed on the log and how it looks like after i drag it to the macro (the same but without the angle).
mouse help.PNG

i appreciate the help
and sorry for my ignorance
nakneket
 
Posts: 11
Joined: Thu Mar 22, 2012 11:30 pm

Re: problam with mouse macro

Postby Pako » Sun Mar 25, 2012 6:09 am

nakneket wrote:im very new to eventghost and pyton, i tried but with no succes.
You do not need to know Python.
It should be enough just to do it, as I wrote (use Python Command action instead of the Start Mouse Movement action).
StartMouseMovementTree.png
StartMouseMovementTree.png (7.92 KiB) Viewed 1086 times
But as I wrote, I can not try it, I am not the owner of Auvisio.

Pako
User avatar
Pako
Plugin Developer
 
Posts: 1282
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: problam with mouse macro

Postby nakneket » Sun Mar 25, 2012 1:11 pm

still not working, ive attached a few different macros ive tried and their log
and the Auvisio plugin text, where at the end i think its the mouse configuration.
10x again
mouse 1.PNG

mouse 3.PNG

__init__.py
(4.18 KiB) Downloaded 33 times
nakneket
 
Posts: 11
Joined: Thu Mar 22, 2012 11:30 pm

Re: problam with mouse macro

Postby nakneket » Sun Mar 25, 2012 4:30 pm

everything is working well now, :D
i ended up copying a code i found poasted by skat

<Folder Name="Mouse Control" Expanded="True">
<Folder Name="Mouse Buttons">
<Folder Name="LeftRightClick" id="113" Enabled="False">
<Macro Name="Right mouse button">
<Event Name="Auvisio.RightClickInfo" />
<Action>
EventGhost.PythonScript(u'from eg.WinApi.Dynamic import mouse_event\nmouse_event(0x0008, 0, 0, 0, 0)\nmouse_event(0x0010, 0, 0, 0, 0)\n')
</Action>
<Action>
EventGhost.JumpIfLongPress(1.0, XmlIdLink(139))
</Action>
<Action Enabled="False">
Mouse.RightButton()
</Action>
</Macro>
<Macro Name="Left mouse button">
<Event Name="Auvisio.LeftClick" />
<Action>
Mouse.LeftButton()
</Action>
</Macro>
</Folder>
<Folder Name="LeftRightInfoClick" id="122" Expanded="True">
<Macro Name="Left mouse button" Expanded="True">
<Event Name="Auvisio.LeftClick" />
<Action>
Mouse.LeftButton()
</Action>
</Macro>
<Macro Name="RButtonOrInfo">
<Event Name="Auvisio.RightClickInfo" />
<Action>
EventGhost.PythonCommand(u'eg.globals.RButtonInfoCount = 1')
</Action>
</Macro>
<Macro Name="MouseButtonUp">
<Event Name="Auvisio.MouseButtonUp" />
<Action>
EventGhost.PythonCommand(u'eg.globals.RButtonInfoCount += 1')
</Action>
<Action>
EventGhost.TriggerEvent(u'ReconcileMouseButtonUp', 0.22)
</Action>
</Macro>
<Macro Name="ReconcileMouseButtonUp">
<Event Name="ReconcileMouseButtonUp" />
<Action>
EventGhost.PythonScript(u"from eg.WinApi.Dynamic import mouse_event\nif eg.globals.RButtonInfoCount &gt; 2:\n mouse_event(0x0008, 0, 0, 0, 0)\n mouse_event(0x0010, 0, 0, 0, 0)\nelif eg.globals.RButtonInfoCount == 2:\n eg.globals.RButtonInfoCount = -1\n eg.plugins.EventGhost.TriggerEvent(u'Auvisio.Info', 0)\neg.globals.RButtonInfoCount = -1")
</Action>
</Macro>
</Folder>
</Folder>
<Macro Name="Start mouse movement" Expanded="True">
<Event Name="Auvisio.MouseDir" />
<Action>
EventGhost.PythonScript(u'if eg.plugins.Mouse.plugin.thread.receiveQueue.empty() or eg.plugins.Mouse.plugin.thread.receiveQueue.qsize()==1:\n eg.plugins.Mouse.GoDirection(eg.event.payload)\neg.globals.LastMouseMoveTime = eg.event.time')
</Action>
</Macro>
<Macro Name="LongRightClick" id="139">
<Action>
EventGhost.TriggerEvent(u'LongRightClick', 0.0)
</Action>
</Macro>
</Folder> :D
nakneket
 
Posts: 11
Joined: Thu Mar 22, 2012 11:30 pm

Re: problam with mouse macro

Postby Pako » Sun Mar 25, 2012 5:10 pm

nakneket wrote:still not working, ive attached a few different macros ive tried and their log
and the Auvisio plugin text, where at the end i think its the mouse configuration.
You still do it differently, than how I wrote.
I wrote eg.plugins.Mouse.GoDirection(eg.event.payload),
but you wrote eg.plugins.mouse.GoDirection(eg.event.payload).
It is then really difficult to get beyond.

Pako
User avatar
Pako
Plugin Developer
 
Posts: 1282
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: problam with mouse macro

Postby nakneket » Sun Mar 25, 2012 8:43 pm

well , as i felt i owed you for my nonsense, i tried again
eg.plugins.Mouse.GoDirection(eg.event.payload)
and its working great, better then the code i found poasted by skat.
many thanks , i appreciate your patiance.
nakneket
 
Posts: 11
Joined: Thu Mar 22, 2012 11:30 pm

Re: problam with mouse macro

Postby skat » Sun Aug 05, 2012 10:03 am

@nakneket, just to clarify, the snippet you pasted above is a more comprehensive control of Auvisio's mouse features, including the additional button logic. If you want to get more background why it's been done the way it has, have a look at the Auvisio plugin thread: viewtopic.php?f=9&t=3316&p=18686#p18686
skat
 
Posts: 48
Joined: Thu Jun 23, 2011 10:11 am


Return to General Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest