maul-esel / ahkbook

a free online book about AutoHotkey!
http://maul-esel.github.com/ahkbook/index.html
Other
39 stars 22 forks source link

Structures #8

Closed Uberi closed 12 years ago

Uberi commented 12 years ago

A post about structures. I tried to explain what structures and their members were, how they worked, and how to use them in AutoHotkey. Also had a digression about types and how to map things like HCURSOR to UPtr. However, I have not been able to test the MarkDown, and therefore may need some review.

maul-esel commented 12 years ago

Looks good! Some new information for me, too! The instruction how to get the AHK type is very cool!

Some things:

What do you mean by this:

I didn't have MarkDown working

?

Thanks a lot so far ;)

Regards maul.esel

Uberi commented 12 years ago

the ordered lists work with 1. my point but not with 1) my point

I forget to do that all the time; I've fixed it now.

you should link it in the index (replace 9.2)

Done!

maybe a small paragraph on strings in structures would be good... (mostly given as pointers, StrGet()/-Put() ?)

Added a section about arrays and how strings fit into that.

not sure whether a list of commonly used types -> AHK types would be good... if so, here is one...

I think they are necessary to follow the type mapping procedure - the basic mappings in the AHK manual are insufficient for many purposes.

the reference link doesn't work properly - just leave out that (v=vs.85) part

Done!

also maybe the UPtr should be UPtr etc.?

Done!

covering structures in structures would be good

Done!

maybe a link to HotkeyIt's Struct lib?

Done!

do the mappings lack INT -> int? Or is this intentionally because it's self-explanatory?

I added some more in, but yeah, I think most should be self-explanatory enough, or can be type-mapped to one of the mentioned types.

What do you mean by this:

The MarkDown preview often does not match what I actually see as output - it tends to mess up some formatting.

maul-esel commented 12 years ago

Thanks for your updates.

As far as I experienced, strings are sometimes represented as arrays, but way more often as pointers to strings. Maybe that could be added.

The MarkDown preview often does not match what I actually see as output - it tends to mess up some formatting.

What software / site do you use?

P.S.: If you like, add yourself to the contributors list in index.markdown.

Uberi commented 12 years ago

As far as I experienced, strings are sometimes represented as arrays, but way more often as pointers to strings. Maybe that could be added.

Maybe that should go in an article about indirection?

What software / site do you use?

GitHub's live preview. I seem to remember it having a different dialect of MarkDown, though.

P.S.: If you like, add yourself to the contributors list in index.markdown

Done!

Also added a section about using A_PtrSize to calculate offsets portably.

maul-esel commented 12 years ago

Sorry, it seems I was too fast with merging. I can't figure out how to reopen that pull request...

Maybe that should go in an article about indirection?

What is indirection?

I seem to remember it having a different dialect of MarkDown, though.

Yeah, it uses an own version (GFM) which has some additions. Jekyll is currently configured to use Maruku, which also has custom additions.