Ubuntu script does not perform click

Post here if you need help using Actiona
Post Reply
bartonh
Posts: 2
Joined: 22 Sep 2014, 14:51

Ubuntu script does not perform click

Post by bartonh »

Clicking a row w/in application on Ubuntu doesn't seem to work.

I am running a simple 4 line action script.

1 - Select window and maximize -> works
2 - Select same window and bring to foreground -> works
3 - Click a row on same window -> Does not appear to work as the row does not become highlighted
4 - Click the Start button -> Does not appear to work

On action 3 & 4, I use the Target icon to capture the mouse coordinates when I click the row/start button. I am scripting Bit Torrent.

Any idea what I need to do or how to debug?

Thanks

Script follows:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
    <settings program="actionaz" version="3.7.0" scriptVersion="1.0.0" os="GNU/Linux"/>
    <actions>
        <action name="ActionClick" version="1.0.0"/>
        <action name="ActionWindow" version="1.0.0"/>
    </actions>
    <parameters/>
    <script pauseBefore="0" pauseAfter="0">
        <action name="ActionWindow" comment="Maximize Torrent window" pauseAfter="500">
            <exception id="0" action="0" line=""/>
            <exception id="1" action="0" line=""/>
            <exception id="2" action="0" line=""/>
            <exception id="32" action="0" line=""/>
            <exception id="33" action="0" line=""/>
            <parameter name="title">
                <subParameter name="value" code="0">Transmission</subParameter>
            </parameter>
            <parameter name="resizeHeight">
                <subParameter name="value" code="0">0</subParameter>
            </parameter>
            <parameter name="action">
                <subParameter name="value" code="0">maximize</subParameter>
            </parameter>
            <parameter name="movePosition">
                <subParameter name="value" code="0">:</subParameter>
            </parameter>
            <parameter name="useBorders">
                <subParameter name="value" code="0">true</subParameter>
            </parameter>
            <parameter name="resizeWidth">
                <subParameter name="value" code="0">0</subParameter>
            </parameter>
        </action>
        <action name="ActionWindow" comment="Bring window to foreground" pauseAfter="500">
            <exception id="0" action="0" line=""/>
            <exception id="1" action="0" line=""/>
            <exception id="2" action="1" line=""/>
            <exception id="32" action="0" line=""/>
            <exception id="33" action="0" line=""/>
            <parameter name="title">
                <subParameter name="value" code="0">Transmission</subParameter>
            </parameter>
            <parameter name="resizeHeight">
                <subParameter name="value" code="0">0</subParameter>
            </parameter>
            <parameter name="action">
                <subParameter name="value" code="0">setForeground</subParameter>
            </parameter>
            <parameter name="movePosition">
                <subParameter name="value" code="0">:</subParameter>
            </parameter>
            <parameter name="useBorders">
                <subParameter name="value" code="0">true</subParameter>
            </parameter>
            <parameter name="resizeWidth">
                <subParameter name="value" code="0">0</subParameter>
            </parameter>
        </action>
        <action name="ActionClick">
            <exception id="0" action="0" line=""/>
            <exception id="1" action="0" line=""/>
            <exception id="2" action="1" line=""/>
            <exception id="32" action="0" line=""/>
            <exception id="33" action="0" line=""/>
            <parameter name="button">
                <subParameter name="value" code="0">left</subParameter>
            </parameter>
            <parameter name="action">
                <subParameter name="value" code="0">pressRelease</subParameter>
            </parameter>
            <parameter name="amount">
                <subParameter name="value" code="0">1</subParameter>
            </parameter>
            <parameter name="position">
                <subParameter name="value" code="0">1551:505</subParameter>
            </parameter>
            <parameter name="positionOffset">
                <subParameter name="value" code="0">:</subParameter>
            </parameter>
        </action>
        <action name="ActionClick" comment="Play" pauseBefore="100">
            <exception id="0" action="0" line=""/>
            <exception id="1" action="0" line=""/>
            <exception id="2" action="1" line=""/>
            <exception id="32" action="0" line=""/>
            <exception id="33" action="0" line=""/>
            <parameter name="button">
                <subParameter name="value" code="0">left</subParameter>
            </parameter>
            <parameter name="action">
                <subParameter name="value" code="0">pressRelease</subParameter>
            </parameter>
            <parameter name="amount">
                <subParameter name="value" code="0">1</subParameter>
            </parameter>
            <parameter name="position">
                <subParameter name="value" code="0">1023:482</subParameter>
            </parameter>
            <parameter name="positionOffset">
                <subParameter name="value" code="0">:</subParameter>
            </parameter>
        </action>
    </script>
</scriptfile>


User avatar
Jmgr
Admin
Posts: 1649
Joined: 07 Dec 2005, 15:45
Contact:

Re: Ubuntu script does not perform click

Post by Jmgr »

You could add a Pause action before the clicks, sometimes the window manager needs some time to animate the window.
"My software never has bugs. It just develops random features."
bartonh
Posts: 2
Joined: 22 Sep 2014, 14:51

Re: Ubuntu script does not perform click

Post by bartonh »

I tried adding Pause between clicks but no change.

What fixed it for me was to use Ubuntu command xmousepos (http://manpages.ubuntu.com/manpages/har ... pos.1.html). Rather then use the mouse pos that came from the cross hair option, I used the x & y root position provided by xmousepos and then it worked.

Hope that helps.
User avatar
Jmgr
Admin
Posts: 1649
Joined: 07 Dec 2005, 15:45
Contact:

Re: Ubuntu script does not perform click

Post by Jmgr »

This is interesting. On my system they both give the same value. I have two screens with twin view from Nvidia.

Do you have multiple screens ? With the proprietary graphics card driver or the free one ?
"My software never has bugs. It just develops random features."
Post Reply