Search found 85 matches
- 31 Jan 2021, 10:40
- Forum: Ask for Help (v2)
- Topic: How to implement Gui.Destroy()? Topic is solved
- Replies: 3
- Views: 650
Re: How to implement Gui.Destroy()? Topic is solved
Figured it. MyGui.Gui.Destroy()
- 31 Jan 2021, 10:35
- Forum: Ask for Help (v2)
- Topic: How to implement Gui.Destroy()? Topic is solved
- Replies: 3
- Views: 650
How to implement Gui.Destroy()? Topic is solved
Code: Select all
MyGui := Gui.New()
MyBtn := MyGui.Add("Button","Default", "OK").OnEvent("Click", "OK_Click")
MyGui.Show()
OK_Click(MyGui, *){
MsgBox('You clicked the "OK" button.')
MyGui.Destroy() ;???
}
- 31 Jan 2021, 05:31
- Forum: Suggestions on Documentation Improvements
- Topic: Document search fuction does not allow for hyphenated words
- Replies: 2
- Views: 746
Re: Document search fuction does not allow for hyphenated words
Thanks, Highlight Keywords certainly makes it easier to identify hyphenated pairs.
- 30 Jan 2021, 19:11
- Forum: Suggestions on Documentation Improvements
- Topic: Document search fuction does not allow for hyphenated words
- Replies: 2
- Views: 746
Document search fuction does not allow for hyphenated words
e.g. side-effect is not a permitted search term.
side effect returns side and effect wherever they might appear in the resultant list of pages.
side effect returns side and effect wherever they might appear in the resultant list of pages.
- 30 Jan 2021, 18:33
- Forum: Bug Reports
- Topic: should the ternary operator return an error in this use case? Topic is solved
- Replies: 1
- Views: 527
should the ternary operator return an error in this use case? Topic is solved
Code: Select all
x := True
y := x = True ? 1 :
if y =
MsgBox False
Else
MsgBox True
- 29 Jan 2021, 14:12
- Forum: Ask for Help (v2)
- Topic: FileRead function parameters *must* be in parenthesis
- Replies: 4
- Views: 583
Re: FileRead function parameters *must* be in parenthesis
swagfag Thanks for the link, but it doesn't help me understand what side effects I might expect if using FileRead filename, "RAW" at the beginning of a line, particularly as the AHK documentation makes no mention of side effects as such. Nothing observable, what side effects might I expect otherwis...
- 29 Jan 2021, 09:43
- Forum: Ask for Help (v2)
- Topic: FileRead function parameters *must* be in parenthesis
- Replies: 4
- Views: 583
Re: FileRead function parameters *must* be in parenthesis
swagfag Unfortunately, the documentation does not give any working example of exclusively using FileRead's side-effects. I thought this might be a side-effect; Buffer objects are typically created by calling BufferAlloc, but can also be returned by FileRead with the "RAW" option. But this doesn't w...
- 28 Jan 2021, 19:37
- Forum: Ask for Help (v2)
- Topic: FileRead function parameters *must* be in parenthesis
- Replies: 4
- Views: 583
FileRead function parameters *must* be in parenthesis
e.g. must be FileRead(filenameVar), not FileRead filenameVar.
- 28 Jan 2021, 14:33
- Forum: Ask for Help (v2)
- Topic: RegEx works in v1 but not v2 Topic is solved
- Replies: 8
- Views: 2153
Re: RegEx works in v1 but not v2 Topic is solved
@HotKeyIt Thanks for sorting out the quoting/escaping issue, but I notice that v2 requires the single-line modifier, whereas it wasn't required in v1, not in the above demo at least.
- 28 Jan 2021, 11:59
- Forum: Ask for Help (v2)
- Topic: RegEx works in v1 but not v2 Topic is solved
- Replies: 8
- Views: 2153
Re: RegEx works in v1 but not v2 Topic is solved
@HotKeyIt & @swagfag
I'm unable to test in the original script as I'm still working through other changes needed, but neither suggestion works for the simplified demo I included.
I'm unable to test in the original script as I'm still working through other changes needed, but neither suggestion works for the simplified demo I included.
- 28 Jan 2021, 10:35
- Forum: Ask for Help (v2)
- Topic: RegEx works in v1 but not v2 Topic is solved
- Replies: 8
- Views: 2153
Re: RegEx works in v1 but not v2 Topic is solved
A simplified demo to return "line3" "line5" . multiLineVar := " (LTrim line0 ""line1"" line2 ""line3"" line4 ""line5"" line6 )" RegEx := ".*(?<=\n""line1"").*?(""line3"").*?(""line5"").*" result := RegExReplace(multiLineVar, RegEx, "$1 $2") MsgBox %result% ;v1 ;MsgBox result ;v2
- 28 Jan 2021, 08:47
- Forum: Ask for Help (v2)
- Topic: RegEx works in v1 but not v2 Topic is solved
- Replies: 8
- Views: 2153
Re: RegEx works in v1 but not v2 Topic is solved
The Substitution demonstrates the goal of the RegExReplace.
https://regex101.com/r/UxR5cn/1
https://regex101.com/r/UxR5cn/1
- 28 Jan 2021, 08:24
- Forum: Ask for Help (v2)
- Topic: RegEx works in v1 but not v2 Topic is solved
- Replies: 8
- Views: 2153
RegEx works in v1 but not v2 Topic is solved
This regular expression works in a v1 RegExReplace but not in v2 - any pointers as to what's wrong please? Error: Missing space or operator before this. Specifically: "configuration"").*,?("".*?\.executePath"": ).*?(""C:.*?" var "(.*?)?\.exe"").*" ---> 063: RegEx := ".*(?<=\n\t{2}""configuration"")....
- 11 Dec 2020, 12:42
- Forum: Ask for Help (v1)
- Topic: Hide command console when using RunWaitOne() example Topic is solved
- Replies: 34
- Views: 4295
Re: Hide command console when using RunWaitOne() example Topic is solved
Yes, I notice I get a list of Chinese characters if I try using sOutput .= stdOut := StrGet(&sTemp, nSize)teadrinker wrote: ↑11 Dec 2020, 12:22In some cases the encoding other than CP0 must be specified, so this parameter can be necessary.
Thank you.
- 11 Dec 2020, 12:08
- Forum: Ask for Help (v1)
- Topic: Hide command console when using RunWaitOne() example Topic is solved
- Replies: 34
- Views: 4295
Re: Hide command console when using RunWaitOne() example Topic is solved
No, all what you can remove are the callBackFuncObj := "" parameter and the line ( callBackFuncObj && callBackFuncObj.Call(stdOut) ) . But, I also find that removing the encoding parameter and making this change sOutput .= stdOut := StrGet(&sTemp, nSize, "CP0") ; or even providing an empty string, ...
- 11 Dec 2020, 11:34
- Forum: Ask for Help (v1)
- Topic: Hide command console when using RunWaitOne() example Topic is solved
- Replies: 34
- Views: 4295
Re: Hide command console when using RunWaitOne() example Topic is solved
You can just save what CmdRet() returns in a variable. Yes I understand, but I found the function still serves my purpose when removing the optional parameters and replacing ( callBackFuncObj && callBackFuncObj.Call(stdOut) ) with ( "" && "".Call(stdOut) ) So, not fully understanding exactly what t...
- 11 Dec 2020, 09:38
- Forum: Ask for Help (v1)
- Topic: Hide command console when using RunWaitOne() example Topic is solved
- Replies: 34
- Views: 4295
Re: Hide command console when using RunWaitOne() example Topic is solved
BoBo Including DllCall("AllocConsole") and WinHide % "ahk_id " DllCall("GetConsoleWindow", "ptr") in the function, greatly reduces the duration the console is displayed but doesn't fully hide it. teadrinker While this does hide he console, I don't need the content of sOutput to be displayed in a me...
- 10 Dec 2020, 11:35
- Forum: Ask for Help (v1)
- Topic: Hide command console when using RunWaitOne() example Topic is solved
- Replies: 34
- Views: 4295
Re: Hide command console when using RunWaitOne() example Topic is solved
@BoBo Thanks, I'll see if I can adapt.
- 10 Dec 2020, 11:23
- Forum: Ask for Help (v1)
- Topic: Hide command console when using RunWaitOne() example Topic is solved
- Replies: 34
- Views: 4295
Hide command console when using RunWaitOne() example Topic is solved
Following the example given in the documentation , this code works for me but I can't figure where to include the Hide parameter to prevent the command console from appearing. MsgBox % RunWaitOne("Code --list-extensions") RunWaitOne(command) { shell := ComObjCreate("WScript.Shell") exec := shell.Exe...
- 15 Nov 2020, 10:49
- Forum: Visual Studio Code
- Topic: new vscode extension allows advanced AHK V1/V2 debugging
- Replies: 70
- Views: 38137
Re: new vscode extension allows advanced AHK V1/V2 debugging
It's a bit slower because it navigates the entire Acc object structure until it finds the element that contains the Ln/Col info. Wow, I see what you mean :lol: --------------------------- temp-2020-11-15-15-41-45.ahk --------------------------- TickCount = 2093 Pos = 4,75 --------------------------...