Record and execute actions
Project description
arexecute
Application to record actions on the computer and then execute them in a controlled way.
Installation
arexecute is in pypi, run the following command to install:
python -m pip install arexecute
After installation, all commands that are run using the module as a direct application can be run using either one of the following commands:
python -m arexecute <arexecute-commands>
or:
arexecute <arexecute-commands>
For the examples we will stick to the second one.
Recording
To record into a file named "example.json", run the following line:
arexecute -r example
Here "example" can be a filename with a path different from the current directory,
or it can be only a filename, either with the .json extension or without it.
The instructions for recording are the following:
(->) Denotes press first one key, then the next
Command | Action |
---|---|
Alt | Stop recording any time |
W -> any number | Add waiting time of seconds equal to the number, floats allowed with a dot |
I | Starts writing anything, commands allowed |
Caps Lock | Stops any action (for example set the final wait time or stop clicking) |
Ctrl | Move mouse to current mouse position |
Shift n times | Clicks n times in the last mouse position or current if there were no movements before |
v | Adds a variable to be defined later |
In this way, one can record mouse movements, clicks, write variables, etc.
Executing
To execute, run the following line:
arexecute -e example
This will execute the recorded example once. In order to run more than one time, add the -i flag. This flag can be used with an integer determining the amount of iterations to be done, or without an integer, in which case it will run in an endless loop. If the endless option is chosen, have in mind that quickly moving the mouse to the top right corner of the screen will stop the execution as a safe option incorporated on pyautogui. In order for this command to work, a previous recording named "example.json" in the same directory, or in the one specified by the filename must exist.
Using Variables
When recording, typing 'v' will add a new variable in place. In order to define this variable, you have to run the execution script manually, it cant be run using the command line. Also when running it manually you have to specify the variables.
Usage on a .py file
To use this program in a python script, just import recorder and executer and start using the Recorder and Executer classes like in the next example where while recording, two variables where defined:
from arexecute import recorder, executer
fname = "testing"
r = recorder.Recorder(fname, verbose=1)
r.start()
e = executer.Executer(fname, variables=["variable 1", "variable 2"], verbose=1)
e.start()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file arexecute-1.0.2.tar.gz
.
File metadata
- Download URL: arexecute-1.0.2.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ced15285c47700a11df9c80ddbae721e7941e3e52626b6256bc358e664188c1e |
|
MD5 | 53f61ccc228f1c86c5e72f14347c3f9a |
|
BLAKE2b-256 | e58ec41b1f2164dffb5158ae1504ac4b8ce2e3317950fd3705b33a1ba0e28721 |
File details
Details for the file arexecute-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: arexecute-1.0.2-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d6931680af7b683339d7d550ba888afe8c3eb0a5fb9b0b714e652acba1ae34a |
|
MD5 | 3c0a39be12fe2568c87fb6c387771696 |
|
BLAKE2b-256 | 891ad7a1600a7b2007a4013e037fc5ee569df456ee9123bb9712656f9da570b9 |