LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-31-2018, 06:56 AM   #1
enginestar
Member
 
Registered: May 2018
Posts: 67

Rep: Reputation: Disabled
Can I automate Linux similar to AutoHotKey and AutoIT?


How can I automate using Linux similar to AutoHotkey andAutoIt.

I have a lot of experience using AutoHotKey.
It's awesome and powerful.
I can help automate and speed up mundane tasks.

This is the one biggest thing stopping me from moving to Linux.
If there was an alternative... then I'd jump much quicker to Linux.

Thanks.
 
Old 05-31-2018, 07:29 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,998

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
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...
 
Old 05-31-2018, 08:02 AM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Yes, there are tools like those. https://github.com/Paris/IronAHK
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
 
Old 05-31-2018, 11:11 AM   #4
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,147

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
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
Code:
gconftool-2 string -s apps/panel/applets/clock/prefs/custom_format'<span> color="#ffffff"<b>%R %A %e %B</b></span>'
That reconfigures the panel clock to white type when I have dark wallpaper, while when I have a light desktop, Super+0 turns the clock black!
 
Old 05-31-2018, 12:32 PM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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.
 
Old 05-31-2018, 07:59 PM   #6
BenTrabetere
LQ Newbie
 
Registered: Jul 2015
Location: Mississippi, USA
Distribution: Linux Mint Mate
Posts: 20

Rep: Reputation: Disabled
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.

https://github.com/autokey/autokey

This is a review/tutorial for an earlier version of AutoKey. It will give you an idea about what it can do and how it can be used.
https://saravananthirumuruganathan.w...op-automation/
 
Old 06-04-2018, 09:43 PM   #7
enginestar
Member
 
Registered: May 2018
Posts: 67

Original Poster
Rep: Reputation: Disabled
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.
 
Old 06-05-2018, 02:08 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by enginestar View Post
it's all about having a GUI and having a program that runs on top that simulates the EXACT actions you do in windows
http://linux.oneandoneis2.org/LNW.htm


Quote:
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.
 
Old 06-05-2018, 07:55 AM   #9
enginestar
Member
 
Registered: May 2018
Posts: 67

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
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.
 
Old 06-05-2018, 10:41 AM   #10
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,147

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
OK, lets take GIMP. Have you read the manual?
https://docs.gimp.org/en/gimp-scripting.html
That sounds like what you need.

The point here is to stop asking "what's the Linux program that's the same as XYZ in Windows?" and to start asking "how is this done in Linux?"
 
Old 06-05-2018, 01:15 PM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,998

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
probably you can find something useful here: http://linux.oneandoneis2.org/LNW.htm
 
Old 06-05-2018, 02:15 PM   #12
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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.
 
Old 06-05-2018, 05:35 PM   #13
enginestar
Member
 
Registered: May 2018
Posts: 67

Original Poster
Rep: Reputation: Disabled
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.
 
Old 06-06-2018, 09:40 AM   #14
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,147

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Quote:
Originally Posted by enginestar View Post
gimp automation tools are lacking
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?
 
Old 06-06-2018, 01:28 PM   #15
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
no, we're not missing the point.

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.

Last edited by ondoho; 06-06-2018 at 01:29 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoHotkey on Linux? kktsuri Linux - Software 9 11-03-2014 12:54 PM
alternative for Autohotkey in RHEL 6 vivi874 Red Hat 7 10-26-2014 07:48 PM
LXer: Non-Linux FOSS: AutoHotkey LXer Syndicated Linux News 0 09-11-2014 06:33 PM
AutoHotkey like utility for X? kcin Linux - Software 2 02-18-2008 01:29 AM
LXer: Speaking Unix, Part 6: Automate, automate, automate! LXer Syndicated Linux News 0 01-04-2007 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration