Search found 3595 matches

by jeeswg
Today, 15:28
Forum: Ask For Help
Topic: RegEx issue. Of course.... Topic is solved
Replies: 13
Views: 208

Re: RegEx issue. Of course.... Topic is solved

- I've added a bit more to my 'GET ALL MATCHES' section here: jeeswg's RegEx tutorial (RegExMatch, RegExReplace) - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=7&t=28031 - For the original question, here's a RegExMatch with while loop example, but also a StrSplit example. I...
by jeeswg
Today, 13:32
Forum: Ask For Help
Topic: #SingleInstance, Force = what is it
Replies: 8
Views: 66

Re: #SingleInstance, Force = what is it

You can trigger a hotkey in one script, and get that to trigger other scripts. #SingleInstance, off OnMessage(0x5555, "MsgMonitor") x:: ;one script to trigger them all DetectHiddenWindows, On WinGet, vWinList, List, % A_ScriptFullPath " - AutoHotkey v ahk_class AutoHotkey" Loop, ...
by jeeswg
Today, 12:28
Forum: Ask For Help
Topic: A problem about filling an array in excel
Replies: 2
Views: 20

Re: A problem about filling an array in excel

Here are some approaches for specifying a column number of 27 (AA) or greater. q:: ;excel - specify range using column numbers instead of letters oXl := ComObjCreate("Excel.Application") oXl.Visible := -1 ;True oXl.Workbooks.Add ;for oCell in oXl.Range("A1:E10") ;for oCell in oXl...
by jeeswg
Today, 09:08
Forum: Ask For Help
Topic: Replacing any substring between two characters Topic is solved
Replies: 5
Views: 61

Re: Replacing any substring between two characters Topic is solved

An alternative using a character class, and a variant of Odlanir's code using '.*?' instead of 'U)' and '.*'. q:: ;replace '_:\___\' String := "abc C:\Dir1\cdfgh hij D:\Dir2\jklmn nopq" Repla := "X:\Dirr\" MsgBox, % String "`r`n`r`n" RegExReplace(String, "[A-Za-z]:...
by jeeswg
Yesterday, 12:51
Forum: Ask For Help
Topic: RegEx to Match Expression With Quotation Marks
Replies: 19
Views: 361

Re: RegEx to Match Expression With Quotation Marks

- One concern is, if this is from the YouTube API for example, that there could be multiple lines containing 'publishedAt', so you could end up retrieving text from the wrong line. This is why going down the JSON route is a good idea. - JSON is a bit like the ini format, for storing data, but it can...
by jeeswg
Yesterday, 12:29
Forum: Ask For Help
Topic: convert common date formats (Excel / FileTime / Unix)
Replies: 1
Views: 29

convert common date formats (Excel / FileTime / Unix)

- I've written some functions for converting common date formats: Excel: days since 1900 FileTime: 100-nanosecond intervals since 1601 Unix: seconds since 1970 - I'm posting here in case anyone has any other suggestions for common date formats. - At the moment, it's not entirely clear whether any sp...
by jeeswg
Yesterday, 09:59
Forum: Ask For Help
Topic: export excel cell as pic
Replies: 7
Views: 120

Re: export excel cell as pic

- This is really great @FanaticGuru, thanks for sharing. - I tested the technique on my script above, and thought I might as well share the new-look script. The borders, in the image you get using Excel directly, look slightly different. AFAICS the Gdip approach gives you a slightly cleaner image. q...
by jeeswg
Yesterday, 07:00
Forum: Tutorials
Topic: jeeswg's benchmark tests
Replies: 55
Views: 1921

Re: jeeswg's benchmark tests

- I'd be interested in any benchmark tests re. optimising DllCall results, e.g. specifying dll name or not, specifying .dll or not, specifying W/A or not, using Int or "Int" and anything else. I haven't been able to get any clear-cut results so far. - The documentation does mention about u...
by jeeswg
Yesterday, 06:24
Forum: Ask For Help
Topic: function removes all symbolic links (like '\..\'
Replies: 2
Views: 48

Re: function removes all symbolic links (like '\..\'

Here's some RegEx code which is similar to yours, and an example with A_LoopFileLongPath. Btw is it just '\..\' or are there other things that need to be handled? ;replace '\Subfolder\..\' with '\' ;C:\Users\me\AppData\Roaming\..\..\Documents ; ------------ ;C:\Users\me\AppData\..\Documents ; ------...
by jeeswg
Yesterday, 03:29
Forum: Gaming
Topic: Keyboard no responding after using ahk for a while.
Replies: 2
Views: 25

Re: Keyboard no responding after using ahk for a while.

- Do you use BlockInput in your script anywhere? Or any other command that could have an effect? - Does the mouse work? - Does Ctrl+Alt+Del work? - Does closing the script via Task Manager work? - What Windows version is it? To show the Command Line column in Task Manager: if the Command Line column...
by jeeswg
23 Feb 2018, 22:25
Forum: Wish List
Topic: Stringleft, stringright and substr: ALLOW PAD string
Replies: 6
Views: 127

Re: Stringleft, stringright and substr: ALLOW PAD string

- @kczx3: I agree, although with a good list of examples, I don't think it's too bad. See 'FORMAT FUNCTION EXAMPLES' here: jeeswg's characters tutorial - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=7&t=26486&p=124372#p124372 - The key things to be aware of are: (1) eac...
by jeeswg
23 Feb 2018, 13:24
Forum: Ask For Help
Topic: Display Array element in MsgBox
Replies: 5
Views: 82

Re: Display Array element in MsgBox

How about this? q:: ;remove semicolons from strings Voornaam := "Jo;hn" Achternaam := "Doe" Status := "Bla" EditList := "Voornaam,Achternaam,Status" Loop, Parse, EditList, % "," %A_LoopField% := StrReplace(%A_LoopField%, ";") MsgBox, % Voor...
by jeeswg
23 Feb 2018, 09:50
Forum: AutoHotkey v2 Development
Topic: if var in/contains comma-separated list/array
Replies: 16
Views: 405

Re: if var in/contains comma-separated list/array

- Regarding: v2-thoughts https://autohotkey.com/v2/v2-thoughts.htm >>> Re. an array on the left-hand side. Perhaps this, the following two lines would be equivalent: vCount := ([a,b] contains [c,d]) vCount := (a contains [c,d]) + (b contains [c,d]) - So if oArrayA contains oArrayB would be equivalen...
by jeeswg
23 Feb 2018, 06:36
Forum: Ask For Help
Topic: Display Array element in MsgBox
Replies: 5
Views: 82

Re: Display Array element in MsgBox

This should cover the essentials. q:: ;arrays and keys oArray := ["a", "b", "c"] MsgBox, % oArray.2 oArray := StrSplit("a,b,c", ",") MsgBox, % oArray.2 var1 := "a", var2 := "b", var3 := "c" oArray := [var1, var2, var3] M...
by jeeswg
23 Feb 2018, 05:01
Forum: Ask For Help
Topic: Detecting window styles with bitwise-and Topic is solved
Replies: 10
Views: 129

Re: Detecting window styles with bitwise-and Topic is solved

Some info: ;incorrect, this will return true if *either* 0x800000 or 0x400000 is present if (StyleToCheck & 0xC00000) ;both of these should work if (StyleToCheck & 0x800000) && (StyleToCheck & 0x400000) if (StyleToCheck & 0xC00000 = 0xC00000) ;let's say every style was on ;th...
by jeeswg
23 Feb 2018, 02:38
Forum: Ask For Help
Topic: Detecting window styles with bitwise-and Topic is solved
Replies: 10
Views: 129

Re: Detecting window styles with bitwise-and Topic is solved

Summary: (cond) && (action) ;valid in AHK v1/v2 (cond) ? (action) : 0 ;valid in AHK v1/v2 (cond) ? (action) ;works in AHK v1 (but not really valid), invalid in /v2 Explaining the magic. One thing you likely know, which is mentioned in the documentation, but which I'll mention anyway. Fundame...
by jeeswg
23 Feb 2018, 01:55
Forum: Ask For Help
Topic: Toggle the Doc Switcher in Notepad++
Replies: 2
Views: 44

Re: Toggle the Doc Switcher in Notepad++

Here's a way. You may like to look at the documentation for WinWaitActive, in case you want to add a timeout. I used the fact that, almost always, each menu item has a fixed menu item ID. q:: ;Notepad++ - hide/show Doc Switcher PostMessage, 0x111, 48011,,, A ;WM_COMMAND := 0x111 ;Preferences... WinW...
by jeeswg
23 Feb 2018, 01:37
Forum: Ask For Help
Topic: Detecting window styles with bitwise-and Topic is solved
Replies: 10
Views: 129

Re: Detecting window styles with bitwise-and Topic is solved

- The simple answer to your original question is: if (StyleToCheck & 0xC00000 = 0xC00000) - The code I used is of the form: (cond) && (action) If cond is true then action occurs. If cond is false then action does not occur. - Alternatively, an equivalent ternary operator:...
by jeeswg
22 Feb 2018, 21:22
Forum: Ask For Help
Topic: Coding style: Quotes around numeric values of variables
Replies: 6
Views: 112

Re: Coding style: Quotes around numeric values of variables

- For your example, mm = 1, I wouldn't use quotes. Although mm = "1", would also work in that particular example. - Here's an example where quotes matter. If at least one item has double quotes, or string content that doesn't look numeric, a string comparison is done. q:: ;text compare num...

Go to advanced search