Page 1 of 1
Assigning hot key to a .ascr script
Posted: 02 Sep 2018, 22:03
by mysticmuse
I read the other question/answer on this topic but it was not at all clear. I'm running Linux Peppermint. Trying to figure out how to assign a keypress to script. When double clicking on an .ascr script it just loads the script in actiona and does not execute the script. How do you use a saved script within another linux program? Does actona have to be running to use a script? The things I've seen here in the forum seem advanced and specific and I have not yet seen a general conceptual into of how Actiona is suppose to work.
Turns out the syntax I borrowed form a web post was faulty and when corrected, it worked.
Re: Assigning hot key to a .ascr script
Posted: 04 Sep 2018, 11:01
by eureka
I am on Ubuntu and cannot help with Peppermint. But first you need to find out how to assign hotkeys to launch any script (not just *.ascr). In Ubuntu for example there is the AutoKey package.
Next you can write a bash script which runs the command (without need for Actiona GUI being started first):
Search this forum to find out more about actexec.
Apply hot key to that bash script and this should launch and run your *.ascr.
Re: Assigning hot key to a .ascr script
Posted: 06 Sep 2018, 01:13
by mysticmuse
I followed your suggestion and got an .sh script to work with .ascr for opening a url. However, on my system (Linux Peppermint) the mouse commands in Actiona do not work. I found the exact same thing was true of Autokey. Having a tough time finding a macro program that works with Peppermint.
A lot of work later and I found out I was wrong about Autokey. Auto key works but finding the right codes and examples is a major task of Googling.
Re: Assigning hot key to a .ascr script
Posted: 06 Sep 2018, 09:33
by eureka
I dug around and found this ..
https://forum.peppermintos.com/index.php?topic=5698.0
See reply #4
The [AutoKey] version from the PPA uses python3 (whereas the version in the repos uses python2.7), and DOES work for me.
This raises the question - do you have python2 or python3 in Peppermint? Which version is default?
Re: Assigning hot key to a .ascr script
Posted: 08 Dec 2018, 08:01
by TinaNamdev
Next you can write a bash script which runs the command (without need for Actiona GUI being started firs
Re: Assigning hot key to a .ascr script
Posted: 04 Jan 2019, 11:12
by roamer300
I've got a script with just a series of mouse clicks with cursor position. I also tried to assign hotkeys and have same problem as above. How can I turn it into a bashscript as proposed? thx in advance
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actiona" version="3.9.1" scriptVersion="1.1.0" os="GNU/Linux"/>
<actions>
<action name="ActionClick" version="1.0.0"/>
</actions>
<parameters/>
<resources/>
<script pauseBefore="0" pauseAfter="0">
<action name="ActionClick" pauseBefore="1000" pauseAfter="1000">
<exception id="1" action="0" line=""/>
<exception id="32" action="0" line=""/>
<exception id="33" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="0" action="0" line=""/>
<parameter name="positionOffset">
<subParameter name="value" code="0"></subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="0">281:1067</subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="amount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="button">
<subParameter name="value" code="0">left</subParameter>
</parameter>
</action>
<action name="ActionClick" pauseAfter="1000">
<exception id="1" action="0" line=""/>
<exception id="32" action="0" line=""/>
<exception id="33" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="0" action="0" line=""/>
<parameter name="positionOffset">
<subParameter name="value" code="0"></subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="0">979:370</subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="amount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="button">
<subParameter name="value" code="0">left</subParameter>
</parameter>
</action>
<action name="ActionClick" pauseAfter="1000">
<exception id="1" action="0" line=""/>
<exception id="32" action="0" line=""/>
<exception id="33" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="0" action="0" line=""/>
<parameter name="positionOffset">
<subParameter name="value" code="0"></subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="0">898:542</subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="amount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="button">
<subParameter name="value" code="0">left</subParameter>
</parameter>
</action>
<action name="ActionClick" pauseAfter="1000">
<exception id="1" action="0" line=""/>
<exception id="32" action="0" line=""/>
<exception id="33" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="0" action="0" line=""/>
<parameter name="positionOffset">
<subParameter name="value" code="0"></subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="0">890:369</subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="amount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="button">
<subParameter name="value" code="0">left</subParameter>
</parameter>
</action>
<action name="ActionClick" pauseAfter="1000">
<exception id="1" action="0" line=""/>
<exception id="32" action="0" line=""/>
<exception id="33" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="0" action="0" line=""/>
<parameter name="positionOffset">
<subParameter name="value" code="0"></subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="0">793:539</subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="amount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="button">
<subParameter name="value" code="0">left</subParameter>
</parameter>
</action>
<action name="ActionClick" pauseAfter="3000">
<exception id="1" action="0" line=""/>
<exception id="32" action="0" line=""/>
<exception id="33" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="0" action="0" line=""/>
<parameter name="positionOffset">
<subParameter name="value" code="0"></subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="0">1271:679</subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="amount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="button">
<subParameter name="value" code="0">left</subParameter>
</parameter>
</action>
<action name="ActionClick" pauseAfter="1000">
<exception id="1" action="0" line=""/>
<exception id="32" action="0" line=""/>
<exception id="33" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="0" action="0" line=""/>
<parameter name="positionOffset">
<subParameter name="value" code="0"></subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="0">1053:506</subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="amount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="button">
<subParameter name="value" code="0">left</subParameter>
</parameter>
</action>
<action name="ActionClick">
<exception id="1" action="0" line=""/>
<exception id="32" action="0" line=""/>
<exception id="33" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="0" action="0" line=""/>
<parameter name="positionOffset">
<subParameter name="value" code="0"></subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="0">1344:241</subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="amount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="button">
<subParameter name="value" code="0">left</subParameter>
</parameter>
</action>
</script>
</scriptfile>
Re: Assigning hot key to a .ascr script
Posted: 04 Jan 2019, 12:08
by eureka
You do not "turn the ascr script into a bash file".
You simply run the command (try it in terminal)
actexec myactionscript.ascr
actexec should be in your bin folder alongside actiona