Close
Showing results 1 to 3 of 3

Hybrid View

  1. #1

    Default A request for AHK users - non WoW related....

    I don't use the software boxing method although I am familiar with macros and scripts. I used to use EZ Macros and EasyUO a lonnnnng time ago, so I know what they can do. I don't need any inteligence here - I need to control a large industrial machine unit using an X-keys. I have a program that is static (the internal window and button names don't change although the application window may be in slightly different places as windows tends to tile it down after it reopens). This isn't related to WoW so anything goes really - I just need to make the application function such that when I press a certain keystroke that it sends the proper mouse click to the right box.

    My first thought was AHK but I profess to know very little about it as it came into use after I had setup everything in hardware. I need to press specific on screen buttons (with a mouse cursor) and have some very basic level of filtering (if this pixel is green then the item is already on so don't press on again). I have seen people program Guitar Hero using AHK so I figured I would pick the brain of the forums and see if somebody who knows more about AHK and the like can let me know if this is something that would work or not and if so how easy it would be to put together.

    Anybody care to chime in?
    The Zins - 10 Boxing
    Xzin, Azin, Bzin, Czin, Dzin
    Xyzin, Ayzin, Byzin, Cyzin, Dyzin
    Magtheridon - US

  2. #2

    Default

    From what I gethered from what yeh wanna do its doable.

    Just use PixelGetColor ,MouseMove and then Click yeh also need to sort out the windows so its always in the same location or some other way like using ImageSearch to find the button.

    There's a ton of other ways but it depends on knowing the app yeh wanna tweak with.

  3. #3

    Default

    Xzin,

    What you are attempting will be possible as long as the keystroke target app does not require DirectInput (most don't).

    AHK comes with Windows Spy. You will use this to attain various properties of the window you are trying to manipulate.

    Start Windows Spy.

    Load the application with the button you wish to press.

    Mouse over the button on the area you wish to click. Refer to Windows Spy and take note of the "In Active Window" co-ordinates. Also take note of the Windows Title (you don't need the class). Activate the button and pay attention to Windows Spy to take note of the colour you wish to AVOID clicking on.

    Windows Title will be referred to as [Windows Title]
    Button Co-ordinates will be referred to as [co-ords] and will be in this format: X, Y
    Colour to AVOID on button will be referred to as [AVOID]

    Your script:

    q::
    {
    curWin := WinExist("A")
    WinActivate [Windows Title]
    MouseMove, [co-ords], 0,
    PixelGetColor, pixColour, [co-ords]
    If (pixColour != [AVOID]) {
    Click
    }
    WinActivate ahk_id %curWin%
    }
    Return


    As usual, I don't have the capabilities to test this while at work. In summary, pressing q (you can change this q to whatever hotkey you like) will get your current window's ID and save it to curWin, then activate the window of which you supplied to title for (to manipulate), move the mouse to the desired co-ords, get the pixel colour beneath the mouse cursor, determine if this cursor colour is different from the one you want to avoid, and then click on that spot if it is NOT the avoid colour. It then reactivates the window you had active before you pressed the Hotkey.

    Good Luck, if this is not what you are looking for, do elaborate.
    "For God's sake, don't stand there at 30 yards trying to cast a spell, he will melt your face period."

    Lokked

Similar Threads

  1. not boxing related but...
    By Simulacra in forum Hardware Tools
    Replies: 2
    Last Post: 07-17-2009, 05:25 AM
  2. I hate pugs. (Hardly related to MB)
    By HPB in forum General WoW Discussion
    Replies: 15
    Last Post: 02-10-2009, 04:19 PM
  3. XP related question
    By Pengster in forum New Multi-Boxers & Support
    Replies: 2
    Last Post: 08-23-2008, 04:52 AM
  4. Mac Users
    By Pact in forum Software Tools
    Replies: 5
    Last Post: 08-15-2008, 10:32 AM
  5. Looking for some help... related to WOWWIKI
    By shivetya in forum General WoW Discussion
    Replies: 9
    Last Post: 10-07-2007, 11:55 AM

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •