1

Тема: AHK:Прерывание работы скрипта при нажатии Shift

Доброго времени суток. При нажатии Shift работа скрипта прерывается , хотя горячих клавиш на Shift не стоит .Помогите разобраться.

#SingleInstance force
#NoEnv
#Persistent
#NoTrayIcon
SetBatchLines, -1



Gui, Color, B0C4DE
gui, font, cBlue s10
Gui, Font, underline
Gui, Add, Text,, Прицел  <Вниз> <Вверх> 
Gui, Font, norm
Gui, Add, DropDownList, vMouseMove gDropDownList w100,0||1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|42|44|45|46|47|48|49|50|-1|-2|-3|-4|-5|-6|-7|-8|-9|-10|-11|-12|-13|-14|-15|-16|-17|-18|-19|-20|-21|-22|-23|-24|-25|-26|-27|-28|-29|-30|-31|-32|-33|-34|-35|-36|-37|-38|-39|-40|-41|-42|-42|-44|-45|-46|-47|-48|-49|-50|
Gui, Font, underline
Gui, Add, Text,, Прицел  <Вверх> <Вниз>
Gui, Font, norm
Gui, Add, DropDownList, vMouseMove2 gDropDownList w100,0||-1|-2|-3|-4|-5|-6|-7|-8|-9|-10|-11|-12|-13|-14|-15|-16|-17|-18|-19|-20|-21|-22|-23|-24|-25|-26|-27|-28|-29|-30|-31|-32|-33|-34|-35|-36|-37|-38|-39|-40|-41|-42|-42|-44|-45|-46|-47|-48|-49|-50|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|42|44|45|46|47|48|49|50|
Gui, Font, underline
Gui, Add, Text,, Прицел  <Влево> <Вправо> 
Gui, Font, norm
Gui, Add, DropDownList, vMouseMove1 gDropDownList w100,0||-1|-2|-3|-4|-5|-6|-7|-8|-9|-10|-11|-12|-13|-14|-15|-16|-17|-18|-19|-20|-21|-22|-23|-24|-25|-26|-27|-28|-29|-30|-31|-32|-33|-34|-35|-36|-37|-38|-39|-40|-41|-42|-42|-44|-45|-46|-47|-48|-49|-50|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|42|44|45|46|47|48|49|50|
Gui, Font, underline
Gui, Add, Text,, Прицел  <Вправо> <Влево> 
Gui, Font, norm
Gui, Add, DropDownList, vMouseMove3 gDropDownList w100,0||1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|42|44|45|46|47|48|49|50|-1|-2|-3|-4|-5|-6|-7|-8|-9|-10|-11|-12|-13|-14|-15|-16|-17|-18|-19|-20|-21|-22|-23|-24|-25|-26|-27|-28|-29|-30|-31|-32|-33|-34|-35|-36|-37|-38|-39|-40|-41|-42|-42|-44|-45|-46|-47|-48|-49|-50|
Gui, font, cRed s10
Gui, Add, Text,, Пауза || Плэй <F9>
Gui, Font, norm
Gui, Add, Text,, Выход  <F10>
Gui, Font, norm
Gui, Add, Button, w100 gОК, ОК
Gui, Show
Return

~vk79::
Suspend, Off
ExitApp
Process, Close, No ReKoiL.exe
Return

~vk78::
Suspend, toggle
Return

~vk51::
~vk47::
~WheelDown::
Suspend, On
Return

~WheelUp::
~vk77::
Suspend, Off
Return

~lbutton::
Loop 
{
GetKeyState, state, LButton, P
if state = U
break
SetKeyDelay, 1
MouseMove, %Move%, %RMove%, , R
MouseMove, %JMove%, %BMove%, , R

}
Return
DropDownList:
Return
ОК:
Gui Submit, NoHide
RMove = %MouseMove%
JMove = %MouseMove3%
Move = %MouseMove1%
BMove = %MouseMove2%
WinMinimize 
Return
GuiClose:
ExitApp
OS: Win11x64, AutoHotkey v1.1.25.01 (Unicode 64-bit).

2

Re: AHK:Прерывание работы скрипта при нажатии Shift

вот так нада

#SingleInstance force
#NoEnv
#Persistent
#NoTrayIcon
SetBatchLines, -1



Gui, Color, B0C4DE
gui, font, cBlue s10
Gui, Font, underline
Gui, Add, Text,, Прицел  <Вниз> <Вверх> 
Gui, Font, norm
Gui, Add, DropDownList, vMouseMove gDropDownList w100,0||1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|42|44|45|46|47|48|49|50|-1|-2|-3|-4|-5|-6|-7|-8|-9|-10|-11|-12|-13|-14|-15|-16|-17|-18|-19|-20|-21|-22|-23|-24|-25|-26|-27|-28|-29|-30|-31|-32|-33|-34|-35|-36|-37|-38|-39|-40|-41|-42|-42|-44|-45|-46|-47|-48|-49|-50|
Gui, Font, underline
Gui, Add, Text,, Прицел  <Вверх> <Вниз>
Gui, Font, norm
Gui, Add, DropDownList, vMouseMove2 gDropDownList w100,0||-1|-2|-3|-4|-5|-6|-7|-8|-9|-10|-11|-12|-13|-14|-15|-16|-17|-18|-19|-20|-21|-22|-23|-24|-25|-26|-27|-28|-29|-30|-31|-32|-33|-34|-35|-36|-37|-38|-39|-40|-41|-42|-42|-44|-45|-46|-47|-48|-49|-50|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|42|44|45|46|47|48|49|50|
Gui, Font, underline
Gui, Add, Text,, Прицел  <Влево> <Вправо> 
Gui, Font, norm
Gui, Add, DropDownList, vMouseMove1 gDropDownList w100,0||-1|-2|-3|-4|-5|-6|-7|-8|-9|-10|-11|-12|-13|-14|-15|-16|-17|-18|-19|-20|-21|-22|-23|-24|-25|-26|-27|-28|-29|-30|-31|-32|-33|-34|-35|-36|-37|-38|-39|-40|-41|-42|-42|-44|-45|-46|-47|-48|-49|-50|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|42|44|45|46|47|48|49|50|
Gui, Font, underline
Gui, Add, Text,, Прицел  <Вправо> <Влево> 
Gui, Font, norm
Gui, Add, DropDownList, vMouseMove3 gDropDownList w100,0||1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|42|44|45|46|47|48|49|50|-1|-2|-3|-4|-5|-6|-7|-8|-9|-10|-11|-12|-13|-14|-15|-16|-17|-18|-19|-20|-21|-22|-23|-24|-25|-26|-27|-28|-29|-30|-31|-32|-33|-34|-35|-36|-37|-38|-39|-40|-41|-42|-42|-44|-45|-46|-47|-48|-49|-50|
Gui, font, cRed s10
Gui, Add, Text,, Пауза || Плэй <F9>
Gui, Font, norm
Gui, Add, Text,, Выход  <F10>
Gui, Font, norm
Gui, Add, Button, w100 gОК, ОК
Gui, Show
Return

~vk79::
Suspend, Off
ExitApp
Process, Close, No ReKoiL.exe
Return

~vk78::
Suspend, toggle
Return

~vk51::
~vk47::
~WheelDown::
Suspend, On
Return

~WheelUp::
~vk77::
Suspend, Off
Return

*~lbutton::
Loop 
{
GetKeyState, state, LButton, P
if state = U
break
SetKeyDelay, 1
MouseMove, %Move%, %RMove%, , R
MouseMove, %JMove%, %BMove%, , R

}
Return
DropDownList:
Return
ОК:
Gui Submit, NoHide
RMove = %MouseMove%
JMove = %MouseMove3%
Move = %MouseMove1%
BMove = %MouseMove2%
WinMinimize 
Return
GuiClose:
ExitApp
OS: Win11x64, AutoHotkey v1.1.25.01 (Unicode 64-bit).