Close
Showing results 1 to 10 of 10

Threaded View

  1. #9

    Default

    IF your controlclick works please help me to get it work!
    I can't for the life of it get control click to work at all.

    Currently using Mousemove method in my script. It works from the main window with all resolutions. All boxes must be visible since I can't get controlclick to work. Note if your controlclick actually sends the command to other windows could you post your script so I can test if it works for me? Thx


    Code:
    esc::
    KeyWait, esc, D
    WinGet, WowWinId, List, World of Warcraft
    coordmode, mouse, relative
    MouseGetPos, x, y
    WinGetPos, winX1, winY1, winWidth1, winHeight1, ahk_id %WowWinId1%
    Xratio:= x/winWidth1
    Yratio:= y/winHeight1
    ;msgbox,Xratio:%Xratio%   Yratio:%Yratio%`n`x:%x%        y:%y% `n` winWidth1:%winWidth1% winWidth1%winWidth1%
    WinGet, Active_Window, ID, A
    Loop, %WowWinId%
    {
        target_window := WowWinId%A_index%
        ;IFWinActive, ahk_id %target_window%
        {
            Loop, %WowWinId%
            {
                target_window := WowWinId%A_index%
                ;           window loc                     |    Frame width/height
                ;                |                        |            |
                ;                v                        |            v
                WinGetPos, winX%A_index%, winY%A_index%, winWidth%A_index%, winHeight%A_index%, ahk_id %target_window%
            }
            ;MsgBox,  x:%x%`n` y:%y%`n` Xratio:%Xratio%`n `Yratio:%Yratio%`n` winX1:%winX1% winY1:%winY1%`n` winX2:%winX2% winY2:%winY2%`n` winX3:%winX3% winY3:%winY3%`n` winX4:%winX4% winY4:%winY4%`n` winX5:%winX5% winY5:%winY5%`n` winX6:%winX6% winY6:%winY6%`n` winX7:%winX7% winY7:%winY7%`n` winX8:%winX8% winY8:%winY8%`n` winX9:%winX9% winY9:%winY9%`n` winX10:%winX10% winY10:%winY10%
        }
        x_click:=winX%A_index%+Xratio*winWidth%A_index%                ;Calculate x location on the screen
        y_click:=winY%A_index%+Yratio*winHeight%A_index%            ; -||- y
        ;relative_x:=Xratio*winWidth%A_index%                        ;Calculate x location on the currently open window
        ;relative_y:=Yratio*winHeight%A_index%                        ; -||- y
        SetControlDelay,-1
        SetMouseDelay, 1
        SetDefaultMouseSpeed, 10             ;Values 0-100
        coordmode, mouse, screen
        mousemove,%x_click%,%y_click%
        sleep 200
        ;coordmode, mouse, relative
        ;ControlClick, %relative_x% %relative_y%, ahk_id %target_window%,, LEFT, 1, NA
        ;MsgBox, winX%A_index% winY%A_index% `n`winWidth%A_index% winHeight%A_index%`n`x_click:%x_click% y_click%y_click% `n`Xratio%Xratio%   Yratio%Yratio%
    }
    Return

    NOTE: This is not a final version, but a slow version so I can debug it more easily.

    EDIT: couldnt get it to work reliably. im gonna use macros or HKN
    Last edited by aasi888 : 09-18-2012 at 12:14 PM

Posting Rules

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