Louis_Capo |
Дата: Воскресенье, 19.11.2017, 17:56 | Сообщение # 1
|
Новичок
Сообщений: 17
Статус: Offline
|
В общем Как считать пременную из этой строки: Gui, Add, HotKey, x132 y109 w110 h20 vmask, И при нажатии на клавишу cчитанной в переменной mask выдавалась следующая отыгровка: Sendinput,{F6}/me достал из кармна маску{Enter} Sleep 1500 Sendinput,{F6}/me натянул маску на голову{Enter} Sleep 1000 Sendinput,{F6}/clist 32{Enter} Sleep 1000 Sendinput,{F6}/do Маска на лице{Enter} Return
Сообщение отредактировал Louis_Capo - Воскресенье, 19.11.2017, 18:03 |
|
|
|
T1bro |
Дата: Воскресенье, 19.11.2017, 19:28 | Сообщение # 2
|
Любитель
Сообщений: 38
Статус: Offline
|
Если я правильно тебя понял.
Код loop 13 { IniRead, HK%A_Index%, config.ini, HotKey, SetupHK%A_Index%, if HK%A_Index% Hotkey,% HK%A_Index%, Active%A_Index%, On, UseErrorlevel }
Gui, Add, Hotkey, x12 y10 w90 h30 vHK1 gActive, %HK1% Gui, Add, Text, x112 y10 w130 h30 , Маска Gui, Add, Button, x2 y60 w100 h30 gSave, Сохранить Gui, Add, Edit, x172 y60 w60 h20 vID, %ID% Gui, Add, Text, x150 y60 w40 h20 , ID Gui, Show, x465 y215 h100 w276, return
Save: Gui, Submit, NoHide
IniWrite, %HK1%, config.ini, HotKey, SetupHK1 return
Active: ;tooltip, Active If %A_GuiControl% in +,^,!,+^,+!,^!,+^! ;If the hotkey contains only modifiers, then return to wait for a key. return num := SubStr(A_GuiControl,3) ;Get the number of the hotkey control. If (savedHK%num%) { ;If a hotkey was already saved in this control... Hotkey,% savedHK%num%, Active%num%, Off ; turn the old hotkey off savedHK%num% .= " OFF" ; add the word 'OFF' to display in a message. } If (%A_GuiControl% = "") { ;If the new hotkey is blank... TrayTip, Active%num%,% savedHK%num%, 5 ; show a message: the old hotkey is OFF savedHK%num% = ; save the hotkey (which is now blank) for future reference. return ;This allows an old hotkey to be disabled without enabling a new one. } Gui, Submit, NoHide If CB%num% ;If the 'Win' box is checked, then add its modifier (#). %A_GuiControl% := "#" %A_GuiControl% If StrLen(%A_GuiControl%) = 1 ;If the new hotkey is only 1 character, then add the (~) modifier. %A_GuiControl% := "~" %A_GuiControl% ; This prevents any key from being blocked. Hotkey,% %A_GuiControl%, Active%num%, On ;Turn on the new hotkey. TrayTip, Active%num% ,% %A_GuiControl% " ON`n" savedHK%num%, 5 ;Show a message: the new hotkey is ON. savedHK%num% := %A_GuiControl% ;Save the hotkey for future reference. return
ShowClose: ExitApp
MyHotKey: Gui, Submit, NoHide Hotkey, %MyHotKey%, key, on, useerrorlevel return
Active1: Sendinput,{F6}/me достал из кармна маску{Enter} Sleep 1500 Sendinput,{F6}/me натянул маску на голову{Enter} Sleep 1500 Sendinput,{F6}/n clist %ID%{Enter} Sleep 1000 Sendinput,{F6}/do Маска на лице{Enter} Return
MacD
Сообщение отредактировал T1bro - Воскресенье, 19.11.2017, 19:57 |
|
|
|