Search found 11 matches

by Miristegal
03 Nov 2022, 09:57
Forum: Ask for Help (v2)
Topic: clipboard autohotkey
Replies: 2
Views: 540

Re: clipboard autohotkey

GetSelectedText() { s := "" ClipSaved := ClipboardAll() A_Clipboard := "" SendInput '^c' if ClipWait(0.5) s := A_Clipboard A_Clipboard := ClipSaved return s } text := '' !c:: { global text text := GetSelectedText() } !v:: { global text if (StrLen(text) > 0) { SendInput(SubStr(text, 1, 1)) text := S...
by Miristegal
17 Apr 2022, 03:01
Forum: Wish List
Topic: Stop modifier keys from getting stuck down
Replies: 25
Views: 10998

Re: Stop modifier keys from getting stuck down

I used to have control stuck sometimes, then I add SendInput '{Ctrl Up}' at the end of my code. This problem doesn't happen again.
Or to add OnError (exception, mode) => !SendInput('{Ctrl Up}'), in case of code is interrupted by error.
by Miristegal
16 Feb 2022, 08:25
Forum: Ask for Help (v1)
Topic: holding down a/o/u/s resulting in ä/ö/ü/ß
Replies: 8
Views: 1111

Re: holding down a/o/u/s resulting in ä/ö/ü/ß

Yes, it should be ErrorLevel way. And the braces should be replaced by return. I use v2 only normally, so my syntax was just too v2 :lol:
by Miristegal
14 Feb 2022, 09:57
Forum: Ask for Help (v1)
Topic: holding down a/o/u/s resulting in ä/ö/ü/ß
Replies: 8
Views: 1111

Re: holding down a/o/u/s resulting in ä/ö/ü/ß

If you want the letter show after long press and before releasing the key, change it this way. myArray := {"$u":"ü","$a":"ä","$o":"ö","$s":"ß","$+u":"Ü","$+a":"Ä","$+o":"Ö","$+s":"ẞ"} $u:: $+u:: $a:: $+a:: $o:: $+o:: $s:: $+s:: { SendInput, % SubStr(A_ThisHotkey,2) ;input the letter first, otherwise...
by Miristegal
14 Feb 2022, 09:42
Forum: Ask for Help (v1)
Topic: How to Call a function on change of input box of a desktop application Topic is solved
Replies: 6
Views: 1153

Re: How to Call a function on change of input box of a desktop application Topic is solved

Try to get the text by ControlGetText, or by the application like ComObjActive("Excel.Application") or ComObjActive("Word.Application"). Use a loop to continuously monitor the object you need. And if it's changed, call your function. Here is an example to monitor the text change in a notepad file. C...
by Miristegal
12 Feb 2022, 02:30
Forum: Ask for Help (v1)
Topic: How to Call a function on change of input box of a desktop application Topic is solved
Replies: 6
Views: 1153

Re: How to Call a function on change of input box of a desktop application Topic is solved

;Autohotkey v2

Code: Select all

MyGui := Gui()
myEdit := MyGui.Add("Edit")
myEdit.OnEvent("Change", EditChanged)
MyGui.Show

EditChanged(*)
{
    ToolTip(myEdit.Value)
}
by Miristegal
12 Feb 2022, 02:20
Forum: Ask for Help (v1)
Topic: Paste as string in Excel Topic is solved
Replies: 4
Views: 637

Re: Paste as string in Excel Topic is solved

Try to trim the clipboard before paste

Code: Select all

;Autohotkey v1:
clipboard := Trim(clipboard)

Code: Select all

;Autohotkey v2:
A_Clipboard := Trim(A_Clipboard)

Moderator edit: Added [code][/code] tags.
by Miristegal
12 Feb 2022, 01:07
Forum: Ask for Help (v1)
Topic: Send another key only if key is released immediately. Topic is solved
Replies: 2
Views: 489

Re: Send another key only if key is released immediately. Topic is solved

It's not necessary to have "+CapsLock::CapsLock". Shift + CapsLock can switch the CapsLock state without any code. Below is enough.

Code: Select all

CapsLock & h::SendInput {left}
CapsLock & j::SendInput {down}
CapsLock & k::SendInput {up}
CapsLock & l::SendInput {right}
CapsLock::SendInput {ESC}
by Miristegal
11 Feb 2022, 22:15
Forum: Ask for Help (v1)
Topic: holding down a/o/u/s resulting in ä/ö/ü/ß
Replies: 8
Views: 1111

Re: holding down a/o/u/s resulting in ä/ö/ü/ß

Here is the version v1. And I suggest v2, which is more similar to the popular languages. myArray := {"$u":"ü","$a":"ä","$o":"ö","$s":"ß","$+u":"Ü","$+a":"Ä","$+o":"Ö","$+s":"ẞ"} $u:: $+u:: $a:: $+a:: $o:: $+o:: $s:: $+s:: { SendInput, % SubStr(A_ThisHotkey,2) ;input the letter first, otherwise inpu...
by Miristegal
11 Feb 2022, 21:12
Forum: Ask for Help (v1)
Topic: holding down a/o/u/s resulting in ä/ö/ü/ß
Replies: 8
Views: 1111

Re: holding down a/o/u/s resulting in ä/ö/ü/ß

Hallo. I made it in Autohotkey v2. And it's no problem running on my computer. myMap := Map("$u","ü","$a","ä","$o","ö","$s","ß","$+u","Ü","$+a","Ä","$+o","Ö","$+s","ẞ") $u:: $+u:: $a:: $+a:: $o:: $+o:: $s:: $+s:: { SendInput(SubStr(A_ThisHotkey,2)) ;input the letter (the hotkey name without '$') fir...

Go to advanced search