Autohotkey - AHK - For linux

Issues Related to Hardware (Sound, Video, Printers, Scanners, Webcams, Touchpads, Keyboards, Sensors, Drives, GRUB, etc.)

Moderator: Moderators

Dev-X
Baby Hen
Posts: 9
Joined: Thu Jul 23, 2009 19:38

Autohotkey - AHK - For linux

Post by Dev-X » Thu Jul 23, 2009 19:49

Hey Guys,

New to Sabayon, and this thing is great looking. I've been looking for a "theme" like this for ages, even started to make one myself for XP.

Was just wondering if there was an equivelant to autohotkey for sabayon.

Basically just looking for keyboard and mouse automation.

Not just hotkey features.

Thanks!

Dev-X

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8091
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: Autohotkey - AHK - For linux

Post by Fitzcarraldo » Thu Jul 23, 2009 21:53

Keyboard and mouse macros are one area that Windows beats Linux hands-down. However, not that I've tried it myself but AutoHotkey apparently works in Linux using Wine: WineHQ - AutoHotkey. Last time I installed Wine in SL, AutoHotkey was installed automatically. Never tried it, though.

Thev00d00
Generally Awesome (tm)
Posts: 1472
Joined: Wed Feb 21, 2007 15:52
Location: United Kingdom
Contact:

Re: Autohotkey - AHK - For linux

Post by Thev00d00 » Fri Jul 24, 2009 7:41

What are you trying to script? Chances are it can be scripted with normal bash and linux utils
Image
Please report Bugs on the Bugzilla, not forum
Please Adopt an Unanswered thread
Website / Blog : v00d00.net
twitter: Follow Me
G+: Circle Me

Dev-X
Baby Hen
Posts: 9
Joined: Thu Jul 23, 2009 19:38

Re: Autohotkey - AHK - For linux

Post by Dev-X » Fri Jul 24, 2009 17:15

Basically the scripts i want to replicate do this.

It's a lot sorry, been building it for over a year. I don't do squat at work anymore =)

Gather information from CMS system
- Take HTML source from IE (or other browser)
- RegEx to find the strings of data, put into variables, do stuff with those variables (error checking, replace characters, etc)
- Launch other apps or scripts based off those variables (photoshop, HTML editor) with parameters (file to open for photoshop / gimp)
- Mouse + Keyboard with coordinates to click photoshop / gimp buttons relative to active window / or search by pixel / image to find the correct buttons to press
- Image param checking, width, height, size.
- GUI that displays those images and a box of text to position margins ( html )
- input boxes popups, message boxes with yes/no or custom options

That's probably close to most of it.

I know this isn't something i'm going to get rolling in a day or two =\

There are talks of people putting ahk in wine, but i don't see super tutorials out there.

Dev-X
Baby Hen
Posts: 9
Joined: Thu Jul 23, 2009 19:38

Re: Autohotkey - AHK - For linux

Post by Dev-X » Thu Jul 30, 2009 15:41

I finally just realized what fitz just said, thanks fitz =D

I'll have to give that a try.

What did you do to install it?

I've been using the live CD on a usb stick so far. I heard package manager was like entrophy or something like that?

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8091
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: Autohotkey - AHK - For linux

Post by Fitzcarraldo » Thu Jul 30, 2009 16:37

Actually I should have written "installed wine and wine-doors". Check if those two packages are installed by entering the following command as the root user:

Code: Select all

equo search wine
If they're not, just install them using the commands (as the root user):

Code: Select all

equo install wine
equo install wine-doors
Then click on Kickoff and enter "wine" in the Search box and you'll see Wine-Doors listed. Click on it and it'll open a 'Wine Doors - Initial Setup' window prompting you to enter your name and company name. Enter what you want, tick 'I have a valid Microsoft Windows (tm) license' (let's face it, we all pay the Windows tax) and click on the Proceed button. It may start to install and then freeze. Dispair not. Close it by clicking on the window's 'x' button and try again. It should work eventually. The window will show you various Windows applications and fonts that you can install, one of which is... AutoHotkey! Click on 'Install' for each one you want to install, and they will be added to the installation queue. Then click on 'Apply' to install them. It's better to install them one at a time in order to avoid the installer freezing (if it does freeze, kill it and try again). Then if you click on Kickoff > Applications you'll find a new entry: Wine. Under that you'll find Programs > AutoHotkey (if you selected AutoHotkey to be installed, of course!).

You may have to run winecfg before doing the above Wine-Doors stuff, I can't recall. Run it from a Terminal/Konsole window under your own username, NOT as the root user. winecfg enables you to configure various Windows-related things like where your C: drive is, where the My Documents folder is, whether you have any special DLLs you want to use, and stuff like that.

As I wrote previously, I've not tried AutoHotkey under Wine, so you'll have to play around with it to see how it works. Google is going to be a possible friend. Hope it works for you.

DarkVader
Baby Hen
Posts: 12
Joined: Mon Dec 31, 2007 10:11

Re: Autohotkey - AHK - For linux

Post by DarkVader » Fri Aug 07, 2009 0:30

i've been using easystroke

the latest version doesn't work with sabayon due to an unsupported xserver but 0.3.1 works very well

Image

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8091
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: Autohotkey - AHK - For linux

Post by Fitzcarraldo » Mon Dec 21, 2009 19:22

A belated thank you, DarkVader, for pointing out easystroke. Gentoo Bugzilla Bug Report No. 253783 has ebuilds for versions 0.3.1 and 0.4.5 of easystroke, plus a comment that the ebuild for 0.4.5 also works for 0.5.0 (which needs at least version 1.7 of X.Org Server). I'm using xorg-server-1.7.1 so I installed the latest version (easystroke-0.5.0) as follows:

1. Googled easystroke-0.5.0.tar.gz and downloaded it to my Desktop.

2. Downloaded easystroke-0.4.5.ebuild to my Desktop from the above-mentioned Gentoo Bugzilla Bug Report.

3. Ran the following commands as root user in a Konsole/Terminal window:

Code: Select all

mkdir -p /usr/local/portage/x11-misc/easystroke/
cd /usr/local/portage/x11-misc/easystroke/
cp /home/fitzcarraldo/Desktop/easystroke-0.5.0.tar.gz /usr/portage/distfiles/
cp /home/fitzcarraldo/Desktop/easystroke-0.4.5.ebuild ./easystroke-0.5.0.ebuild
nano easystroke-0.5.0.ebuild (edit the ebuild to change "x11-misc/xinput" to "x11-apps/xinput")
ebuild easystroke-0.5.0.ebuild manifest
emerge -1v easystroke
EDIT: I've just been playing with easystroke to see what it is capable of, and it is excellent! Here's a brief HowTo that explains what you do to configure and use it: Easystroke Makes Mouse Gestures Easy in Linux, and here's more-detailed documentation from the project's Web site: easystroke - Documentation. With easystroke there is now no need to touch the keyboard to enter text, press function keys or combinations of keys, launch programs, etc. I have already configured easystroke to enter a specific piece of text that I want to have in the e-mails I write, just by holding down the middle button of the mouse and moving it from left to right.

Thev00d00
Generally Awesome (tm)
Posts: 1472
Joined: Wed Feb 21, 2007 15:52
Location: United Kingdom
Contact:

Re: Autohotkey - AHK - For linux

Post by Thev00d00 » Tue Dec 22, 2009 10:26

Sounds excellent! Fitz can you file an entropy package request and ill get that onto our overlay. :mrgreen:
Image
Please report Bugs on the Bugzilla, not forum
Please Adopt an Unanswered thread
Website / Blog : v00d00.net
twitter: Follow Me
G+: Circle Me

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8091
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: Autohotkey - AHK - For linux

Post by Fitzcarraldo » Tue Dec 22, 2009 13:28

Done: Bug Report No. 1115.

Post Reply