Search found 6553 matches

by jeeswg
Today, 00:35
Forum: AutoHotkey v2 Help
Topic: objects: override __Item: raw get/set
Replies: 0
Views: 45

objects: override __Item: raw get/set

- I've been experimenting with the new objects suite. It appears to have everything I need apart from an equivalent to AHK v1's ObjRawGet/ObjRawSet for setting keys. - Anyhow, I've come up with a workaround, I'm posting in case anyone has any suggestions/alternatives. - Btw is there any (other) AHK ...
by jeeswg
Yesterday, 18:58
Forum: Offtopic
Topic: Expert Challenge: Get width and height from an image file reading as few bytes as possible.
Replies: 25
Views: 1320

Re: Expert Challenge: Get width and height from an image file reading as few bytes as possible.

Thanks for adding webp support. Much appreciated. Re. icons. The easiest to get should be default. But max (and perhaps min) seem like good options. Re. jxr: - The jxr/wdp (JPEG XR) format seems to be the standard for (amongst others): telegraph.co.uk and washingtonpost.com (at least on Internet Exp...
by jeeswg
Yesterday, 18:53
Forum: Ask For Help
Topic: animated gifs: binary data
Replies: 0
Views: 70

animated gifs: binary data

- I was interested in the structure of binary data for animated gifs. - E.g. to get 'is animated' and 'frame count' info. - E.g. to create animated gifs via AutoHotkey, from bmp/png files. - So I'm posting here in case anybody has any good links re. gif files. (I did look in the past.) - I did some ...
by jeeswg
Yesterday, 18:17
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 588
Views: 130045

Re: Suggestions on documentation improvements

CONTROL FLOW STATEMENTS: CASE? DEFAULT? 'Switch' is a CFS. The documentation should state if 'case'/'default' are/aren't CFSes. (And if not, what sort of thing they are.) This could be mentioned in one or both of: Switch https://www.autohotkey.com/docs/commands/Switch.htm Concepts and Conventions | ...
by jeeswg
Yesterday, 15:18
Forum: Ask For Help
Topic: RegEx: get first n characters of first line
Replies: 3
Views: 199

Re: RegEx: get first n characters of first line

Great use of (?s). Cheers. (The 's)' option affects the whole string, but (?s) only affects characters to its right.) Regular Expressions (RegEx) - Quick Reference | AutoHotkey https://www.autohotkey.com/docs/misc/RegEx-QuickRef.htm s DotAll. This causes a period (.) to match all characters includin...
by jeeswg
Yesterday, 13:39
Forum: Ask For Help
Topic: RegEx: get first n characters of first line
Replies: 3
Views: 199

RegEx: get first n characters of first line

- I've written a RegEx one-liner to get the first 10 characters of the first line. I'm posting in case anybody has any other ideas. - I've also demonstrated a simpler example, which gets the first line, and then gets the first 10 characters. - [EDIT:] I've added an example, appending '...', only if ...
by jeeswg
Yesterday, 12:47
Forum: Ask For Help
Topic: How do I make Acc.ahk do a basic action like clicking?
Replies: 3
Views: 151

Re: How do I make Acc.ahk do a basic action like clicking?

- You appear to be doing the right things. Here are some ideas using Notepad's Find dialog as an example: - I would use accName/accValue/Acc_Location, to check that I've got the right element. - I would use JEE_AccGetTextAll to list all elements, and to list the correct Acc paths (AccViewer doesn't ...
by jeeswg
Yesterday, 04:06
Forum: Ask For Help
Topic: Round off variables to whole integers
Replies: 4
Views: 207

Re: Round off variables to whole integers

There's also //, but check the documentation, for how it handles negative numbers.
Variables and Expressions - Definition & Usage | AutoHotkey
https://www.autohotkey.com/docs/Variables.htm#MulDiv

Code: Select all

MsgBox, % 3/2 ;1.5
MsgBox, % 3//2 ;1
by jeeswg
Yesterday, 03:30
Forum: Ask For Help
Topic: System macro not working on AutoHotkey v1.1+ x64 Topic is solved
Replies: 11
Views: 476

Re: System macro not working on AutoHotkey v1.1+ x64 Topic is solved

- @jballi: I agree with what you're saying about quirky things in AutoHotkey. - Anything quirky is a good candidate for comments / a separate function. - Although, in this case, this kind of bitshift and bitwise-and/bitwise-or algorithm, is what you often see in other programming languages. ;LoadPic...
by jeeswg
21 Aug 2019, 02:04
Forum: Ask For Help
Topic: Not Working StrReplace Topic is solved
Replies: 5
Views: 123

Re: Not Working StrReplace Topic is solved

I might do something like this: q:: ;replace characters (strip accents) vText := "AĞŞAMÇAçaÜüiIöÖ" vList := "Çc,çc,İi,ıi,Şs,şs,Ğg,ğg,Öo,öo,Üu,üu" StringCaseSense, On Loop Parse, vList, % "," { vChar1 := SubStr(A_LoopField, 1, 1) vChar2 := SubStr(A_LoopField, 2, 1) vText := StrReplace(vText, StrUpper...
by jeeswg
20 Aug 2019, 21:55
Forum: Ask For Help
Topic: System macro not working on AutoHotkey v1.1+ x64 Topic is solved
Replies: 11
Views: 476

Re: System macro not working on AutoHotkey v1.1+ x64 Topic is solved

Hmm. :think: Reversing the bytes in a UInt64 / Int64. I knew that Format can do Int64 to UInt64. But it seems it cannot do UInt64 to Int64. So NumPut/NumGet is needed. If you do bitshift-right on a negative number, it fills in all the initial bits with 1s. And so if you read that number as a positiv...
by jeeswg
20 Aug 2019, 20:11
Forum: Ask For Help
Topic: Shortcuts for launching programs
Replies: 6
Views: 138

Re: Shortcuts for launching programs

- I have some ideas for exe name to path, here: Best way to get the path to an executable - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=5&t=36484&p=168051#p168051 - I demonstrate using 'HKEY_CLASSES_ROOT\Applications', below: - However, you can usually just specify the exe nam...
by jeeswg
20 Aug 2019, 18:46
Forum: Ask For Help
Topic: System macro not working on AutoHotkey v1.1+ x64 Topic is solved
Replies: 11
Views: 476

Re: System macro not working on AutoHotkey v1.1+ x64 Topic is solved

See: LoadPicture() from variable - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=5&t=39002&p=181321#p181321 And here: best utilities + best AutoHotkey scripts (+ useful tips) - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=7&t=28149 [ list all of the functio...
by jeeswg
20 Aug 2019, 16:54
Forum: AutoHotkey v2 Help
Topic: [a104] are builtin classes protected against accidental overwriting? Topic is solved
Replies: 9
Views: 207

Re: [a104] are builtin classes protected against accidental overwriting? Topic is solved

- Potentially you could call %func%() with Array/Object/custom function MyArray etc, depending on the situation. - There's also ease of conversion, if another language has a similar function. - You might commonly interchange between Array/MyArray in quick scripts, or modify the existing Array functi...
by jeeswg
20 Aug 2019, 13:35
Forum: Ask For Help
Topic: Can AHK do this?
Replies: 3
Views: 124

Re: Can AHK do this?

- When you press the keys, see if they appear in the key history. If they do, you may be able to create hotkeys for them. See the code below. - The key history is accessible via the KeyHistory command and via: right-click the AHK tray icon, Open, View, Key history and script info - (Very often, Fn w...
by jeeswg
18 Aug 2019, 23:49
Forum: AutoHotkey v2 Development
Topic: Map shorthand
Replies: 19
Views: 593

Re: Map shorthand

For readability and avoiding pressing " too many times: oMap := StrSplitMap("key1,value1,key2,value2,key3,value3", ",") oMap := StrSplitMap("1,1,2,2,3,3", ",") oMap := StrSplitMap("1.0,1.0,2.0,2.0,3.0,3.0", ",") vOutput := "" for vKey, vValue in oMap vOutput .= vKey " " vValue " " Type(vKey) " " Typ...
by jeeswg
18 Aug 2019, 18:44
Forum: AutoHotkey v2 Development
Topic: commands as functions (AHK v2 functions for AHK v1)
Replies: 72
Views: 11515

Re: commands as functions (AHK v2 functions for AHK v1)

Re.:
AutoHotkey v2 alpha (UPDATES) - Page 3 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=37&t=2120&p=288705#p288705

Code: Select all

Map(Params*)
{
	if (Params.Length() & 1)
		throw Exception("Invalid number of parameters.", -1)
	return Object(Params*)
}
by jeeswg
18 Aug 2019, 13:08
Forum: AutoHotkey v2 Development
Topic: AHK Unit Testing
Replies: 3
Views: 153

Re: AHK Unit Testing

I've shared some test code, here. (At some point I plan to create a variant that doesn't need the user to monitor it.)
commands as functions (AHK v2 functions for AHK v1) - Page 2 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=37&t=29689&p=210822#p210822
by jeeswg
16 Aug 2019, 15:04
Forum: Ask For Help
Topic: Cast COM Object IWebBrowser2 to IServiceProvider
Replies: 3
Views: 250

Re: Cast COM Object IWebBrowser2 to IServiceProvider

Great info, thanks for sharing! For the current Internet Explorer tab: ;WBGet function - AutoHotkey Community ;https://autohotkey.com/boards/viewtopic.php?f=6&t=39869 q:: ;internet explorer - get tab hWnd (TabWindowClass hWnd) WinGet, hWnd, ID, A oWB := WBGet("ahk_id " hWnd) IID_IServiceProvider := ...
by jeeswg
16 Aug 2019, 13:53
Forum: Ask For Help
Topic: I want to overlay a different time zone versus my system time zone in bottom-right clock
Replies: 1
Views: 166

Re: I want to overlay a different time zone versus my system time zone in bottom-right clock

Multiple (digital) clocks for different countries, that update simultaneously:
get DST (daylight-saving time) start/end dates/times in UTC - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=28355&p=162191#p162191
Cheers.

Go to advanced search