Search found 99 matches

by surfactant
04 Jul 2021, 07:08
Forum: Ask for Help (v1)
Topic: a hotkey links to another hotkey? Topic is solved
Replies: 12
Views: 660

Re: a hotkey links to another hotkey? Topic is solved

@swagfag Passing an argument seems to be the right choice. Thank you!
by surfactant
04 Jul 2021, 04:18
Forum: Ask for Help (v1)
Topic: a hotkey links to another hotkey? Topic is solved
Replies: 12
Views: 660

Re: a hotkey links to another hotkey? Topic is solved

@safetycar With the new statement added, the issue seems to persist, although slightly less frequently.

@necomerx If you press the hotkey for more times, it seems to disrupt the functions of Ctrl and Shift.

Thank you both!
by surfactant
04 Jul 2021, 03:48
Forum: Ask for Help (v1)
Topic: a hotkey links to another hotkey? Topic is solved
Replies: 12
Views: 660

Re: a hotkey links to another hotkey? Topic is solved

@safetycar

Yes, you are absolutely right ---- the practice should be avoided. But now I have an special situation and need to call a hotkey defined in another script.

Thanks a lot!
by surfactant
04 Jul 2021, 03:10
Forum: Ask for Help (v1)
Topic: a hotkey links to another hotkey? Topic is solved
Replies: 12
Views: 660

Re: a hotkey links to another hotkey? Topic is solved

@necomerx

Code: Select all

^+a::
Send, XXX
return
LWin::
SendInput, ^+a
return
With your codes above, pressing LWin gives nothing. Thanks!
by surfactant
04 Jul 2021, 03:05
Forum: Ask for Help (v1)
Topic: a hotkey links to another hotkey? Topic is solved
Replies: 12
Views: 660

Re: a hotkey links to another hotkey? Topic is solved

@safetycar Thank you for your solution!

But it's odd what I got are inconsitent results when pressing LWin again and again:

XX
XX
xXX
xXX
XX
XX
xXX
XX
xXX
by surfactant
04 Jul 2021, 02:12
Forum: Ask for Help (v1)
Topic: a hotkey links to another hotkey? Topic is solved
Replies: 12
Views: 660

a hotkey links to another hotkey? Topic is solved

I have two scripts:

1.ahk

Code: Select all

LWin::^+a
2.ahk

Code: Select all

^+a::Send XXX
I hope pressing LWin gives XXX. How should I fix the codes?

Thank you for your help!
by surfactant
24 Jun 2021, 09:56
Forum: Ask for Help (v1)
Topic: cycling through input languages Topic is solved
Replies: 4
Views: 305

Re: cycling through input languages Topic is solved

@swagfag Thanks a lot for the carefully annotated codes!
by surfactant
24 Jun 2021, 01:42
Forum: Ask for Help (v1)
Topic: cycling through input languages Topic is solved
Replies: 4
Views: 305

Re: cycling through input languages Topic is solved

@AHKStudent It's already in the original post. Thanks!
by surfactant
23 Jun 2021, 23:12
Forum: Ask for Help (v1)
Topic: cycling through input languages Topic is solved
Replies: 4
Views: 305

cycling through input languages Topic is solved

Default Keyboard Lang https://www.autohotkey.com/boards/viewtopic.php?f=6&t=18519#p233011 Aafter reading the thread I created my codes for cycling through input languages. $AppsKey:: WinExist("A") ControlGetFocus, CtrlInFocus PostMessage, 0x50, 2,, %CtrlInFocus% return Q1: The code appears to be onl...
by surfactant
23 Jun 2021, 22:51
Forum: Ask for Help (v1)
Topic: keep LAlt in its original function Topic is solved
Replies: 4
Views: 170

Re: keep LAlt in its original function Topic is solved

@gregster Great thanks for your patient help!
by surfactant
23 Jun 2021, 13:14
Forum: Ask for Help (v1)
Topic: keep LAlt in its original function Topic is solved
Replies: 4
Views: 170

Re: keep LAlt in its original function Topic is solved

@gregster It works! Thank you!

Sorry for another question: If I want to remap the key for diffent applications, is there any better way than codes below?

Code: Select all

#IfWinActive ahk_exe Excel.exe
LAlt::a
#If

#IfWinActive ahk_exe Word.exe
LAlt::b
#If

#IfWinActive ahk_exe notepad.exe
LAlt::c
#If
by surfactant
23 Jun 2021, 12:57
Forum: Ask for Help (v1)
Topic: keep LAlt in its original function Topic is solved
Replies: 4
Views: 170

keep LAlt in its original function Topic is solved

I want to remap the key LAlt only in one application, and keep the key in its original function for all the other applications. But my code fails. Hope to have your help on fixing it. Thank a lot! $LAlt:: WinGet, OutputVar, ProcessName, A SplitPath, OutputVar,,,, OutNameNoExt If (OutNameNoExt = "EXC...
by surfactant
07 Feb 2021, 07:15
Forum: Ask for Help (v1)
Topic: drag-drop a file to an existing window Topic is solved
Replies: 2
Views: 145

Re: drag-drop a file to an existing window Topic is solved

@malcev Such long codes. Let me try to understand it. Thank you!
by surfactant
07 Feb 2021, 05:06
Forum: Ask for Help (v1)
Topic: drag-drop a file to an existing window Topic is solved
Replies: 2
Views: 145

drag-drop a file to an existing window Topic is solved

I have a software with a small bug. When I simply click open a file of its format, the file would be opened, but all the existing contents in the software window would be cleared and lost. So each time, I need to drag/drop a new file to the software window to add the file while keeping from losing a...
by surfactant
05 Jan 2021, 09:55
Forum: Ask for Help (v1)
Topic: easy way to differentiate LShift+M and RShift+M? Topic is solved
Replies: 7
Views: 250

Re: easy way to differentiate LShift+M and RShift+M? Topic is solved

Hi @mikeyww Thank you for your quick and patient help!

This works. SendInput should be the safe choice.

Code: Select all

<+m::A
>+m::B

<^m::SendInput {Text}A
>^m::SendInput {Text}B
This doesn't work.

Code: Select all

<^m::A
>^m::B
by surfactant
05 Jan 2021, 09:41
Forum: Ask for Help (v1)
Topic: easy way to differentiate LShift+M and RShift+M? Topic is solved
Replies: 7
Views: 250

Re: easy way to differentiate LShift+M and RShift+M? Topic is solved

mikeyww wrote:
05 Jan 2021, 09:29

Code: Select all

<+m::SendInput {Text}Southpaw!
>+m::SendInput {Text}Wrong! Try the other one.
Hi @mikeyww

I tried to go a step further with LCtrl and RCtrl. It seems not to work. Could you kindly give more clues? Thank you!

Code: Select all

<^m::SendInput {Text}Southpaw!
>^m::SendInput {Text}Wrong! Try the other one.
by surfactant
05 Jan 2021, 09:34
Forum: Ask for Help (v1)
Topic: easy way to differentiate LShift+M and RShift+M? Topic is solved
Replies: 7
Views: 250

Re: easy way to differentiate LShift+M and RShift+M? Topic is solved

Hi @mikeyww Great thanks for the magic code! I've been using AHK for so many years, but never knew this trick. Thank you sir!
by surfactant
05 Jan 2021, 09:26
Forum: Ask for Help (v1)
Topic: easy way to differentiate LShift+M and RShift+M? Topic is solved
Replies: 7
Views: 250

easy way to differentiate LShift+M and RShift+M? Topic is solved

+M:: can be used to assign a script to Shift+M.

Is there any easy way to assign different scripts to LShift+M and RShift+M?

Thank you for your help!
by surfactant
24 Jul 2019, 12:23
Forum: Ask for Help (v1)
Topic: variable in AHK Topic is solved
Replies: 4
Views: 735

Re: variable in AHK Topic is solved

Hi @swagfag Thank you for your reply!

Go to advanced search