Search found 106 matches

by Sam_
06 Feb 2019, 17:36
Forum: Ask For Help
Topic: help formatting DllCall to decorated function Topic is solved
Replies: 14
Views: 1062

Re: help formatting DllCall to decorated function Topic is solved

@Helgef
Thank you very much for your help! After studying your explanations and examples, I have been able to construct a good number of DllCalls on my own. Your sharing of knowledge has increased my own, and I sincerely thank you for it. I will look for a way to pay it forward.
by Sam_
04 Feb 2019, 21:36
Forum: Ask For Help
Topic: help formatting DllCall to decorated function Topic is solved
Replies: 14
Views: 1062

Re: help formatting DllCall to decorated function Topic is solved

Astr is clearly not right, that passes a pointer. You should do "uchar", asc("r"),... . The function returns a union, its size is 64 bits, but since it has constructors the caller must allocate memory and pass it on the stack after all parameters has been pushed. eg, varsetcapacity(PixelType, 8) Dl...
by Sam_
04 Feb 2019, 16:23
Forum: Ask For Help
Topic: help formatting DllCall to decorated function Topic is solved
Replies: 14
Views: 1062

help formatting DllCall to decorated function Topic is solved

The decorated function name is [email protected]@@[email protected]@Z When I run it through a demangler, the result is public: __cdecl pvrtexture::PixelType::PixelType(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char) Looking at...
by Sam_
01 Feb 2019, 09:26
Forum: Ask For Help
Topic: append callstack to handled and unhandled exceptions
Replies: 3
Views: 487

Re: append callstack to handled and unhandled exceptions

Using RHCP's classMemory , you can also load the source code from memory for a compiled script, even if it has been compressed with mpress. Adds a bit more utility. MsgBox % GetSourceCodeFromMemory() ExitApp GetSourceCodeFromMemory(){ ; Works even if exe is compressed with mpress If A_IsCompiled { m...
by Sam_
28 Nov 2018, 14:06
Forum: Ask For Help
Topic: append callstack to handled and unhandled exceptions
Replies: 3
Views: 487

Re: append callstack to handled and unhandled exceptions

I've been trying to improve my technique, and now use my own GUI to display the message to bypass the restrictions on the default MsgBox. Thanks to some clever code by garry, I can now also retrieve the line that threw the error regardless of whether or not the script is compiled (although you proba...
by Sam_
12 Nov 2018, 16:20
Forum: Scripts and Functions
Topic: ScriptInfo(): Get ListLines/ListVars/ListHotkeys/KeyHistory text
Replies: 17
Views: 4689

Re: ScriptInfo(): Get ListLines/ListVars/ListHotkeys/KeyHistory text

You can obtain the call stack whenever you want by calling Exception in a loop as demonstrated elsewhere. I'm sad to say this is news to me. Would you mind pointing me to some examples? Here is the post for v2 . It also contains a link too the post for v1 https://autohotkey.com/boards/viewtopic.php...
by Sam_
26 Oct 2018, 14:20
Forum: Ask For Help
Topic: append callstack to handled and unhandled exceptions
Replies: 3
Views: 487

append callstack to handled and unhandled exceptions

quoth lexikos the wise You can obtain the call stack whenever you want by calling Exception in a loop as demonstrated elsewhere. [...] If you throw the exception, you can get the call stack and attach it to the exception before throwing. If you catch an exception, the stack has already unwound to yo...
by Sam_
28 Sep 2018, 19:49
Forum: Scripts and Functions
Topic: ScriptInfo(): Get ListLines/ListVars/ListHotkeys/KeyHistory text
Replies: 17
Views: 4689

Re: ScriptInfo(): Get ListLines/ListVars/ListHotkeys/KeyHistory text

You can obtain the call stack whenever you want by calling Exception in a loop as demonstrated elsewhere. But when do you "encounter an exception"? If you throw the exception, you can get the call stack and attach it to the exception before throwing. If you catch an exception, the stack has already...
by Sam_
27 Sep 2018, 21:41
Forum: Scripts and Functions
Topic: ScriptInfo(): Get ListLines/ListVars/ListHotkeys/KeyHistory text
Replies: 17
Views: 4689

Re: ScriptInfo(): Get ListLines/ListVars/ListHotkeys/KeyHistory text

On a potentially semi-related topic, is it possible to retrieve the callstack upon encountering an exception?
by Sam_
05 Sep 2018, 12:43
Forum: Ask For Help
Topic: use of control characters in hotstrings
Replies: 3
Views: 196

Re: use of control characters in hotstrings

results are suboptimal why, whats wrong with it In Word, when cutting text all the way back to the beginning of the line, the cursor automatically jumps to the end of the previous line. In Excel, the use of {Left} tends to change which cell has focus, although this behavior varies depending on just...
by Sam_
05 Sep 2018, 09:39
Forum: Ask For Help
Topic: use of control characters in hotstrings
Replies: 3
Views: 196

use of control characters in hotstrings

As has been done in a variety of ways around the forums in the past, I’d like to make some hotstrings/hotkeys to transform English letters into Greek. The scheme I’d like to use is: /* Dec Hex ASCII Greek Unicode Hex 97 61 a α 03B1 98 62 b β 03B2 99 63 c χ 03C7 100 64 d δ 03B4 101 65 e ε 03B5 102 66...
by Sam_
30 May 2018, 17:07
Forum: Ask For Help
Topic: save rotated image with GDIP Topic is solved
Replies: 2
Views: 226

Re: save rotated image with GDIP Topic is solved

@swagfag
Brilliant, thank you! Do you happen to know the best way to prevent anti-aliasing? What I've found so far is

Code: Select all

Gdip_SetInterpolationMode(pGraphicsRotated,5) ; NearestNeighbor = 5
but results aren't great on non-90* rotations...
by Sam_
30 May 2018, 14:15
Forum: Ask For Help
Topic: save rotated image with GDIP Topic is solved
Replies: 2
Views: 226

save rotated image with GDIP Topic is solved

#Include, lib\Gdip_All.ahk Gui, ChildOrigin: -Caption +E0x80000 +AlwaysOnTop +ToolWindow +OwnDialogs Gui, ChildOrigin: +HwndChildhwnd Gui, ChildOrigin: Show, NA pToken:=Gdip_Startup() pBitmap:=Gdip_CreateBitmapFromFile(A_ScriptDir "\SomeFile.png") w:=h:=0, OriginRud:=45 Gdip_GetImageDimensions(pBit...
by Sam_
09 May 2018, 21:17
Forum: Offtopic
Topic: What happened to GIF?
Replies: 15
Views: 2192

Re: What happened to GIF?

That was output from the class I am writing to construct, deconstruct, and manipulate GIFs (written in AHK). I'm pretty sure I've worked out the kinks in my LZW implementation, but the compression is considerably slower than I would like. It seems I have chosen a poor hashing strategy... I'll post m...
by Sam_
07 May 2018, 20:26
Forum: Offtopic
Topic: What happened to GIF?
Replies: 15
Views: 2192

Re: What happened to GIF?

Here's a bit more detail: Path='C:\Programs\AutoHotkey Scripts\Gif\puppy.gif' I: OriginalFileSize=21865 I: FileSize=21865 GIF loaded into memory in 0.000332 sec. Header Block I: OffsetToHeader = 0 I: Signature = 'GIF' I: Version = '89a' I: LengthOfHeader = 6 Logical Screen Descriptor I: OffsetToLogi...
by Sam_
07 May 2018, 12:32
Forum: Ask For Help
Topic: Inconsistency with Comma (multi-statement) expressions
Replies: 12
Views: 1095

Re: Inconsistency with Comma (multi-statement) expressions

Unless it is embedded within another expression, vName += 1 is literally a call to EnvAdd. mean that using EnvAdd would be faster than using vName += 1? :eh: No. By "x is literally y", I mean that x and y are the same thing. That thing can't be faster than itself. You stated that vName += 1 calls t...
by Sam_
06 May 2018, 20:09
Forum: Ask For Help
Topic: GIF LZW encoder/decoder
Replies: 5
Views: 605

GIF LZW encoder/decoder

I was rather underwhelmed with GDI's support for animated GIFs, so I decided to make my own implementation in pure AHK. I've been making some good progress, but I'm struggling a bit when it comes to the GIF LZW variable code size compression and decompression. I've read quite a bit of documentation ...
by Sam_
06 May 2018, 19:37
Forum: Ask For Help
Topic: Inconsistency with Comma (multi-statement) expressions
Replies: 12
Views: 1095

Re: Inconsistency with Comma (multi-statement) expressions

@lexikos, Thank you very much for the explanation.

Does
lexikos wrote:Unless it is embedded within another expression, vName += 1 is literally a call to EnvAdd.
mean that using EnvAdd would be faster than using vName += 1?
by Sam_
25 Apr 2018, 15:56
Forum: Ask For Help
Topic: Inconsistency with Comma (multi-statement) expressions
Replies: 12
Views: 1095

Re: Inconsistency with Comma (multi-statement) expressions

I understand that adding a number to a string is a nonsensical thing to do, but as it happens this is the single most efficient way of retrieving the first number from a string of numbers delimited by non-digits. It works with negative numbers too. I have the gut feeling this behavior was in the doc...
by Sam_
25 Apr 2018, 14:23
Forum: Ask For Help
Topic: Inconsistency with Comma (multi-statement) expressions
Replies: 12
Views: 1095

Inconsistency with Comma (multi-statement) expressions

[Moderator's note: Topic moved from Bug Reports.] Every time I have reported a bug, it has turned out to be a misconception on my part about the expected behavior of the code, and not a real bug. That being said, I am confused about the current behavior of Comma (multi-statement) expressions. i:="1...

Go to advanced search