Search found 5555 matches

by jeeswg
Today, 16:53
Forum: Ask For Help
Topic: RunWaitOne error: 0x80070057 - The parameter is incorrect
Replies: 17
Views: 297

Re: RunWaitOne error: 0x80070057 - The parameter is incorrect

You could try this as a test. Cheers.

Code: Select all

EnvGet, vComSpec, ComSpec
MsgBox, % vComSpec
And you check environment variables manually, here:

Code: Select all

Run, % "control sysdm.cpl,,3" ;System Properties, Advanced tab ;(e.g. Environment Variables)
by jeeswg
Today, 01:26
Forum: Ask For Help
Topic: an Array of "ClipboardAll" contents Topic is solved
Replies: 32
Views: 637

Re: an Array of "ClipboardAll" contents Topic is solved

- It would seem logical a ? b , for an if-statement with no else alternative. - Has there ever been a language that allowed it? - But since AHK v1 can't actually handle it, ideally it should raise an error before the script begins. (It already does in AHK v2.) - It seems like the best thing to do wo...
by jeeswg
Yesterday, 14:43
Forum: Offtopic
Topic: The Future of AutoHotkey (AutoHotkey: major new features)
Replies: 6
Views: 1055

Re: The Future of AutoHotkey (AutoHotkey: major new features)

- @Guest: So what happened with AutoIt, is it still being developed? - I always thought that if that happened, the users might move on over to AutoHotkey. - I started learning AutoIt, and have considered writing wrappers/translators to make it easier for AutoIt users to move over. Although I would b...
by jeeswg
Yesterday, 10:39
Forum: Ask For Help
Topic: Condensing Autohotkey Code
Replies: 14
Views: 204

Re: Condensing Autohotkey Code

I find Allman style the clearest. Loop { if (X = 0) { try { Xl := ComObjActive("Excel.Application") Xl.Worksheets(A_Index).Activate Xl.ActiveSheet.Range("A1").Select } catch e { MsgBox Finished break } } else if (X != 0) MsgBox Operation Failed } Adding commas here might be faster. try { Xl := ComOb...
by jeeswg
Yesterday, 10:29
Forum: Ask For Help
Topic: an Array of "ClipboardAll" contents Topic is solved
Replies: 32
Views: 637

Re: an Array of "ClipboardAll" contents Topic is solved

All 4 should work in AHK v1 and v2.

Code: Select all

if (k > clipArr.MaxIndex())
	k := 1
    (k > clipArr.MaxIndex() && k := 1)
;    k > clipArr.MaxIndex() ? (k := 1) : "" ;doesn't work in AHK v2
    (k > clipArr.MaxIndex()) ? (k := 1) : ""
k := k > clipArr.MaxIndex() ? 1 : k
by jeeswg
13 Jan 2019, 21:46
Forum: Tips and Tricks
Topic: list of structs with parameters (sizes and types)
Replies: 18
Views: 3725

Re: list of structs with parameters (sizes and types)

- I've overhauled the struct list in the OP.
- The number of structs has been increased from 98 to 141.
- The structs mentioned by Drugwash and just me have been added.
- Previously incomplete structs have been fixed.
- 8 structs have queries, please see any instances of '[CHECK]'. Thanks.
by jeeswg
12 Jan 2019, 19:59
Forum: Scripts and Functions
Topic: Internet Explorer: JavaScript examples
Replies: 18
Views: 692

Re: Internet Explorer: JavaScript examples

- @rommmcek and @burque505: I've never really looked at devicePixelRatio. - The only thing I've been interested in re. zooms etc was to get the Internet Explorer 'View, Zoom' value, which I did like so: ;Internet Explorer get/set zoom/text size - AutoHotkey Community ;https://autohotkey.com/boards/v...
by jeeswg
12 Jan 2019, 15:27
Forum: Scripts and Functions
Topic: Internet Explorer: JavaScript examples
Replies: 18
Views: 692

Re: Internet Explorer: JavaScript examples

- That's great. - You could try clicking on the child nodes or parent/ancestor nodes. E.g. oElts := oElt.childNodes Loop, % oElts.length oElts[A_Index-1].click() oElt.parentNode.click() oElt.parentNode.parentNode.click() oElt.parentNode.parentNode.parentNode.click() - It may be that click doesn't wo...
by jeeswg
12 Jan 2019, 10:09
Forum: Ask For Help
Topic: structs: unions
Replies: 2
Views: 136

Re: structs: unions

The size of a union is the size of its largest member and its alignment must be the alignment of its member with the highest alignment.
Thanks a lot Helgef, this is a great description of the situation, and matches what I suspected. Do you have a source re. the alignment part? Thanks.
by jeeswg
11 Jan 2019, 23:21
Forum: Ask For Help
Topic: structs: unions
Replies: 2
Views: 136

structs: unions

- Here is a definition of a union. Unions | Microsoft Docs https://docs.microsoft.com/en-us/cpp/cpp/unions?view=vs-2017 A union is a user-defined type in which all members share the same memory location. This means that at any given time a union can contain no more than one object from its list of m...
by jeeswg
11 Jan 2019, 22:33
Forum: Scripts and Functions
Topic: Internet Explorer: JavaScript examples
Replies: 18
Views: 692

Re: Internet Explorer: JavaScript examples

- Thanks for all the responses, all from users that I really appreciate, making it all the more meaningful. (@A_AhkUser: getAttribute is thanks to you, and you've helped me a lot with JavaScript queries!) (@SKAN: Thanks for your functions!) (@rommmcek: MIDI master!) (Thanks burque505, CyL0N and elmo...
by jeeswg
11 Jan 2019, 19:58
Forum: Ask For Help
Topic: How to get window client area pos? (x y width height)
Replies: 5
Views: 117

Re: How to get window client area pos? (x y width height)

- Every script I write should work in both x64 and x32, otherwise there would be a bug of some kind.
- I tested the function just now and it worked in both.
by jeeswg
11 Jan 2019, 18:33
Forum: Ask For Help
Topic: How to get window client area pos? (x y width height)
Replies: 5
Views: 117

Re: How to get window client area pos? (x y width height)

WinGetClientPos. Cheers.
commands as functions (AHK v2 functions for AHK v1) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=29689
by jeeswg
10 Jan 2019, 17:36
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 490
Views: 93859

Re: Suggestions on documentation improvements

- The DllCall page is a bit vague about the Float and Double types. DllCall() - Syntax & Usage | AutoHotkey https://autohotkey.com/docs/commands/DllCall.htm#types - It could probably be more specific cf. this link re. AHK's native floating-point format, which mentions binary64 and IEEE 754. Concepts...
by jeeswg
08 Jan 2019, 15:52
Forum: Ask For Help
Topic: DllCall: Cdecl
Replies: 13
Views: 850

Re: DllCall: Cdecl

- These 2 videos, particularly the latter, address cdecl v. stdcall. 005 Calling Conventions Part 1 - YouTube https://www.youtube.com/watch?v=BM1aIq-SPDU 006 Calling Conventions Part 2 - YouTube https://www.youtube.com/watch?v=OQ2iBks7Lyo - To clarify the answers to my questions: - When using DllCal...
by jeeswg
08 Jan 2019, 10:06
Forum: Ask For Help
Topic: Regular question Topic is solved
Replies: 3
Views: 104

Re: Regular question Topic is solved

Consider examples 1 and 3. Perhaps that will clarify the situation. Otherwise, I'll explain in full at a future point.

Code: Select all

RegExMatch(str, "\d(?=\s*)$", r) ;example 1
RegExMatch(str, "\d(?=\s*$)", r) ;example 2
RegExMatch(str, "\d$", r) ;example 3
by jeeswg
08 Jan 2019, 09:21
Forum: Ask For Help
Topic: split long lines in runwait command
Replies: 2
Views: 54

Re: split long lines in runwait command

The issue could be which join string the continuation section is using. The default is LF (linefeed) not a blank string. You can assign a continuation section to a variable, and check what you've written via MsgBox. Cheers. Scripts - Definition & Usage | AutoHotkey https://autohotkey.com/docs/Script...
by jeeswg
06 Jan 2019, 13:40
Forum: Ask For Help
Topic: Is "1 << 112" too big?
Replies: 12
Views: 333

Re: Is "1 << 112" too big?

AHK can handle 1 << 0 to 1 << 63. I got a value of 0 when I tried 1 << 112. Cheers. q:: ;bitshift left ;AHK can handle numbers from -9223372036854775808 (-0x8000000000000000) to 9223372036854775807 (0x7FFFFFFFFFFFFFFF) ;although if you interpret negative numbers as positive it can handle numbers fro...
by jeeswg
05 Jan 2019, 20:58
Forum: Offtopic
Topic: principles of programming
Replies: 3
Views: 131

Re: principles of programming

HIGHLIGHTING/AUTOCOMPLETE, ERRORS, EDITORS - Hello nnnik. In theory custom/built-in autocomplete drop-down lists could be useful, and I've experimented with them, but I've always found hotstrings easier/faster. - I've tried syntax highlighting, but I've never found it particularly helpful, and I've ...
by jeeswg
05 Jan 2019, 19:14
Forum: Offtopic
Topic: principles of programming
Replies: 3
Views: 131

principles of programming

- I tried to collect all of the general principles that I've acquired over time, that would have been useful to know when I started programming. - I started a txt file, added ideas to it every so often, then I felt I had enough material to shape into a document, the difficulty came in figuring out h...

Go to advanced search