Search found 16 matches

by Sashkon
01 Aug 2019, 22:30
Forum: Ask For Help
Topic: One key with two functions
Replies: 11
Views: 606

Re: One key with two functions

You can press x and on key up - press click

Code: Select all

$x::
	SendInput, x
	KeyWait, x
	SendInput, {Click}
	return
by Sashkon
01 Aug 2019, 13:40
Forum: Ask For Help
Topic: One key with two functions
Replies: 11
Views: 606

Re: One key with two functions

If I wanted three different keys to do the same thing would I just make a script like this ~x::Click ~c::Click ~v::Click All in one script? Yes, Do all hotkeys in one file. and add #IfWinActive so your keys will active only when they needed. #IfWinActive, ahk_exe game.exe $x::SendInput, x{Click} $c...
by Sashkon
01 Aug 2019, 13:08
Forum: Ask For Help
Topic: One key with two functions
Replies: 11
Views: 606

Re: One key with two functions

Xtra wrote:
01 Aug 2019, 12:43
Another example:

Code: Select all

~x::Click 
This doesn't work for quickscope, because click first then x
by Sashkon
01 Aug 2019, 12:40
Forum: Ask For Help
Topic: One key with two functions
Replies: 11
Views: 606

Re: One key with two functions

Hi, Try this
x presses x ,Click

Code: Select all

$x::SendInput, x{Click}
by Sashkon
01 Aug 2019, 12:04
Forum: Ask For Help
Topic: exact alt & shift press
Replies: 2
Views: 249

Re: exact alt & shift press

Thank you very much, Rohwedder. It works good and has no confilicts. But it seems like this works only in one way. It works only alt + shift , but shift + alt will not work. I write this code, and it works like windows changes keyboard layout (alt + shift or ctrl + shift) onTranslate(){ MsgBox, aler...
by Sashkon
31 Jul 2019, 22:05
Forum: Ask For Help
Topic: exact alt & shift press
Replies: 2
Views: 249

exact alt & shift press

Code: Select all

Alt & Shift up::MsgBox, alert!
It will triggered if i press alt shift r (or other key). How to bind only alt shift? There's an easy way, like appending $ or *?
by Sashkon
22 Jul 2019, 14:43
Forum: Ask For Help
Topic: Press another combination before original combination Topic is solved
Replies: 3
Views: 192

Re: Press another combination before original combination Topic is solved

Here's what i did getExe(){ WinGet, exe, ProcessName , A return exe } #IfWinActive, ahk_exe Code.exe $+!r:: SendInput, {Alt down}{Shift down}r{Shift up} Sleep, 100 if (getExe() == "Code.exe"){ SendInput, {Alt up}{Alt down}1{Alt up}{Alt down}{Shift down}r{Shift up}{Alt up} } return #IfWinActive
by Sashkon
22 Jul 2019, 14:00
Forum: Ask For Help
Topic: Press another combination before original combination Topic is solved
Replies: 3
Views: 192

Re: Press another combination before original combination Topic is solved

i pasted this line to new file and it works. Hmm... strange
by Sashkon
22 Jul 2019, 14:00
Forum: Ask For Help
Topic: Press another combination before original combination Topic is solved
Replies: 3
Views: 192

Re: Press another combination before original combination Topic is solved

i pasted this line to new file and it works. Hmm... strange
by Sashkon
22 Jul 2019, 13:43
Forum: Ask For Help
Topic: Press another combination before original combination Topic is solved
Replies: 3
Views: 192

Press another combination before original combination Topic is solved

When I press Alt Shift R i want to press Alt 1 before it For example: Alt Shift R -> Alt 1 , Alt Shift R I tried this code, but it doesn't react. I press Alt Shift R nothing happens. It doesn't work on same combination $+!r::SendInput, {Alt down}1{Alt up}{Alt down}{Shift down}r{Shift up}{Alt up} Alt...
by Sashkon
13 Apr 2019, 10:37
Forum: Ask For Help
Topic: How to properly pass a variable to MsgBox?
Replies: 1
Views: 157

How to properly pass a variable to MsgBox?

I have a code. It works properly: a := new Car() class Car{ speed := 40 __new(){ MsgBox, % this.speed } } But this code throws error. It says Error: #1 parameter is invalid. Screenshot: http joxi.ru /RmzEYzPHYRjWVr Broken Link for safety a := new Car() class Car{ speed := 40 __new(){ MsgBox, % this....
by Sashkon
23 Dec 2018, 03:02
Forum: Ask For Help
Topic: Only alt+right, but not shift+alt+right Topic is solved
Replies: 3
Views: 419

Re: Only alt+right, but not shift+alt+right Topic is solved

Scr1pter wrote:
22 Dec 2018, 15:34

Code: Select all

!Right::
Send {Volume_Up}
return

!Left::
Send {Volume_Down}
return

Code: Select all

!Right::Send {Volume_Up}
!Left::Send {Volume_Down}
by Sashkon
22 Dec 2018, 15:19
Forum: Ask For Help
Topic: Only alt+right, but not shift+alt+right Topic is solved
Replies: 3
Views: 419

Only alt+right, but not shift+alt+right Topic is solved

I have script

Code: Select all

!Right::Volume_Up
!Left::Volume_Down
It should work only alt+left and alt+right
Actually It works on Shift+alt+right, Ctrl+alt+right etc
I want only alt+left and alt+right. How to do that?
by Sashkon
04 Dec 2018, 14:46
Forum: Ask For Help
Topic: Is it possible to bind fn key?
Replies: 2
Views: 581

Re: Is it possible to bind fn key?

Fn key doesnt appear in history.
Well, at least it is possible to rebind default media keys like this.

Code: Select all

Media_Next:: ;Fn + f6
    MsgBox, hi
return

+Media_Next:: ;Fn + Shift + f6
    MsgBox, 123
return

^Media_Next:: ;Fn + Ctrl + f6
    MsgBox, aaaaa control
return
by Sashkon
04 Dec 2018, 12:56
Forum: Ask For Help
Topic: Is it possible to bind fn key?
Replies: 2
Views: 581

Is it possible to bind fn key?

Here is my key history: Image
Is it possible to bind fn+a in ahk?

I want like this

Code: Select all

Fn & a::
    MsgBox, hi
return
by Sashkon
23 Dec 2017, 05:35
Forum: Ask For Help
Topic: Press another key then original key Topic is solved
Replies: 1
Views: 249

Press another key then original key Topic is solved

How to press custom key then original key?
For example: 2 -> w2

I tried this, but infinite loop =(

Code: Select all

2::
	SendInput w
	SendInput 2
return
when i press 2 happens wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
but should just w2

I'm not new in programming, but new in ahk

Go to advanced search