Advertisement
DevTricks

Поиск оп цвету и нажатие клавиш

Jul 22nd, 2021
1,009
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CoordMode Screen
  2. F2:: Reload ; перезагрузить скрипт
  3.  
  4. F3:: ExitApp ; закрыть скрипт
  5.  
  6. F4:: ; Старт
  7.     Loop{
  8.         PixelGetColor, color_up1, A_ScreenWidth * 0.5, A_ScreenHeight * 0.77, RGB
  9.         PixelGetColor, color_up2, A_ScreenWidth * 0.5, A_ScreenHeight * 0.76, RGB
  10.         PixelGetColor, color_up3, A_ScreenWidth * 0.5, A_ScreenHeight * 0.76, RGB
  11.         if ( color_up1 = "0x000000" and color_up2 = "0x000000" and color_up3 = "0x000000" ) {
  12.             Send, {vk26}
  13.             sleep, 100
  14.         }
  15.         else
  16.             PixelGetColor, color_down1,  A_ScreenWidth * 0.5, A_ScreenHeight * 0.76, RGB
  17.             PixelGetColor, color_down2,  A_ScreenWidth * 0.5, A_ScreenHeight * 0.77, RGB
  18.             PixelGetColor, color_down3,  A_ScreenWidth * 0.5, A_ScreenHeight * 0.77, RGB
  19.             if ( color_down1 = "0x000000" and color_down2 = "0x000000" and color_down3 = "0x000000" ) {
  20.                 Send, {vk28}
  21.                 sleep, 100
  22.             }
  23.         else
  24.             PixelGetColor, color_right1,  A_ScreenWidth * 0.5, A_ScreenHeight * 0.77, RGB
  25.             PixelGetColor, color_right2,  A_ScreenWidth * 0.5, A_ScreenHeight * 0.76, RGB
  26.             PixelGetColor, color_right3,  A_ScreenWidth * 0.5, A_ScreenHeight * 0.77, RGB
  27.             if ( color_right1 = "0x000000" and color_right2 = "0x000000" and color_right3 = "0x000000" ) {
  28.                 Send, {vk27}
  29.                 sleep, 100
  30.             }
  31.         else
  32.             PixelGetColor, color_left1,  A_ScreenWidth * 0.5, A_ScreenHeight * 0.77, RGB
  33.             PixelGetColor, color_left2,  A_ScreenWidth * 0.5, A_ScreenHeight * 0.76, RGB
  34.             PixelGetColor, color_left3,  A_ScreenWidth * 0.5, A_ScreenHeight * 0.77, RGB
  35.             if ( color_left1 = "0x000000" and color_left2 = "0x000000" and color_left3 = "0x000000" ) {
  36.                 Send, {vk25}
  37.                 sleep, 100
  38.             }
  39.         else
  40.             Send, {vk45}
  41.         color_down1 := " "
  42.         color_down2 := " "
  43.         color_down3 := " "
  44.         color_left1 := " "
  45.         color_left2 := " "
  46.         color_left3 := " "
  47.         color_up1   := " "
  48.         color_up2   := " "
  49.         color_up3   := " "
  50.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement