Can I automate Linux similar to AutoHotKey and AutoIT?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
in linux tasks are usually run without gui and automated by scripts. These [tools] are free and by default available. But if you have specific issue you need to give us more details...
I had to go to Wikipedia to answer your question - remember some of us have never had Windows! — but the answer is yes, but it's more do-it-your-self.
I have two scripts written in bash in my home directory. One, cleanup, is set to run after logging-in to remove things like flash cookies and ever-proliferating thumbnails. The other, backup, is included in the desktop menu and does exactly what it says.
You can also attach commands to keyboard shortcuts. Thus I have Super+1 set to
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
To add to DavidMcCann's examples, I've written several shell scripts, and adapted others.
Remove all orphaned packages from the system.
Create a local distro repository.
Search and replace within groups of files
Automated television recording.
Set up firewall rules
Terminate groups of programs by keyword.
Compress/uncompress files by file name extension.
Back up files.
But many times there are programs written by others to perform common multi-step tasks. Windows doesn't require the same type of tools as Linux, because it's not used in the same way. Home users can take advantage of the vast array of system tools to either use alone or to build more complex tools using scripts.
AutoKey is a desktop automation utility for Linux that can be used for text substitution or to execute a script. It uses Python as the scripting language.
I primarily use it for text substitution, and I have keyboard shortcuts to perform mundane, repetitive tasks like entering my address, inserting accented and other special characters into a document, and inserting a 'Lorem ipsum' placeholder.
thanks for the replies guys. i haven't had a chance to read replies until now.
none of the mentioned examples is what i need.
it's all about having a GUI and having a program that runs on top that simulates the EXACT actions you do in windows - like moving a mouse or navigation through options and outputting text. but then being able to add full programming simulation and looping behind it.
the stuff that you guys are talking about are much more advanced and for a higher intelligence species of mankind - that aren't used to being tortured by windows. LOL.
windows users have to suffer. so something like autohotkey really really helps. it lets windows be windows - but lets you automate different things.
let me give an example... i have a silly form that i have to fill in.
i have to fill in 10 fields. after the first 3 fields, i have to wait for the form to get new values for the rest of the form - this takes 5 - 30 seconds. i then have to fill out 7 other parts. one of which is a dropdown.
so i could make a script that outputs to the first 3 fields some predefined text. it then waits 30 seconds (or you can make it more intelligent and wait until the window is ready). you then fill out the next field. then send a tab command - so the browser tabs to the next field. you submit the next fields like this. on the drop down, you know you need the 15th item. so you simulate pressing enter and then pressing down 15 times and then press enter again and then press tab.
it's actually really powerful it does heck of a lot more than the above.
is thee ANYTHING like this on linux?
i was hoping IronAHK might be something worth looking at - but just saw a youtube video and it shows it's an advanced text substituion tool. i'll need to look into more. the guy onthe video does say that it can simulate mouse movement as well.
any further replies would be appreciated. thanks.
Last edited by enginestar; 06-04-2018 at 09:45 PM.
windows users have to suffer. so something like autohotkey really really helps. it lets windows be windows - but lets you automate different things.
i think you just explained why an exact copy of autiohotkey does not exist for linux.
in any case, linux users do NOT have to suffer.
a large part of autohotkeys functionality is pointless in linux, because the functionality is right there under your nose, baked into the operating system.
i think you just explained why an exact copy of autiohotkey does not exist for linux.
in any case, linux users do NOT have to suffer.
a large part of autohotkeys functionality is pointless in linux, because the functionality is right there under your nose, baked into the operating system.
well... i'm just a complete newbiew to linux... but i have to disagree by giving an example.
take gimp.
change brightness, resize resolution and do a few other things.
doing these actions take a huge amount of time - say 20 seconds.
if you have 100 images you need to work on then this becomes a pain.
if you can write a quick script on the fly, then you save tons of time.
(gimp is awesome (especially the latest version) - but lacks so many simple short cuts to access things from menus)
OK... so you say you can code all of those things using something like imagemagick?
well say if i add... some pictures need editing and others don't you only know when you look at the image if it needs editing or not.
or maybe, when you look at the image, you immediately know to take actions xyz, else, use actions abc - in which case, you can code 2 scripts - one triggered by CTRL Q and the other by CTRL W (just making this up).
everything can be coded and an intelligent solution made - but this would take a lot of time.
with something like autohotkey, you can create solutions on the fly in just a minute or 2.
you can do for any program.
surely there HAS to be some sort of equivalent?
Last edited by enginestar; 06-05-2018 at 07:56 AM.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
Linux has different ways of automating tasks. You've been using autohotkey for a while, and you've adapted it to many different tasks. But there are many other ways on linux to automate work. And, in fact, Linux can do many things that are impossible on Windows.
thanks for the replies guys.
i think you're missing the point. autohotkey let's you create automation on top of windows programs where automation needs where never considered.
gimp automation tools are lacking. but i only used gimp as an example - it could be any other program.
i wish i wish there was something like autohotkey for mac. i would have been using macs for a long time if there was. i've been there and done that. they do have automation tools - but nothing that is anywhere near autohotkey. autohotkey is what i have used, but there is also one other that does the same thing.
i'll look into python. maybe this will offer a way to automate.
Perhaps you could explain to us why you can't do whatever you want to with the scripting facilities provided, rather than just saying they're "lacking". Similarly, you keep saying how useful autohotkey is, which conveys nothing to those of us who've never seen it!
I think you'd do better to just stick with Windows. You like it and you know how to use it, so why change to something you don't seem happy to learn?
anyhow, here's one more: xdotool.
application independent.
for everything that sits on your desktop one way or anohter.
combine that with shell scripting etc., you can do so much more than you could ever imagine on any windows machine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.