Search found 3591 matches

by jeeswg
Yesterday, 12:51
Forum: Ask For Help
Topic: RegEx to Match Expression With Quotation Marks
Replies: 19
Views: 354

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: 53
Views: 1895

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

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

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

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

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...
by jeeswg
22 Feb 2018, 20:59
Forum: Ask For Help
Topic: Best way to find an executable
Replies: 4
Views: 72

Re: Best way to find an executable

- If it has a Start menu link, try searching in these folders: A_StartMenu A_StartMenuCommon - Some programs store their full paths in the registry: HKEY_CLASSES_ROOT\Applications HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths Best way to get the path to an executable - AutoH...
by jeeswg
22 Feb 2018, 20:48
Forum: Ask For Help
Topic: Get spreadsheet info
Replies: 2
Views: 73

Re: Get spreadsheet info

This should do it. It works on Internet Explorer. Cheers. q:: ;Internet Explorer - Google spreadsheet get text WinGet, hWnd, ID, A oWB := WBGet("ahk_id " hWnd) ;MsgBox, % oWB.document.getElementsByTagName("table").length oTable := oWB.document.getElementsByTagName("table&quo...
by jeeswg
22 Feb 2018, 20:04
Forum: Ask For Help
Topic: Hotkey for formulae with superscript
Replies: 2
Views: 42

Re: Hotkey for formulae with superscript

- There are two classic ways of doing superscript/subscript: text formatting (that you lose when you paste into Notepad), and hardcoded Unicode characters. I'm not sure how you would do this in Notepad++. - Btw sometimes I've wanted to do superscript and subscript numbers one on top of the other, bu...

Go to advanced search