Search found 6449 matches

by jeeswg
24 Jun 2019, 04:58
Forum: Ask For Help
Topic: Basic question about the string terminator in ahk Topic is solved
Replies: 22
Views: 1002

Re: Basic question about the string terminator in ahk Topic is solved

- @Helgef: Have you ever wanted/asked for any documentation improvements? Note that the String parameter of StrPut and return value of StrGet are always in the native encoding of the current executable, whereas Encoding specifies the encoding of the string written to or read from the given Address. ...
by jeeswg
23 Jun 2019, 16:03
Forum: Ask For Help
Topic: Get a control position on screen Topic is solved
Replies: 5
Views: 271

Re: Get a control position on screen Topic is solved

You could get the control's hWnd, and pass that to WinGetPos.

Code: Select all

q:: ;control get screen coordinates
ControlGet, hCtl, Hwnd,, Button1, A
WinGetPos, vWinX, vWinY, vWinW, vWinH, % "ahk_id " hCtl
MsgBox, % Format("x{} y{} w{} h{}", vWinX, vWinY, vWinW, vWinH)
return
by jeeswg
23 Jun 2019, 13:25
Forum: Ask For Help
Topic: USB mouse stops working after hibernating PC
Replies: 1
Views: 202

Re: USB mouse stops working after hibernating PC

- One issue I had, was that there were 2 devices called 'USB Input Device', that could be disabled/enabled. - I found unique info to distinguish between the 2 devices in Device Manager via: right-click USB Input Device Properties, Details tab Hardware Ids (drop-down menu option) - Once I had enough ...
by jeeswg
23 Jun 2019, 08:15
Forum: Scripts and Functions
Topic: close windows on script exit/reload
Replies: 8
Views: 501

close windows on script exit/reload

Some code to defer closing a window until the script is exited/reloaded. Do share any comments or notify of any other similar scripts. Thanks. q:: ;test defer window close (this adds a window to a list, to be closed on script exit/reload) WinGet, hWnd, ID, ahk_class Notepad WinCloseOnExit(hWnd) retu...
by jeeswg
23 Jun 2019, 04:58
Forum: Ask For Help
Topic: Default startup code - what should I include?
Replies: 2
Views: 213

Re: Default startup code - what should I include?

There is some information here:
#directive list anywhere? - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=61114
by jeeswg
22 Jun 2019, 05:29
Forum: Ask For Help
Topic: Timer when cursor inside GUI
Replies: 15
Views: 498

Re: Timer when cursor inside GUI

I'd summarise it like this. Cheers. typedef struct tagTRACKMOUSEEVENT { DWORD cbSize; DWORD dwFlags; HWND hwndTrack; DWORD dwHoverTime; } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT; 32-bit sizes: 4 + 4 + 4 + 4 = 16 64-bit sizes: 4 + 4 + 8 + 4(+4) = 24 [where '(+4)' is padding] 32-bit offsets: 0, 4, 8, 12 6...
by jeeswg
20 Jun 2019, 21:42
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 572
Views: 124074

Re: Suggestions on documentation improvements

STRPUT/STRGET - Under 'Encoding', for complete clarity, it should say something like: - If Encoding is not specified, it is UTF-16 (on Unicode versions) or CP0 (on ANSI versions). - More details, here: Basic question about the string terminator in ahk - AutoHotkey Community https://autohotkey.com/bo...
by jeeswg
20 Jun 2019, 21:37
Forum: Ask For Help
Topic: Basic question about the string terminator in ahk Topic is solved
Replies: 22
Views: 1002

Re: Basic question about the string terminator in ahk Topic is solved

- Thanks teadrinker, I've added a clarification above. - Here is a test demonstrating what happens when the Encoding parameter is omitted. - (I've read through the StrPut/StrGet documentation multiple times, but haven't noticed any other AHK v1.1 Unicode/ANSI differences.) q:: ;test StrGet/StrPut (A...
by jeeswg
20 Jun 2019, 20:22
Forum: Ask For Help
Topic: Basic question about the string terminator in ahk Topic is solved
Replies: 22
Views: 1002

Re: Basic question about the string terminator in ahk Topic is solved

- ANSI and UTF-8 use 1 null byte as the null character. - UTF-16 uses 2 null bytes (at an even offset) as the null character. - StrGet/StrPut should work identically on AHK v1.1 ANSI/AHK Unicode. [EDIT:] One exception is that when Encoding is omitted: it is UTF-16 in AHK Unicode, and CP0 in AHK ANSI...
by jeeswg
20 Jun 2019, 13:34
Forum: AutoHotkey v2 Development
Topic: commands as functions (AHK v2 functions for AHK v1)
Replies: 71
Views: 10584

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

- @Helgef: Unfortunately, your CallbackCreate/CallbackFree functions do need a fix. The functions should work, regardless of where they're placed. (AHK v2 behaviour should be replicated as far as possible.) - My edited quick fix is sufficient. - I will also review the use of 'static' in MsgBox and T...
by jeeswg
20 Jun 2019, 12:57
Forum: Scripts and Functions
Topic: WinClip - AHKv2 Compatibility
Replies: 17
Views: 1805

Re: WinClip - AHKv2 Compatibility

Btw a recent change to AHK v2:
AutoHotkey v2 alpha (UPDATES) - Page 3 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=37&t=2120&p=276644#p276644
Changed StrPut to return byte count rather than character count.
by jeeswg
20 Jun 2019, 06:35
Forum: Wish List
Topic: A_MajorAHKVersion
Replies: 9
Views: 1208

Re: A_MajorAHKVersion

For reference: Added A_AhkMajorVersion for v2 by nnnik · Pull Request #114 · Lexikos/AutoHotkey_L · GitHub https://github.com/Lexikos/AutoHotkey_L/pull/114 Added A_AhkMajorVersion by nnnik · Pull Request #115 · Lexikos/AutoHotkey_L · GitHub https://github.com/Lexikos/AutoHotkey_L/pull/115 v2-changes...
by jeeswg
20 Jun 2019, 06:12
Forum: AutoHotkey v2 Development
Topic: commands as functions (AHK v2 functions for AHK v1)
Replies: 71
Views: 10584

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

@lexikos: Thanks for the info. @Helgef: I had a problem with CallbackFree, here is the error message, and a quick fix: Warning in #include file "C:\Users\me\Desktop\JEEAHK1FC.ahk": This variable has not been assigned a value. Specifically: callback_cache (a static variable) ;modified line (before): ...
by jeeswg
19 Jun 2019, 08:56
Forum: Tutorials
Topic: jeeswg's dates tutorial
Replies: 0
Views: 214

jeeswg's dates tutorial

================================================== jeeswg's dates tutorial ================================================== CONTENTS AUTOHOTKEY FUNCTIONALITY INTRO EXCEL FUNCTIONALITY INTRO ADD/SUBTRACT: DATEADD / 'DATESUB' (DAYS/HOURS/MINUTES/SECONDS) ADD/SUBTRACT: YEARS ADD/SUBTRACT: MONTHS (EXC...
by jeeswg
19 Jun 2019, 04:34
Forum: Ask For Help
Topic: How to Remove Error pop-up’s?
Replies: 4
Views: 223

Re: How to Remove Error pop-up’s?

- For that particular example, you could create a normal label and use the Hotkey command, instead of using a hotkey label.
- That error looks a bit unusual, e.g. something you get if you try to run a UTF-8 script with no BOM. AHK requires a BOM for UTF-8/UTF-16 scripts.
by jeeswg
19 Jun 2019, 03:09
Forum: Forum Issues
Topic: jump within a post Topic is solved
Replies: 2
Views: 363

Re: jump within a post Topic is solved

Resolved here:
phpBB issues - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=3&t=61130&p=278941#p278941

Examples here:
Test your Forum Posts - Page 19 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=17&t=99&p=278940#p278940
by jeeswg
18 Jun 2019, 17:46
Forum: Offtopic
Topic: hello world automation on Linux/Mac/iOS/Android
Replies: 6
Views: 618

Re: hello world automation on Linux/Mac/iOS/Android

To reiterate the OP, I'm looking for info on the Linux/Apple/Google equivalents to the Windows API, as I don't use those systems. Info would be good, not even any code. E.g. how to: - get active window title - get active control text - send key presses - send clicks - detect key presses (to trigger ...
by jeeswg
18 Jun 2019, 17:32
Forum: Ask For Help
Topic: Scripts Consisting Of Thousands Of Lines
Replies: 5
Views: 309

Re: Scripts Consisting Of Thousands Of Lines

- In general, you can look for bits of repeated code, and separate those as functions. Normally this is a natural process, but for GUIs/long scripts, you could try extra hard to look for bits that could potentially be made into functions. - Also, I might add in good labelling, and barriers (e.g. I u...
by jeeswg
18 Jun 2019, 16:48
Forum: Ask For Help
Topic: RegEx lookbehind assertion question Topic is solved
Replies: 2
Views: 168

Re: RegEx lookbehind assertion question Topic is solved

You can try \K:

Code: Select all

q:: ;test RegExMatch \K
RegExMatch("abc,d", "O)a[^,]+,\K\w", oMatch)
MsgBox, % oMatch.0
RegExMatch("abc,d", "O)a[^,]+,(\w)", oMatch)
MsgBox, % oMatch.1
return
by jeeswg
17 Jun 2019, 00:27
Forum: Scripts and Functions
Topic: decimal time ('metric time')
Replies: 1
Views: 208

decimal time ('metric time')

;================================================== ;display decimal time ('metric time') and 24-hour time ;Decimal time - Wikipedia ;https://en.wikipedia.org/wiki/Decimal_time ;Decimal time is the representation of the time of day using units which are decimally related. ;This term is often used s...

Go to advanced search