Search found 1470 matches

by rommmcek
28 Feb 2024, 15:59
Forum: Scripts and Functions (v1)
Topic: Handling single, double, triple, quadruple... infinite key presses.
Replies: 9
Views: 3369

Re: Handling single, double, triple, quadruple... infinite key presses.

I love HandleMultiplePresses. Here is my v2 version. Not one to one translation, but should have the same functionality.
by rommmcek
28 Feb 2024, 15:57
Forum: Scripts and Functions (v2)
Topic: Handling single, double, triple, quadruple... infinite key presses_v2
Replies: 0
Views: 191

Handling single, double, triple, quadruple... infinite key presses_v2

I love HandleMultiplePresses . This is my v2 version. Not one to one translation, but should have the same functionality. #Requires AutoHotkey v2+ #SingleInstance Force F1 Up:: HandleMultiplePresses(["F3", "SayGo", "SayFight", "SayWin"]) ^F1:: HandleMultiplePresses(["SayGo", "SayFight", "SayWin"]) F...
by rommmcek
02 Feb 2024, 16:25
Forum: Ask for Help (v2)
Topic: REvert TWo CApital LEtters
Replies: 11
Views: 636

Re: REvert TWo CApital LEtters

See here.
by rommmcek
28 Jan 2024, 06:10
Forum: Tutorials (v1)
Topic: jeeswg's Explorer tutorial
Replies: 19
Views: 37077

Re: jeeswg's Explorer tutorial

Let me add Hide and Show for the ToolbarWindow32x Control to this wonderful jeeswg's Explorer tutorial.
Hide:

Code: Select all

SendMessage 0x111, 0x500,, "ToolbarWindow323", "ahk_class CabinetWClass"
Show:

Code: Select all

SendMessage 0x111, 0x501,, "ToolbarWindow323", "ahk_class CabinetWClass"
P.s.: v2!
by rommmcek
28 Jan 2024, 05:03
Forum: Ask for Help (v2)
Topic: How to store last active folder's filepath and paste it when the "Save as" window pops up
Replies: 9
Views: 787

Re: How to store last active folder's filepath and paste it when the "Save as" window pops up

Indeed on Win11 in some applications there was a problem and even on Win10 on some "asleepy" browser (that was not used for a prolonged period of time) the FileName Control did not focus after the Path setting... I edited the code to be more robust yet still fast and updated the post above . P.s. : ...
by rommmcek
24 Jan 2024, 21:48
Forum: Ask for Help (v2)
Topic: How to store last active folder's filepath and paste it when the "Save as" window pops up
Replies: 9
Views: 787

Re: How to store last active folder's filepath and paste it when the "Save as" window pops up

For me on Win10 works your version too. On Win11 I can test it only in the weekend. Now we have to debug it. First try to run the script as Administrator. Then, start by sections as declared by ChatGPT (I edited it to be better shown). loop { WinWaitActive "Save ahk_class #32770" MsgBox WinGetTitle(...
by rommmcek
24 Jan 2024, 16:15
Forum: Ask for Help (v2)
Topic: Shortest way to define a 2D Map
Replies: 8
Views: 486

Re: Shortest way to define a 2D Map

Maybe: #Requires AutoHotkey v2+ #SingleInstance Force Loop (mGrid:= Map(), aInd:=aVal:=0, 10) loop (aInd:=A_Index, mGrid.Has(A_Index)? "": mGrid[aInd]:= Map(), 5) mGrid[aInd][A_Index]:= ++aVal for i, j in (txt:="", mGrid) for k, v in j ;txt.= i ":[" k ":" v "]`n" txt.= (Mod(i,mGrid.Count)=1&&Mod(k,j...
by rommmcek
21 Jan 2024, 03:19
Forum: Scripts and Functions (v1)
Topic: Optical character recognition (OCR) with UWP API
Replies: 157
Views: 63918

Re: Optical character recognition (OCR) with UWP API

I made an attempt to sort the words. To test: Run the script, activate the desired window (if you want Ocr only active window, maximize it) and press Enter . P.s.: First you have to manually (in the script) set the diff i.e. tolerance of the lines. For auto setting and minimal formatting see here (v...
by rommmcek
21 Jan 2024, 02:51
Forum: Scripts and Functions (v2)
Topic: Easy OCR
Replies: 78
Views: 15653

Re: Easy OCR

@ Descolada : Thanks for this in other work of yours! Obviously the OCR treats the image as ... areas of text ... This is known issue of the UWP. I made an attempt to sort the lines/words (with minimal formatting which could improve the readability of the output). Variables: diff - (UInt) tolerance ...
by rommmcek
03 Jan 2024, 06:11
Forum: Ask for Help (v2)
Topic: How to store last active folder's filepath and paste it when the "Save as" window pops up
Replies: 9
Views: 787

Re: How to store last active folder's filepath and paste it when the "Save as" window pops up

I asked ChatGPT... Set Up: #Requires AutoHotkey v2+ #SingleInstance SetTitleMatchMode 2 This part of the script sets up the environment. It requires AutoHotkey version 2 or higher, allows only a single instance of the script to run, and sets the title match mode to 2 (which means it can match anywhe...
by rommmcek
29 Dec 2023, 15:37
Forum: Ask for Help (v2)
Topic: How to store last active folder's filepath and paste it when the "Save as" window pops up
Replies: 9
Views: 787

Re: How to store last active folder's filepath and paste it when the "Save as" window pops up

Saving the path is not needed. #Requires AutoHotkey v2+ #SingleInstance Force SetTitleMatchMode "RegEx" While ((Tbw:="ToolbarWindow32", exId:="ahk_class (Cabinet|Explore)WClass", Edt:="Edit2", ap:=StrSplit(A_Desktop, "\")), 1) { WinWaitActive sd:= "i)^Save|Open|Choose ahk_class #32770" ; sd - Save d...
by rommmcek
08 Dec 2023, 14:39
Forum: Ask for Help (v2)
Topic: Changing GUI element owner to AHK breaks modifiers
Replies: 5
Views: 433

Re: Changing GUI element owner to AHK breaks modifiers

While using Sleep 1 in general works as well as more elegant triggering the attachGUI() function via SetTimer attachGUI, -1 , could both fail under extremely harsh conditions. Using KeyWait() I believe is a better more robust workaround. attachGUI() { static guiBlankChild := Gui() if not winID := Wi...
by rommmcek
25 Nov 2023, 19:54
Forum: Ask for Help (v2)
Topic: Changing GUI element owner to AHK breaks modifiers
Replies: 5
Views: 433

Re: Changing GUI element owner to AHK breaks modifiers

Try inserting short sleep before calling attachGUI() e.g.:

Code: Select all

hktest11(ThisHotkey) {
  Sleep(1)
  attachGUI() ;
}
until better solution is found.
by rommmcek
07 Oct 2023, 07:29
Forum: Bug Reports
Topic: WinGetTitle Topic is solved
Replies: 7
Views: 1906

WinGetTitle Topic is solved

Possible WinGetTitle bug.
by rommmcek
07 Oct 2023, 07:07
Forum: Scripts and Functions (v2)
Topic: Class ToolTipOptions - 2024-03-17
Replies: 13
Views: 2935

Re: Class ToolTipOptions - 2023-09-10

This issue seems nothing to do with Class ToolTipOptions.
Try your loop w/o this Class.
If you slow down a loop there is no problem in any case.

P.s.: AutoHotkey v1 seems not to have such an issue, therefore it might be a v2 bug.
by rommmcek
05 Oct 2023, 06:59
Forum: Scripts and Functions (v1)
Topic: ToolTipFont / ToolTipColor - options for the ToolTip command
Replies: 92
Views: 50659

Re: ToolTipFont / ToolTipColor - options for the ToolTip command

You are doing nothing wrong. AutoHotkey's ToolTip time ago just underwent antiflickering measure, i.e. ToolTip is refreshed only if it's content is changed (at least this is my interpretation). So to work around it, you can display some unique ToolTip beforehand the actual one, if a tiny flicker as ...
by rommmcek
19 Jul 2023, 17:46
Forum: Ask for Help (v2)
Topic: clipboard code Topic is solved
Replies: 3
Views: 370

Re: clipboard code Topic is solved

For such operations is Send "^c" much more suitable.
by rommmcek
25 Jun 2023, 00:14
Forum: Scripts and Functions (v1)
Topic: Optical character recognition (OCR) with UWP API
Replies: 157
Views: 63918

Re: Optical character recognition (OCR) with UWP API

Try something like: msgbox % RegExReplace(ocr("C:\Users\RRR\My Ahk-s\test.jpg", "en"), "[^0-9]").
by rommmcek
29 May 2023, 16:17
Forum: Scripts and Functions (v1)
Topic: Using Google Translate to automate text translation
Replies: 227
Views: 95250

Re: Using Google Translate to automate text translation

Thanks!
Just noticed that not every LanguageCode works either.

Go to advanced search