для моих целей это шедевр но не могу допилить сюда движение
$h1 =HGET(1000,900) // hwnd окна источника
$h2 = HGET(1000,600)
$h3 = HGET(1000,300)
$h4 = HGET(1000,100)
SUB(_klik,$set)
WNDGETINFO($h1, $posx1, $posy1, $sizx1, $sizy1)
WNDGETINFO($h2, $posx2, $posy2, $sizx2, $sizy2)
WNDGETINFO($h3, $posx3, $posy3, $sizx3, $sizy3)
WNDGETINFO($h4, $posx4, $posy4, $sizx4, $sizy4)
$sx = $_xmouse
$sy = $_ymouse
SWITCH($set)
CASE(1)
LCLICK(($_xmouse-$posx1)+$posx2,($_ymouse-$posy1)+$posy2)
WAITMS(10)
LCLICK(($_xmouse-$posx2)+$posx3,($_ymouse-$posy2)+$posy3)
WAITMS(10)
LCLICK(($_xmouse-$posx3)+$posx4,($_ymouse-$posy3)+$posy4)
WAITMS(10)
END_SWITCH
MOVE($sx,$sy)
END_SUB
WHILE(1)
IF(ISKEYDOWN(1)=1)
WHILE(ISKEYDOWN(1)=1)
WAITMS(10)
END_CYC
_klik(1)
ELSE
WAITMS(10)
END_IF
END_CYC
вот так прописываю дублирование.припопытке добавить
SUB(A_KEYDOWN, $A_key, $A_hwnd)
postmessage($A_hwnd,0x0100,$A_key,0)
END_SUB
SUB(A_KEYUP, $A_key, $A_hwnd)
postmessage($A_hwnd,0x0101,$A_key,0)
END_SUB
SUB(A_LCLICK, $A_x, $A_y, $A_hwnd)
postmessage($A_hwnd,0x0201,0x0001,$A_x+($A_y*65536))
waitms($A_press_delay)
postmessage($A_hwnd,0x0202,0x0001,$A_x+($A_y*65536))
END_SUB
SUB(A_LUP, $A_x, $A_y, $A_hwnd)
postmessage($A_hwnd,0x0202,0x0001,$A_x+($A_y*65536))
END_SUB
$h1 =HGET(600,800) // hwnd окна источника
$h2 = HGET(1000,800)
$h3 = HGET(1000,600)
$h4 = HGET(1000,300)
IF(ISKEYDOWN(#DOWN))
WAITMS(30)
A_KEYDOWN(#S,$h1)
WAITMS(30)
A_KEYDOWN(#S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S(50)
ELSE
WAITMS(25)
END_IF
выдает ошибку.дублирование работает а движения нет . подскажите пожалуйста как обьединить эти два скрипта
$h1 =HGET(1000,900) // hwnd окна источника
$h2 = HGET(400,600)
$h3 = HGET(400,300)
$h4 = HGET(400,100)
$h5 = HGET(700,900)
$h6 = HGET(700,600)
$h7 = HGET(700,300)
$h8 = HGET(700,100)
$h9 = HGET(400,900)
$h10 = HGET(1000,600)
$h11 = HGET(1000,300)
$h12 = HGET(1000,100) // hwnd окна получателя
SUB(A_KEYDOWN, $A_key, $A_hwnd)
postmessage($A_hwnd,0x0100,$A_key,0)
END_SUB
SUB(A_KEYUP, $A_key, $A_hwnd)
postmessage($A_hwnd,0x0101,$A_key,0)
END_SUB
SUB(_klik,$set)
WNDGETINFO($h1, $posx1, $posy1, $sizx1, $sizy1)
WNDGETINFO($h2, $posx2, $posy2, $sizx2, $sizy2)
WNDGETINFO($h3, $posx3, $posy3, $sizx3, $sizy3)
WNDGETINFO($h4, $posx4, $posy4, $sizx4, $sizy4)
WNDGETINFO($h5, $posx5, $posy5, $sizx5, $sizy5)
WNDGETINFO($h6, $posx6, $posy6, $sizx6, $sizy6)
WNDGETINFO($h7, $posx7, $posy7, $sizx7, $sizy7)
WNDGETINFO($h8, $posx8, $posy8, $sizx8, $sizy8)
WNDGETINFO($h9, $posx9, $posy9, $sizx9, $sizy9)
WNDGETINFO($h10, $posx10, $posy10, $sizx10, $sizy10)
WNDGETINFO($h11, $posx11, $posy11, $sizx11, $sizy11)
WNDGETINFO($h12, $posx12, $posy12, $sizx12, $sizy12)
WNDGETINFO($h13, $posx13, $posy13, $sizx13, $sizy13)
WNDGETINFO($h14, $posx14, $posy14, $sizx14, $sizy14)
WNDGETINFO($h15, $posx15, $posy15, $sizx15, $sizy15)
WNDGETINFO($h16, $posx16, $posy16, $sizx16, $sizy16)
$sx = $_xmouse
$sy = $_ymouse
SWITCH($set)
CASE(1)
LCLICK(($_xmouse-$posx1)+$posx2,($_ymouse-$posy1)+$posy2)
WAITMS(30)
LCLICK(($_xmouse-$posx2)+$posx3,($_ymouse-$posy2)+$posy3)
WAITMS(30)
LCLICK(($_xmouse-$posx3)+$posx4,($_ymouse-$posy3)+$posy4)
WAITMS(30)
LCLICK(($_xmouse-$posx4)+$posx5,($_ymouse-$posy4)+$posy5)
WAITMS(30)
LCLICK(($_xmouse-$posx5)+$posx6,($_ymouse-$posy5)+$posy6)
WAITMS(30)
LCLICK(($_xmouse-$posx6)+$posx7,($_ymouse-$posy6)+$posy7)
WAITMS(30)
LCLICK(($_xmouse-$posx7)+$posx8,($_ymouse-$posy7)+$posy8)
WAITMS(30)
LCLICK(($_xmouse-$posx8)+$posx9,($_ymouse-$posy8)+$posy9)
WAITMS(30)
LCLICK(($_xmouse-$posx9)+$posx10,($_ymouse-$posy9)+$posy10)
WAITMS(30)
LCLICK(($_xmouse-$posx10)+$posx11,($_ymouse-$posy10)+$posy11)
WAITMS(30)
LCLICK(($_xmouse-$posx11)+$posx12,($_ymouse-$posy11)+$posy12)
CASE(2)
A_KEYDOWN(#S,$h1)
WAITMS(30)
A_KEYDOWN(#S,$h2)
WAITMS(30)
A_KEYDOWN(#S,$h3)
WAITMS(30)
A_KEYDOWN(#S,$h4)
WAITMS(30)
A_KEYDOWN(#S,$h5)
WAITMS(30)
A_KEYDOWN(#S,$h6)
WAITMS(30)
A_KEYDOWN(#S,$h7)
WAITMS(30)
A_KEYDOWN(#S,$h8)
WAITMS(30)
A_KEYDOWN(#S,$h9)
WAITMS(30)
A_KEYDOWN(#S,$h10)
WAITMS(30)
A_KEYDOWN(#S,$h11)
WAITMS(30)
A_KEYDOWN(#S,$h12)
CASE(3)
A_KEYDOWN(#W,$h1)
WAITMS(30)
A_KEYDOWN(#W,$h2)
WAITMS(30)
A_KEYDOWN(#W,$h3)
WAITMS(30)
A_KEYDOWN(#W,$h4)
WAITMS(30)
A_KEYDOWN(#W,$h5)
WAITMS(30)
A_KEYDOWN(#W,$h6)
WAITMS(30)
A_KEYDOWN(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klik(3)
ELSE
IF(ISKEYDOWN(#RIGHT)=1)
WHILE(ISKEYDOWN(#RIGHT)=1)
WAITMS(30)
END_CYC
_klik(4)
ELSE
IF(ISKEYDOWN(#LEFT)=1)
WHILE(ISKEYDOWN(#LEFT)=1)
WAITMS(30)
END_CYC
_klik(5)
ELSE
WAITMS(30)
END_IF
END_IF
END_IF
END_IF
END_IF
END_CYC
вот так пытался обьединить но движение не работает