매크로

답변 감사 했습니다^^ 다시 한번 해 보니 오토가 제대로 작동 되는것을 확인 하였습니다. ㅎ 


하지만 제가 원하는 부분에서는 클릭이 되지가 않더라구요. 


근데 이상한 점은 비활성화가 아니라 활성화 즉 mouseclick 문을 썼을때는 되는데 비활성화 할때


Postmessage 문을 썼을때는 이동 및 다른것은 다 됩니다. 근데 그 창만 클릭이 되질 않습니다. 


혹시 비활성에도 mouseclick 강제로 2번 클릭 할수 있는 방법이 있습니까?


말이 너무 어중이떠중이가 됐네욤.. 


  • 제발등업좀2 2015.08.15 12:05
    좌표 확인하셨나요??
    포스메세지는 ..마우스클릭과 다른 좌표값을 가지고있습니다 보더값과 캡션값을빼주셔야합니다.
  • 꿈을낚는아이 2015.08.15 14:12
    답변이 늦었습니다. ㅎ 좌표 확인은 다 해 보았으나 안 되었습니다 ㅠㅠ
  • 제발등업좀2 2015.08.15 12:08
    SysGet, capH, 4 ; 캡션Height
    SysGet, bordW, 32 ; 보더Width
    SysGet, bordH, 33 ; 보더Height

    px:=x-bordW/2
    py:=y-bordH/2-capH

    p := px|py<<16

    PostMessage, 0x201, 0, %p%, , %ActiveID%
    PostMessage, 0x202, 0, %p%, , %ActiveID%

    모바게님비활성클릭처럼 값을 빼줘야해요 물론.. 창마다캡션의크기 보더의크기가 다를수도있지만.. 참고만하십시요 ㅎㅎ
  • 리체 2015.08.15 12:20

    px:=x-bordW/2
    py:=y-bordH/2-capH

    자꾸 많은 분들이 이것을 활용하시는데요. 모바게님이 /2 를 넣은 이유는 이미지서치로 찾았을때의 좌표가
    이미지의 좌상이므로 중심부위를 누르게 하기 위해 +포인트 해주는데요, 그 절차를

    보더값을 절반으로 나누어 +해준것처럼 하기 위합니다.(보통 8이니 4를 +한것이라고 봐야합니다.-때로는 보더값이 없을수도 있고 2,3일 경우도 있으므로 사실, 저런 방식은 쓰지 않는편이 좋습니다.)
    그러므로 이미지서치로 얻은 좌표가 아닐때, 정확한 좌표를 클릭할려면 /2는 없애버려야 합니다.

  • 제발등업좀2 2015.08.15 15:10
    ㅎㅎ 넹 .답변 감사합니다 .. 그냥 참고 하시라고 올려놓은거에요 ㅋㅋ
    클릭 할때는 / 는 쓰지않고있습니다 ^_^ ㅎㅎ
  • 꿈을낚는아이 2015.08.15 14:13
    지금 제발등업좀2 님께서 써 주시는것은 비활성 이미지 서치 인것 같습니다만은.. 제가 하고 있는것은 그냥 단순한 클릭반복 입니다..
  • 리체 2015.08.15 12:33

    이동이나 다른것은 되는데 같은 해당창안에서라면 안될리가 없지요

    0x203을 쓰지 말고 0x201, 0x202 를 사용하여 2번 클릭하게 하세요.

    혹시 모르니 controlclick으로도 시도해보세요

  • 꿈을낚는아이 2015.08.15 14:14
    0x201 2번 클릭 하게 해 보았으나 되질 않았습니다.. 혹시 CNN 인가? CCN 인가 이것 때문에 안 되는게 아닌가.. 싶기도 합니다..
  • 리체 2015.08.15 14:27
    스크린샷을 올려봐주세요, 클릭전 화면과 첫번째 클릭후 화면
  • 꿈을낚는아이 2015.08.15 14:30

    리체 님 혹시 실례가 되지 않는다면은 TeamView 로 조금 도움을 구할수 있을까 부탁 드려 보는데 괜찮으시겠습니까?


  • 리체 2015.08.15 14:32
    안됩니다 -_-;;;;
  • 꿈을낚는아이 2015.08.15 14:35
    네네! 그냥 한번 여쭤 본것입니다 ㅎ 이렇게 하시는것 보다 그게 더 나을꺼 같다는 짧은 소견으로 말한것이니 기분이 안 상하셨으면 합니다 ㅎ
  • 리체 2015.08.15 21:47
    혹시, 지금 시간되시면 팀뷰 주실수 있으세요?
  • 꿈을낚는아이 2015.08.15 22:07
    엇? 가능 하신가요?! 이거.. 눈물 날려고 하네요 ㅠㅠ 가능 합니다!
  • 꿈을낚는아이 2015.08.15 22:11
    쪽지 보내 드렸습니다!
  • T7GG 2015.08.15 19:21
    ; 비활성 이미지 클릭
    ; seconds : 시간 지정 (CheckImage 설정에 따름)
    ; fromX , fromY , toX , toY : 이미지 서치 범위 지정
    ; 리턴값 : 1 = 이미지 찾음 , 0 = 이미지 못찾음, -1 = 이미지 파일 없음
    ClickImage(img, seconds=0, fromX=0, fromY=0, toX=0, toY=0) {
        Sleep, 10

        result := CheckImage( img, seconds, x, y, fromX, fromY, toX, toY)
        If (result = 1)
        {
            global ActiveID, DebugMode, WindowCaptionHeight, WindowBorderWidth, WindowBorderHeight

            WinGetPos, winX, winY, winW, winH, % ActiveID

            px:=x-winX-WindowBorderWidth
            py:=y-winY-WindowBorderHeight-WindowCaptionHeight

            p := px|py<<16

            If ( DebugMode = 1)
            {
                ToolTip, 이미지 클릭 %img%, x, y, 10
            }

            PostMessage, 0x201, 0, %p%, , % ActiveID
            PostMessage, 0x202, 0, %p%, , % ActiveID
        }

        Sleep, 200
        Return result
    }

    ; 비활성 좌표 클릭
    ; x, y 좌표를 클릭
    ClickPosition(x, y) {
        global ActiveID, DebugMode, WindowCaptionHeight, WindowBorderWidth, WindowBorderHeight
        Sleep, 10

        px:=x-WindowBorderWidth/2
        py:=y-WindowBorderHeight/2-WindowCaptionHeight

        p := px|py<<16

        PostMessage, 0x201, 0, %p%, , % ActiveID
        PostMessage, 0x202, 0, %p%, , % ActiveID

        If ( DebugMode = 1)
        {
            WinGetPos, winX, winY, winW, winH, % ActiveID
            ToolTip, 좌표클릭, winX+px, winY+py, 10
        }
        Sleep, 200
        Return 1
    }


    ;클릭
    sendClick( x, y) {
        global ActiveID
        WinGetPos, winX, winY, winW, winH, %ActiveID%
        SysGet, capH, 4 ; 캡션Height
        SysGet, bordW, 32 ; 보더Width
        SysGet, bordH, 33 ; 보더Height

        px:=x-winX-bordW
        py:=y-winY-bordH-capH

        p := px|py<<16

        PostMessage, 0x201, 0, %p%, , %ActiveID%
        PostMessage, 0x202, 0, %p%, , %ActiveID%
        Sleep, 200
        Return
    }

    sendClick2( x, y)
    {
        global ActiveID
        SysGet, capH, 4 ; 캡션Height
        SysGet, bordW, 32 ; 보더Width
        SysGet, bordH, 33 ; 보더Height

        px:=x-bordW/2
        py:=y-bordH/2-capH

        p := px|py<<16

        PostMessage, 0x201, 0, %p%, , %ActiveID%
        PostMessage, 0x202, 0, %p%, , %ActiveID%
        Sleep, 200
        Return
    }

    비활성 함수입니다 수정해서 적용해보세요
  • 꿈을낚는아이 2015.08.15 19:41
    답변 감사 합니다. 이부분은 비활성 이미지 서치 입니다만.. 제가 하는건 그냥 좌표로 가서 클릭만 하는 것인데.. 이미지로 했을경우 참고 하겠습니다. ㅎ 감사 합니다
  • T7GG 2015.08.15 19:43
    음 그럼 고정좌표 순차 클릭인건가요?
  • 꿈을낚는아이 2015.08.15 19:46
    네! 고정좌표 순차 클릭 입니다.

    16진수가 잘못 된건지.. 잘 모르겠네욤..
  • T7GG 2015.08.15 19:45

    질문이 좀 이상한가요 ㅎㅎ?

    a,b,c,d,e 좌표를 순서대로 더블클릭만 하면되나요? 특정 이벤트 발생없이요?

  • 꿈을낚는아이 2015.08.15 19:49
    특정 이벤트 라는게 뭘 말씀 하시는것이죠? 그냥 좌표를 순서대로 더블 클릭만 하면 됩니다..

    좌표로 이동 한다 더블 클릭 한다 그래서 여기 이 글 말고 다른글 보시면은 소스를 올려 놨습니다만은

    되질 않습니다. 제가 볼때 문제점이 마우스를 움직이지 않고 마우스를 클릭을 하면 해당 좌표를 클릭 하는게

    아니라 엉뚱한 좌표를 클릭 하고 다시 제가 설정해 놓은 좌표로 돌아 가더라구요

    이게 글로만 쓸려고 하니깐 한정이 있네요..
  • T7GG 2015.08.15 19:55
    아래 스크립트 전체 복사하셔서 스크립트 새로 만드신다음 붙여 넣으시면 매크로 하나가 나올거에요

    대신 비활성이 아니니 연구는 천천이 하시고 임시로 사용하세욤

    아래 스크립튼는 오픈소스구요 어더서 펏는지는 기억안나네요 ㅋㅋ

    F1을 눌르면 녹화시작/녹화종료

    F2을 눌르면 녹화재생/일시정지

    F3을 눌르면 녹화재생 중지

    그리고 SETTING에 보시면 REPEAT 클릭하고 횟수 지정하면 그만큼 반복합니다

    사용방법


    F1을 눌른다 마우스로 원하는 속도로 A,B,C,D,E,F,G 좌료를 더블클릭한다

    F1을 눌러서 녹화를 종료하고 셋팅에서 반복 횟수를 설정 F2눌러서 재생 하고 종료는 F3으로하면됩니다



    ;~ Setting
    Title=Mouse & Key Recorder 1.01
    kenter:=chr(10)
    SetTimer,Control_tip,100
    CoordMode,Mouse,Screen
    SetBatchLines,-1
    #NoEnv
    #SingleInstance,off
    ;~ Tray Menu
    Menu,tray,NoStandard
    Menu,tray,add,Start/Stop Recording,Rec
    Menu,tray,add,Play/Pause,Play
    Menu,tray,add
    menu,tray,add,Show/Hide,Show
    menu,tray,add,Exit,guiclose
    Menu,tray,default,Show/Hide
    Menu,tray,click,1
    ;~ Gui
    Gui +lastfound
    ID:=WinExist()
    Gui,Font,s14 ,Webdings
    ;~ Button: Record,Play,Pause,Mode,Add,Change,Clear All
    Gui, Add, Button, x6 y10 w40 h30 vrec gRec, =
    Gui, Add, Button, x46 y10 w40 h30 gPlay, 4
    Gui, Add, Button, x86 y10 w40 h30 glstop, <
    Gui, Add, button, x126 y10 w40 h30 gMin vMin, 7
    Gui, Add, Button, x6 y270 w40 h30 gAdd, 5
    Gui, Add, Button, x46 y270 w40 h30 gChange, q
    Gui, Add, Button, x86 y270 w40 h30 gRemove, r
    Gui, Add, button, x126 y270 w40 h30 gClearAll, x
    Gui, Add, Button, x176 y10 w40 h30 gsav, I
    Gui, Add, Button, x216 y10 w40 h30 gope, ¤
    Gui, Add, Button, x176 y270 w40 h30 goptimize, ~
    Gui, Add, Button, x216 y270 w40 h30 gAbout, ?

    Gui,Font
    Gui, Font, CC0C0C0 ,
    Gui,color,5D69BA,FFFFFF
    Gui, Add, ListView, x6 y50 w250 h210 +NoSortHdr -LV0x10 vListview, No|Type|Info

    ;~ Hotkey
    Gui, Add, groupbox, x266 y170 w180 h130 , Hotkey
    Gui, Add, Hotkey, x346 y190 w55 h20 vhrec, F1
    Gui, Add, Hotkey, x346 y210 w55 h20 vhplay, F2
    Gui, Add, Hotkey, x346 y230 w55 h20 vhbreak, F3
    Gui, Add, Hotkey, x346 y250 w55 h20 vhclear, F4
    Gui, Add, Text, x276 y190 w70 h20, Record/Stop
    Gui, Add, Text, x276 y210 w70 h20, Play/Pause
    Gui, Add, Text, x276 y230 w70 h20, Stop Play
    Gui, Add, Text, x276 y250 w70 h20, Clear Data
    Gui, Add, Button, x401 y190 w30 h80, SET

    Gui, Add, groupbox, x266 y20 w180 h150 , Setting
    Gui, Add, checkbox, x276 y40 w160 h20 vAuto_hide gAuto_hide -Checked, Auto hide
    Gui, Add, Checkbox, x276 y60 w160 h20 vclear gclear, Clear data before recording
    Gui, Add, CheckBox, x276 y80 w160 h20 gAuto_optimize vAuto_optimize +Checked, Auto optimize
    Gui, Add, CheckBox, x276 y100 w70 h20 gRepeat vRepeat, Repeat
    Gui, Add, Edit, x346 y100 w46 h20 +Number vrepn +Disabled c5D69BA,
    Gui, Add, UpDown, x370 y100 w18 h20 Range1-999999,
    Gui, Add, CheckBox, x276 y120 w150 h20 vMid_button gMid_button, Mid-button replace by text
    Gui, Add, Edit, x276 y140 w120 h20 +Disabled vmmt c5D69BA vMid1,
    Gui, Add, Button, x386 y140 w30 h20 +Disabled vMid3, ...

    Gui, Add, StatusBar, x346 y330 w30 h20 , Current line: 0
    Gui, Show, h335 w455, %Title%

    ;~ Gui2: Add/Change keys or mouse moves
    Gui, 2:+owner1
    Gui,2: Font, CC0C0C0 ,
    Gui,2: color,5D69BA,FFFFFF

    Gui,2: Add, Radio, x6 y10 w180 h20 vR_Key gchange2, Keys
    Gui,2: Add, Radio, x6 y70 w180 h20 vR_Mouse gchange2 +Checked, Mouse Move

    Gui,2: Add, GroupBox, x6 y30 w180 h40 +Disabled,
    Gui,2: Add, Text, x16 y40 w30 h20, Keys:
    Gui,2: Add, Edit, x46 y40 w90 h20 vK1 +Disabled,
    ;~ Gui,2: Add, Button, x146 y40 w30 h20 +Disabled vGet_key2, <<

    Gui,2: Add, GroupBox, x6 y90 w180 h90 ,
    Gui,2: Add, Text, x16 y100 w70 h20, Coord Mouse:
    Gui,2: Add, Text, x16 y120 w10 h20, X:
    Gui,2: Add, Edit, x26 y120 w50 h20 vM2 +Number, 0
    Gui,2: Add, Text, x76 y120 w10 h20, Y:
    Gui,2: Add, Edit, x86 y120 w50 h20 vM3 +Number, 0
    Gui,2: Add, Text, x146 y120 w30 h20 vGet_mouse2 gGet_mouse cRed, <<
    Gui,2: Add, Text, x16 y150 w80 h20, Mouse Button:
    Gui,2: Add, DropDownList, x96 y150 w70 h20 +R4 vM1, <None>||Left|Right|Mid
    Gui,2: Add, Button, x26 y190 w50 h30, OK
    Gui,2: Add, Button, x96 y190 w50 h30, Cancel

    Gui,2: +lastfound +ToolWindow
    ID2:=WinExist()
    gosub,ButtonSet
    Return
    Rec:
    if Recording ;Stop recording
    goto,Stop_record
    if Playing ;Ignore if Playing
    Return
    Gui_hide=0
    Gosub,Show
    if clear ;Clear data before recording
    LV_Delete()
    TrayTip,%Title%,Recording...,,1
    SetTimer,tip,300
    SetTimer,Get_mouse_pos,1 ;Record Mouse
    SetTimer,Get_key,1 ;Record Key
    GuiControl,,rec,< ;Change Record Button
    Recording=1
    Return
    Stop_record:
    Recording=0
    SetTimer,Get_mouse_pos,off
    SetTimer,Get_key,Off
    Remove_mouse_moves() ;optimize data
    if Auto_optimize
    Gosub optimize
    GuiControl,,rec,=
    guicontrolget,Auto_hide,,Auto_hide
    if not Auto_hide
    Gosub,show
    TrayTip,%Title%,Stopping Recording...,,1
    SetTimer,tip,500

    Return
    Pause_loop:
    SetTimer,Pause_loop,Off
    If Playing
    {
    lpause=1
    Return
    }
    Return
    Play:
    If Recording ;Ignore if Recording
    Return
    Else If Playing
    {
    SetTimer,Pause_loop,on
    Return
    }
    Else SetTimer,Playing,on
    Return
    Playing:
    SetTimer,Playing,Off
    Gui_hide=0
    Gosub,Show
    Playing=1
    lstop=0 ;Loop_stop=off
    lpause=0 ;Loop_pause=off
    If Mid_button ;Replace Mid Button by text
    GuiControlGet,Sfile,,Mid1
    TrayTip,%Title%,Playing...,,1
    SetTimer,tip,500
    BlockInput,MouseMove
    If Pausing
    {
    Pausing=0
    Goto,resume
    }
    Count_repeat=1
    loop:
    Start_line=1 ;For Mid Button Replace by text
    Count=0
    resume:
    loop,% LV_GetCount()
    {
    if lstop
    Break
    If lpause
    {
    Pausing=1
    Break
    }
    Count++
    LV_GetText(Temp,Count,2)
    LV_GetText(Temp2,Count,3)
    If !Temp
    Break
    if Temp=Key ;Key
    {
    Send %Temp2%
    Continue
    }
    StringSplit,pos,Temp2 ,%A_Space% ;Mouse click down
    Mousemove,pos1,pos2,0
    if pos3 && Not waitup3 ;Left Mouse Button
    {
    MouseClick,Left,pos1,pos2,,0,D
    waitup3=1
    SetTimer,Left,1
    }
    if pos4 && Not waitup4 ;Right Mouse Button
    {
    MouseClick,right,pos1,pos2,,0,D
    waitup4=1
    SetTimer,Right,1
    }
    if pos5 && Not waitup5 ;Mid Mouse Button
    {
    if Mid_button
    Gosub Mid_text
    Else
    MouseClick,Middle,pos1,pos2,,0,D
    waitup5=1
    SetTimer,Mid,1
    }
    SB_SetText("Current line: " Count)
    }
    If !Pausing && !lstop
    if Repeat
    {
    GuiControlGet,repn,,repn
    if Count_repeat>=%repn%
    Goto,out
    Count_repeat++
    Goto,loop
    }
    out:
    BlockInput,MouseMoveOff
    Playing=0
    lstop=0
    lpause=0
    TrayTip,%Title%,Stopping Playing...,,1
    SetTimer,tip,700
    if not Auto_hide
    Gosub,show
    Return
    ;~ MouseClick up:
    Left:
    if pos3
    Return
    waitup3:=0
    MouseClick,Left,pos1,pos2,,0,U
    SetTimer,Left,Off
    Return
    Right:
    if pos4
    Return
    waitup4:=0
    MouseClick,right,pos1,pos2,,0,U
    SetTimer,Right,Off
    Return
    Mid:
    if pos5
    Return
    waitup5:=0
    MouseClick,m,pos1,pos2,,0,U
    SetTimer,Mid,Off
    Return

    ;-----------------------

    Get_mouse_pos:
    LButton:=GetKeyState("LButton","P")
    RButton:=GetKeyState("RButton","P")
    MButton:=GetKeyState("MButton","P")
    MouseGetPos,x1,y1,win,con,1
    if win=%ID%
    {
    LButton=0
    MButton=0
    RButton=0
    }
    LV_Add("","","Mouse",x1 A_space y1 A_space LButton A_space RButton A_space MButton A_space WheelUp A_space WheelDown)
    Return

    ;-----------------------

    Get_key:
    Input,C_Key,I V L1 M,{BS}{%hrec%}{%hplay%}{%hbreak%}
    If ErrorLevel Contains EndKey
    If ErrorLevel=EndKey:Backspace
    C_Key={BS}
    Else Return
    if C_Key=%kenter%
    C_Key={Enter}
    if C_Key=%A_space%
    C_Key={Space}
    LV_Add("","","Key",C_Key)
    Return

    ;it will remove all the same mouse moves between 2 keys that make the sript slow down
    Remove_mouse_moves()
    {
    Check=0
    ok=0
    Count=0
    Loop,% LV_GetCount()
    {
    Count++
    LV_GetText(Type,Count,2)
    If Type=Key
    {
    If Check=1
    If !ok
    {
    Loop % Last-First+1
    LV_Delete(First)
    Count:=First
    }
    First:=Count+1
    LV_GetText(Line1,First,3)
    Last=
    Check=1
    ok=0
    Continue
    }
    If Check=1
    {
    LV_GetText(Line2,Count,3)
    If Line2=
    Break
    If Line1=%Line2%
    Last:=Count
    Else ok=1
    }
    }
    Sort_list()
    }
    Return
    Sort_list()
    {
    Loop,% LV_GetCount()
    LV_Modify(A_Index,"",A_Index)
    }
    Return
    Add:
    Status=Add
    Gui,1: +Disabled
    Gui,2: Show,h233 w193,Add
    If !LV_GetNext()
    Row:=LV_GetCount()+1
    Else
    Row:=LV_GetNext()+1
    Return
    Change:
    Status=Change
    Row:=LV_GetNext()
    If !Row
    Return
    LV_GetText(Temp2,Row,2)
    LV_GetText(Temp3,Row,3)
    If Temp2=Key
    {
    GuiControl,2:,R_Key,1
    GuiControl,2:,K1,%Temp3%
    }
    Else
    {
    GuiControl,2:,R_Mouse,1
    StringSplit,Temp,Temp3,%A_space%
    GuiControl,2:,M2,%Temp1%
    GuiControl,2:,M3,%Temp2%
    If !Temp3
    GuiControl,2: Choose,M1,1
    Else
    GuiControl,2: Choose,M1,2
    If Temp4
    GuiControl,2: Choose,M1,3
    If Temp5
    GuiControl,2: Choose,M1,4
    }
    Gosub,change2
    Gui,2: Show,h233 w193, Change
    Gui,+disabled
    Return
    Remove:
    If !LV_GetNext()
    Return
    TrayTip,%Title%,Removed!,,1
    SetTimer,Tip,500
    Loop % LV_GetCount("S")
    LV_Delete(LV_GetNext())
    Sort_list()
    Return
    change2: ;Change some controls state
    GuiControlGet,Temp,2:,R_Key
    GuiControl,2: Enable%Temp%,K1
    ;~ GuiControl,2: Enable%Temp%,Get_key2
    GuiControl,2: Disable%Temp%,M1
    GuiControl,2: Disable%Temp%,M2
    GuiControl,2: Disable%Temp%,M3
    GuiControl,2: Disable%Temp%,Get_mouse2
    Return
    Min:
    If !Min_mode
    {
    GuiControl,,Min,8
    Min_mode:=!Min_mode
    Gui,Show,h70 w260
    Return
    }
    GuiControl,,Min,7
    Min_mode:=!Min_mode
    Gui,Show, h335 w455
    Return
    2ButtonOK:
    Gui,2: submit,NoHide
    If R_Key
    {
    If K1=
    {
    MsgBox,48,Error!,Empty keys!
    Return
    }
    }
    Else If M2="" || M3=""
    {
    MsgBox,48,Error!,Empty Field(s)!
    Return
    }
    If M1=<None>
    M1=0 0 0
    Else If M1=Left
    M1=1 0 0
    Else If M1=Right
    M1=0 1 0
    Else If M1=Mid
    M1=0 0 1
    Gui,1: Default
    If Status=Change
    If R_Key
    LV_Modify(Row,"","","Key",K1)
    Else
    LV_Modify(Row,"","","Mouse",M2 A_Space M3 A_Space M1)

    If Status=Add
    If R_Key
    LV_Insert(Row,"","","Key",K1)
    Else
    LV_Insert(Row,"","","Mouse",M2 A_Space M3 A_Space M1)
    Sort_list()
    2GuiClose:
    2ButtonCancel:
    Gui, 1:-Disabled
    Gui,2: Hide
    Return

    ;~ Created by ___x@___
    Control_tip:
    MouseGetPos,,,Win,Control,1
    ;~ TrayTip,,% Win " " ID " " ID2 " " Control
    If Win=%ID%
    {
    If Control=%Control_old%
    Return
    Else If Control=Button1
    ToolTip,Start/Stop Record
    Else If Control=Button2
    ToolTip,Play/Pause
    Else If Control=Button3
    ToolTip,Stop Play
    Else If Control=Button4
    ToolTip,Min/Normal Mode
    Else If Control=Button5
    ToolTip,Add a mouse move or keys
    Else If Control=Button6
    ToolTip,Change
    Else If Control=Button7
    ToolTip,Remove
    Else If Control=Button8
    ToolTip,Remove all
    Else If Control=Button9
    ToolTip,Save
    Else If Control=Button10
    ToolTip,Load
    Else If Control=Button11
    ToolTip,Optimize
    Else If Control=Button12
    ToolTip,Export to AHK file
    Else ToolTip
    }
    Else If Win=%ID2%
    {
    If Control=%Control_old%
    Return
    ;~ Else If Control=Button3
    ;~ ToolTip,More Keys
    Else If Control=Static5
    ToolTip,Click and Drag to get the coord mouse.
    Else ToolTip
    }
    Else ToolTip
    Control_old:=Control
    Return
    Button...:
    Gui +OwnDialogs
    Last_line=0
    FileSelectFile,Temp,,,,Text file(*.txt)
    If Temp=
    Return
    Loop,Read,%Temp%
    Last_line:=A_Index
    If !Last_line
    {
    MsgBox,48,ERROR!,Can't read the text file.
    Return
    }
    Return
    Mid_text:
    FileReadLine,Temp,%Sfile%,%Start_line%
    Send {Raw}%Temp%
    Start_line++
    If Start_line>%Last_line%
    Start_line=1
    Return
    Mid_button:
    GuiControlGet,Mid_button,,Mid_button
    GuiControl,Enable%Mid_button%,Mid3
    Return
    GuiClose:
    DllCall("AnimateWindow","UInt",ID,"Int",300,"UInt","0x90000")
    BlockInput,MouseMoveOff ; Just in case have some problem
    ExitApp
    Return
    Auto_optimize:
    GuiControlGet,Auto_optimize,,Auto_optimize
    Return
    optimize:
    Count=0
    Loop,% LV_GetCount()-1
    {
    Count++
    LV_GetText(Line1a,Count,2)
    LV_GetText(Line1b,Count,3)
    LV_GetText(Line2a,Count+1,2)
    LV_GetText(Line2b,Count+1,3)
    if (line1a=line2a) && (line1b=line2b) && (line1a<>"Key")
    {
    LV_Delete(Count)
    Count--
    }
    }
    Sort_list()
    Return
    Repeat:
    GuiControlGet,Repeat,,Repeat
    if Repeat
    GuiControl,enable,repn
    Else GuiControl,enable0,repn
    Return
    tip:
    SetTimer,tip,Off
    TrayTip
    Return
    Return
    show:
    If Gui_hide
    {
    gui,show
    Gui_hide=0
    Return
    }
    gui,hide
    Gui_hide=1
    Return
    clear:
    GuiControlGet,clear,,clear
    Return
    ButtonSet:
    GuiControlGet,hrec,,hrec
    GuiControlGet,hplay,,hplay
    GuiControlGet,hbreak,,hbreak
    GuiControlGet,hclear,,hclear

    Hotkey,%hrec_old%,Rec,off UseErrorLevel
    Hotkey,%hrec%,Rec,on UseErrorLevel
    hrec_old:=hrec

    Hotkey,%hplay_old%,Play,off UseErrorLevel
    Hotkey,%hplay%,Play,on UseErrorLevel
    hplay_old:=hplay

    Hotkey,%hbreak_old%,lstop,off UseErrorLevel
    Hotkey,%hbreak%,lstop,on UseErrorLevel
    hbreak_old:=hbreak

    Hotkey,%hclear_old%,ClearAll,off UseErrorLevel
    Hotkey,%hclear%,ClearAll,on UseErrorLevel
    hclear_old:=hclear

    Return
    lstop:
    lstop=1
    Pausing=0
    Return
    Auto_hide:
    GuiControlGet,Auto_hide,,Auto_hide
    Return
    ope:
    gui +OwnDialogs
    FileSelectFile,file,,%root%,Open,Mouse Record File(*.mrc)
    if file=
    Return
    SplitPath,file,,root,ext
    if ext<>mrc
    Return
    Loop,Read,%file%
    {
    StringSplit,Temp,A_loopReadLine,|
    LV_Add("",Temp1,Temp2,Temp3)
    }
    Gosub,Stop_record
    Return
    sav:
    If !LV_GetCount()
    {
    MsgBox,48,Error!,Nothing to save!
    Return
    }
    gui +OwnDialogs
    FileSelectFile,file,S16,%root%,Save,Mouse Record File(*.mrc)
    if !file
    Return
    FileDelete,%file%
    SplitPath,file,,root,,file
    Loop % LV_GetCount()
    {
    LV_GetText(Temp,A_Index,1)
    LV_GetText(Temp2,A_Index,2)
    LV_GetText(Temp3,A_Index,3)
    FileAppend,% Temp "|" Temp2 "|" Temp3 "`n",%root%\%file%.mrc
    }
    Return
    ClearAll:
    LV_Delete()
    TrayTip,%Title%,Removed all !,,1
    SetTimer,Tip,500
    Return
    Get_mouse:
    SetTimer,pos,10
    Return

    pos:
    Temp:=GetKeyState("LButton",P)
    If !Temp
    {
    GuiControl,2:,M2,%xp%
    GuiControl,2:,M3,%yp%
    SetTimer,pos,Off
    ToolTip
    }
    MouseGetPos,xp,yp
    ToolTip,x: %xp% `n y: %yp%
    Return
    GuiSize:
    if A_EventInfo=1
    Gui,hide
    Return
    About:
    SaveAHK:
    If !LV_GetCount()
    {
    MsgBox,48,Error!,Nothing to Export!
    Return
    }
    gui +OwnDialogs
    FileSelectFile,file,S16,%root%,Save,Autohotkey File(*.ahk)
    if !file
    Return
    FileDelete,%file%
    SplitPath,file,,root,,file
    FileAppend,SetBatchLines`,-1`nCoordMode`,Mouse`,Screen`n,%root%\%file%.ahk
    Loop % LV_GetCount()
    {
    LV_GetText(Temp,A_Index,2)
    LV_GetText(Temp2,A_Index,3)
    If Temp=Key
    {
    FileAppend,% "Send," Temp2 "`n",%root%\%file%.ahk
    Continue
    }
    StringSplit,pos,Temp2 ,%A_Space% ;Mouse click down
    FileAppend,% "Mousemove," pos1 "," pos2 ",0 `n",%root%\%file%.ahk
    if pos3 && Not waitup3
    {
    FileAppend,% "MouseClick,Left," pos1 "," pos2 ",,0,D `n",%root%\%file%.ahk
    waitup3=1
    }
    if !pos3 && waitup3
    {
    FileAppend,% "MouseClick,Left," pos1 "," pos2 ",,0,U `n",%root%\%file%.ahk
    waitup3=0
    }
    if pos4 && Not waitup4 ;Right Mouse Button
    {
    FileAppend,% "MouseClick,Right," pos1 "," pos2 ",,0,D `n",%root%\%file%.ahk
    waitup4=1
    }
    if !pos4 && waitup4
    {
    FileAppend,% "MouseClick,Right," pos1 "," pos2 ",,0,U `n",%root%\%file%.ahk
    waitup4=0
    }
    if pos5 && Not waitup5 ;Mid Mouse Button
    {
    FileAppend,% "MouseClick,Middle," pos1 "," pos2 ",,0,D `n",%root%\%file%.ahk
    waitup5=1
    }
    if !pos5 && waitup5
    {
    FileAppend,% "MouseClick,Middle," pos1 "," pos2 ",,0,U `n",%root%\%file%.ahk
    waitup5=0
    }
    }

    Return
  • 꿈을낚는아이 2015.08.15 20:00
    신경 써 주셔서 감사 합니다. ㅎ 뭐라고 해야 되지.. 똑같은 소스로 활성화시킨것은 벌써 쓰고 있습니다만은 비활성화로 한번 만들어 보고자 하는데 비활성화는 되긴 되는데 마우스 클릭이 안 되서 난감 한것 뿐입니당.. 머리가 너무 아프네욤 ㅎㅎ

List of Articles
분류 제목 글쓴이 최근변경 추천
질문 자동 들여쓰기 질문 2 토스트 2015.08.23 0/0
질문 매크로 시간추가하기 질문 4 안녕222 2015.08.20 0/0
자유 옛날에 제작한 메이플 매크로 스크립트 8 암드래 2019.02.13 2/0
질문 [해결]녹스앱플 설정 및 이미지서치 ㅠ 6 T7GG 2015.08.19 0/0
질문 Gui DropDownList 초기화 방법 문의. 3 솜주먹 2015.08.19 0/0
질문 오토핫키에 빠삭한분들 부탁드리겠습니다. 8 뚜르따르또르 2015.08.23 0/0
질문 [해결]녹스앱플 오핫 이미지 서치 질문입니다 27 T7GG 2015.09.22 0/0
질문 ㅠㅠ 웃긴일이발생했ㅅ브니다!! 4 뚜르따르또르 2015.08.18 0/0
질문 오토핫키 컴파일 질문드립니다. 이리와 2015.08.18 0/0
자유 출장중이라 자주 들리지 못하네요. 10 외치기 2015.09.01 1/0
질문 매클초보입니다 질문있어요! (블텍+핸콕님매클) 4 롤로로로라 2016.01.01 0/0
질문 오토핫키 좀 배우고 싶은데..괜찮은 초보자용 가이드 ... 5 농부김씨 2015.09.10 0/0
질문 adb로 땡겨온 이미지가 이상해요 한번 봐주세요 ㅠㅠ 11 제발등업좀2 2015.08.19 0/0
질문 gosub을 2개 더 추가 시켰을뿐인데 왜 start 한번 클릭... 8 꿈을낚는아이 2015.08.22 0/0
질문 이미지서치 질문드립니다 2 나날이나날이 2015.08.17 0/0
질문 구이내에 있는 가가라이브 채팅을 가져올수있을까요? 3 _Crash 2015.08.29 0/0
자유 바쁘신데도 불구 하고 시간 내 주신 리체님! 정말 감사... 2 꿈을낚는아이 2015.08.16 0/0
질문 안되는 이유를 찾은것 같습니다. 근데 해결책을 모르겠... 12 꿈을낚는아이 2015.09.01 0/0
질문 Gdip_ImageSearch관련 하여 질문드립니다. 2 제발등업좀2 2015.08.16 0/0
질문 버튼 실행으로 잘 되는데 키실행으로 하면 정상적으로 ... 2 fnwj 2015.08.15 0/0
Board Pagination Prev 1 ... 148149150151152153154155156 ... 209 Next
/ 209

전체 최신 인기글

전체 주간 인기글