Search found 361 matches

by vmech
11 May 2024, 03:13
Forum: Ask for Help (v2)
Topic: A problem of uncheck all checkboxes of a listview Topic is solved
Replies: 4
Views: 311

Re: A problem of uncheck all checkboxes of a listview Topic is solved

songdg Because Uncheck_All callback take Text Gui Control object in named LV parameter. Not ListView Gui Control object. Try: Uncheck_All(*) { global LV LV.Modify(0, "-Check") ; Uncheck all the checkboxes. } You can also try to make the code more structured: 1. Declare controls with options 2. Decl...
by vmech
06 May 2024, 15:58
Forum: Ask for Help (v2)
Topic: splice two paragraphs of text into each other
Replies: 6
Views: 480

Re: splice two paragraphs of text into each other

mikeyww Every block of strings should be divided by linefeed symbol. Final trimming Trim(out, '`n') unneeded. :arrow: https://en.wikipedia.org/wiki/SubRip A numeric counter identifying each sequential subtitle The time that the subtitle should appear on the screen, followed by --> and the time it s...
by vmech
06 May 2024, 05:21
Forum: Ask for Help (v2)
Topic: How can I get OnError to repeat the line/command? Topic is solved
Replies: 3
Views: 352

Re: How can I get OnError to repeat the line/command? Topic is solved

awkwrd Based on the example of your code, the purpose of such complication is not clear. Your specific example can be made much simpler: #Requires Autohotkey v2 MyFunc() MyFunc(param := unset) => MsgBox(param ?? 'hey') Or so: #Requires Autohotkey v2 var1 := unset MyFunc(var1 ?? 'hey') MyFunc(param)...
by vmech
01 May 2024, 05:06
Forum: Ask for Help (v2)
Topic: i need help how to random the loops not to be in order
Replies: 4
Views: 319

Re: i need help how to random the loops not to be in order

@boiler
Why these extra movements?
Why are you ignoring Autohotkey's object-oriented features, such as the array of function objects?
by vmech
29 Apr 2024, 06:39
Forum: Ask for Help (v2)
Topic: Shortcut to Defender Real-Time protection dialog?
Replies: 3
Views: 377

Re: Shortcut to Defender Real-Time protection dialog?

Atari800XL There are too many bad practices. And all are unsuccessful. #Requires AutoHotkey v2 printf(p*)=>OutputDebug(Format(p*)) Loop Reg, 'HKEY_CLASSES_ROOT\CLSID', 'K' { try { value := RegRead(A_LoopRegKey '\' A_LoopRegName) if !( value ~= 'i)^.*(defender|virus|threat|protection).*$' ) continue...
by vmech
13 Apr 2024, 01:35
Forum: Ask for Help (v2)
Topic: ControlGetText not dynamic
Replies: 2
Views: 91

Re: ControlGetText not dynamic

Your mistake is that you read the text of the button once - before the loop with the check. And in the loop you use only this, the initial value. But when the button text has changed, your script has no way of knowing about it. Because the button text is never read anywhere else. Do it in this way: ...
by vmech
05 Apr 2024, 10:55
Forum: Ask for Help (v2)
Topic: how could I get a script to automatically reload upon waking up my computer?
Replies: 6
Views: 321

Re: how could I get a script to automatically reload upon waking up my computer?

any suggestions? Just try to use debugging, like as: OnMessage(WM_POWERBROADCAST := 0x218, OnPowerBroadcast) OnPowerBroadcast(wParam, *) { MsgBox wParam ; For debugging purpose if (wParam = 7) { ; 7 is for "system is resuming from a suspended state triggered by user input" Reload ;... } } Also, I t...
by vmech
30 Mar 2024, 08:32
Forum: Ask for Help (v2)
Topic: Struggle to get the items from bracket Topic is solved
Replies: 15
Views: 415

Re: Struggle to get the items from bracket Topic is solved

(BTW, could you explain what 20 and 164 represent?) Nice @Seven0528... in case efficiency is a factor... 20 steps vs 164 (each fruit requires 5 steps regardless of individual string lengths of fruit or surrounding text) Use regex101.com https://i.imgur.com/B40Whgb.png Or just buy RegexBuddy / Regex...
by vmech
28 Mar 2024, 23:31
Forum: Ask for Help (v2)
Topic: How to obtain the memory address of a variable in AutoHotkey v2?
Replies: 28
Views: 1578

Re: How to obtain the memory address of a variable in AutoHotkey v2?

lexikos wrote:
28 Mar 2024, 22:17
Understanding any of these methods probably requires an understanding of two's complement.
It's even nice to be back at school again. Thank you! :D

:offtopic:
by vmech
27 Mar 2024, 16:51
Forum: Ask for Help (v2)
Topic: Array v1 to v2 Topic is solved
Replies: 7
Views: 497

Re: Array v1 to v2 Topic is solved

Rohwedder A much cleaner conversion would be use regular Array: #Requires AutoHotkey v2.0 Coords := [] CoordMode("Mouse", "Screen") RWin & LButton:: { ; Coordinate recording Global Coords MouseGetPos(&x, &y) Coords.Push({x:x, y:y}) KeyWait("LButton") } q:: { ; Output of coordinates Global Coords Te...
by vmech
27 Mar 2024, 09:56
Forum: Ask for Help (v2)
Topic: Array v1 to v2 Topic is solved
Replies: 7
Views: 497

Re: Array v1 to v2 Topic is solved

@TheDewd

Code: Select all

MyArray := ["MyText1" , "MyText2" , "MyText3"]
MyMap := Map("1" , "MyText1" , "2" , "MyText2" , "3" , "MyText3")
Also multiline definitions allowed:

Code: Select all

MyArray := [
  "MyText1",
  "MyText2",
  "MyText3"
]
MyMap := Map(
  "1" , "MyText1" ,
  "2" , "MyText2" ,
  "3" , "MyText3"
)
by vmech
26 Mar 2024, 13:02
Forum: Ask for Help (v2)
Topic: Why the interpreter complains about multiple statements inside an arrow function?
Replies: 3
Views: 187

Re: Why the interpreter complains about multiple statements inside an arrow function?

@slishnevsky
Because braces are not allowed for fat arrow function definition. Use parentheses instead. And separate expressions inside with commas.
by vmech
24 Mar 2024, 12:04
Forum: Ask for Help (v2)
Topic: modify setbatchlines
Replies: 10
Views: 201

Re: modify setbatchlines

first, at what speed precisely(or roughly) does ahk take to go from one line of code to another? is it in ms or microseconds? It depends on the code itself. For example, a function with a really large number of relatively simple mathematical operations, even with loops, will be executed very quickl...
by vmech
24 Mar 2024, 02:39
Forum: Ask for Help (v2)
Topic: modify setbatchlines
Replies: 10
Views: 201

Re: modify setbatchlines

@marypoppins_1
Adding delays (e.g. Sleep) not after every lines, but into critical code's places, is only a way in v2.
by vmech
24 Mar 2024, 02:17
Forum: Помощь
Topic: Проблема с работой на удаленном рабочем столе Topic is solved
Replies: 5
Views: 639

Re: Проблема с работой на удаленном рабочем столе Topic is solved

На просторах нашёл относительно простое решение. К сожалению мне проверить негде. Попробуйте, возможно поможет. ; this line should be put on top (auto-exec) section of ahk script SetTimer, SuspendOnRDPMaximized, 500 ; this actual code label and the fn can be put anywhere in the script file SuspendOn...
by vmech
23 Mar 2024, 04:49
Forum: Ask for Help (v2)
Topic: if condition not working
Replies: 6
Views: 147

Re: if condition not working

@marypoppins_1
Just re-check Edge settings shown under spoiler below:
Spoiler
by vmech
22 Mar 2024, 15:37
Forum: Suggestions on Documentation Improvements
Topic: ahk_class is case-sensitive Topic is solved
Replies: 3
Views: 419

Re: ahk_class is case-sensitive Topic is solved

@mikeyww
Window titles are case-sensitive, except when using the i) modifier in a RegEx pattern.
https://www.autohotkey.com/docs/v2/misc/WinTitle.htm#WinTitle
by vmech
16 Mar 2024, 07:58
Forum: Scripts and Functions (v1)
Topic: [stdlib] Wrapper for libHaru (creates PDFs) - now with Unicode 32 and 64-bit support
Replies: 42
Views: 9847

Re: [stdlib] Wrapper for libHaru (creates PDFs) - now with Unicode 32 and 64-bit support

and if you do, try to get 32 and 64 bit versions compiled without dependencies on zlib, libpng, or msvcrt А в чём, по Вашему мнению, могут заключаться сложности ? MinGW прекрасно компилирует библиотеки обеих разрядностей. И без каких либо зависимостей. [Mod edit: Added translation:] What do you thi...
by vmech
12 Feb 2024, 04:56
Forum: Scripts and Functions (v2)
Topic: Extend Your Scripts/Programs with Lua!
Replies: 6
Views: 2541

Re: Extend Your Scripts/Programs with Lua!

@Delta Pythagorean
Why you use

Code: Select all

result == 0 ? "" : StrGet(result, "UTF-8")
instead of

Code: Select all

result ? StrGet(result, "UTF-8") : ""
?

Go to advanced search