Linux spam ability?

does anyone know of a program, or way to spam the macro on linux?? i use to play on windows but recently made the move to linux, and i miss the AHK and cant find something to replicate it

thanks in advance

Hello there, do you use any brand name gaming mouse or keyboard?

Usually, some people might have created support for specific ones on GitHub.

Not sure if this still works in Linux: GitHub - autokey/autokey: AutoKey, a desktop automation utility for Linux and X11.

Haven’t run Linux as a full desktop in a very long time, sorry not much of help.

1 Like

you can use standard X11 utilities if you are running WoW on linux under wine like me.

you can use xdotool to send any keys to a window. and you can use xwininfo to find the window id of WoW. for example:

mischief@abacus:~ $ xwininfo -tree -root | grep Wor
 0x4000001 "World of Warcraft": ("wow.exe" "wow.exe")  464x240+1048+610  +1048+610
    0x4000003 "World of Warcraft": ("wow.exe" "wow.exe")  2560x1440+0+0  +0+0

we see there’s two windows. not sure what the first one is, but the second one matches my screen resolution.

we then plug that id into xdotool, and send the key “1” assuming your macro is on key 1. i put a short sleep before the loop so i can switch to the WoW window before it starts, and use 0.05 seconds for the inner sleep which is 50ms.

sleep 5; while true; do sleep 0.05; xdotool key --window 0x4000003 1; done

any sort of simple thing you might do in AHK you can also do with normal shell scripting and the X11 utilities on linux.

enjoy :slight_smile:

sweet ill have to try it, im kinda new to linux is that just a terminal command?

hmm is it suppose to consonantly spam the button?

yes - you will need to open a terminal emulator and run these commands in a shell.

yes - that’s what the while loop does in the example i posted. it just runs the click command forever.

you will need to install the packages for your linux distribution that provide xwininfo and xdotool - on debian and ubuntu-like systems, it’s probably the x11-utils and xdotool packages.

to make something that fits your needs, you will probably need to learn a little shell scripting. you can find some guides online if you just google for linux shell scripting, or just reply back here and i can try to point you the right way.

While this isn’t a true key spam, it is functionally equivalent by spamming an action button. It consists of two scripts.

# Display mouse coodinates.

x = store.get_global_value("clicker_status")
#Find button coords

from Xlib import X, display # import the necessary classes from the specified module
d = display.Display().screen().root.query_pointer() # get pointer location
x = str(d.root_x) # get x coord and convert to string
y = str(d.root_y) # get y coord and convert to string
dialog.info_dialog("(X, Y)", x+", "+y) # create an info dialog to display the coordinates

==================================

#Begin mouse click spam

if x == "on":
#turn it off if it is on
    store.set_global_value("clicker_status","off")
else:
    #any other value is considered off, should cover nulls
    store.set_global_value("clicker_status","on")

while True:
    time.sleep(1)
    #Click inside the action button
    mouse.click_absolute(650,1055,1)
    x = store.get_global_value("clicker_status")
    if x == "off":
        #leave the execution if we've been toggled off
        break
  1. Within Autokey, create a “New Script” from the drop-down. Copy/paste the Display Coords code. Create another script and copy/paste the button spam code. Bind them to keys.

  2. Switch to Warcraft.

  3. Hover over the button you wish to spam and press the key for the Display macro. Write down the coordinates.

  4. Edit the script and change the coordinates to wherever your button is located. “Sleep(x)” is in seconds. 1 = One second. 0.1 = 10 milliseconds. Etc.

  5. Bind it to whatever key your want to spam and off you go.

Dont know if your still active or not, but the first script that is to find the cordinates, how does it work? I’ve done as instructed, but it does not show the cordinates anywhere.
Also might include that you need to press Control-S to save the script when edited.