Search found 1477 matches

by rommmcek
1 minute ago
Forum: Ask for Help (v2)
Topic: Can the row spacing of an Gui Edit be specified
Replies: 1
Views: 35

Re: Can the row spacing of an Gui Edit be specified

If you change the font size of GUI controls in AutoHotkey v2, it will inherently affect the row spacing and height as well. AFAIK there isn't a straightforward built-in way to decouple the font size from the row spacing without advanced to me unknown manual adjustments/workarounds.
by rommmcek
Yesterday, 21:02
Forum: Ask for Help (v2)
Topic: Clean up key release order of Alt+Tab
Replies: 1
Views: 99

Re: Clean up key release order of Alt+Tab

Try:

Code: Select all

#Requires AutoHotkey v2.0
#SingleInstance Force

~*LAlt Up:: {
    Hotkey "Tab", TabBlock
    SetTimer TabOff, -2000 ; for testing a large value, adjust as needed...
}

TabBlock(*) {
    Return
}

TabOff() {
    Hotkey "Tab", "Off"
}

Esc:: ExitApp ; for safely testing...
by rommmcek
19 Apr 2024, 16:23
Forum: Ask for Help (v2)
Topic: InStr(...) gives error?
Replies: 24
Views: 307

Re: InStr(...) gives error?

I modified the code above and it seems to solve the issue.
by rommmcek
18 Apr 2024, 11:54
Forum: Ask for Help (v2)
Topic: InStr(...) gives error?
Replies: 24
Views: 307

Re: InStr(...) gives error?

Try: #Requires AutoHotkey v2+ #SingleInstance Force Loop Files, "*.ahk" { if !FileExist(utf8FilePath:= A_ScriptDir "\" (Utf_Files:= "UTF8_Files") "\" StrReplace(A_LoopFileName, "." A_LoopFileExt) "_UTF-8." A_LoopFileExt) { ansiContent:= FileRead(A_LoopFileName, "CP1252") if !DirExist(Utf_Files) DirC...
by rommmcek
14 Apr 2024, 05:38
Forum: Ask for Help (v2)
Topic: How to call nested function? Topic is solved
Replies: 15
Views: 310

Re: How to call nested function? Topic is solved

Interesting! However, for me MyGui.Click := Button_Click does not work.
Try then myGui.Button:= ObjBindMethod(myGui, 'Click').
Using AutoHotkey 2.0.3 Unicode 64-bit on Win10.
by rommmcek
13 Apr 2024, 16:15
Forum: Ask for Help (v2)
Topic: How to call nested function? Topic is solved
Replies: 15
Views: 310

Re: How to call nested function? Topic is solved

iPhilip wrote:
13 Apr 2024, 01:36
I am not sure how you did that.
Replacing MyGui.DefineProp('Click', {Call: (this) => Button_Click()}) in your script with ObjBindMethod(myGui, 'Click') will do it.
by rommmcek
28 Feb 2024, 15:59
Forum: Scripts and Functions (v1)
Topic: Handling single, double, triple, quadruple... infinite key presses.
Replies: 9
Views: 3455

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: 1
Views: 418

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: 659

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: 37565

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: 821

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: 821

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: 519

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: 64686

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: 91
Views: 16800

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: 821

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: 821

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: 442

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...

Go to advanced search