So the function can be passed to a funciton parameter where it requests a memory address.
DllCall("wsprintf", "ptr", VarSetCapacity(buf, max_bytes, 0, [color=red]True[/color]), "str", "0x%08x", "uint", 4919)
Posted 28 February 2012 - 05:12 AM
DllCall("wsprintf", "ptr", VarSetCapacity(buf, max_bytes, 0, [color=red]True[/color]), "str", "0x%08x", "uint", 4919)
Posted 28 February 2012 - 08:15 AM
DllCall("wsprintf", "ptr", VarSetCapacity(buf, max_bytes, 0, True) [color=red]? &buf : 0[/color], "str", "0x%08x", "uint", 4919)... 'Nuff said.
Posted 28 February 2012 - 08:23 AM
DllCall("wsprintf", "ptr", VarSetCapacity(buf, max_bytes, 0, [color=red]True[/color]) ? &buf : 0, "str", "0x%08x", "uint", 4919)... 'Nuff said.So you are supporting the idea, nuff said.
Posted 28 February 2012 - 08:38 AM
Posted 28 February 2012 - 08:45 AM
Posted 04 March 2012 - 04:35 PM
Posted 04 March 2012 - 08:54 PM
"More useful" for a small group of users more likely, I doubt the majority of people using ahk will even understand what you mean and what the purpose is. So perhaps explain it a bit better, like you would a five year old or your golden retriever.The idea is meant to push the program to be more useful.
Posted 04 March 2012 - 09:04 PM
Variable() is misleading - it doesn't create a variable, it sets a variable's capacity.VarSetCapacity() is not a good name and too long as UrlDownloadToFile, Variable() is more readable as Download.
First param is an expression, no need to change.First param is not an expression, we need to discard this exception and use a real expression (not myvar but "myvar")
Could you explain that further? I don't really understand what you mean.Size could be replaced by "Ptr" for example, or other string type, just for a good read, or dynamic in case of a pointer.
Personally, I wouldn't find this useful. I know I want to put a "4" in there, from (for example) a structure definition I can say it's an Int - but I couldn't tell what value each byte has.We could have a fill bites option, because we use a lot of pre-structure or cooked buffer, for example "00F0000200FF" as a multi-numput() shortcut.
Posted 04 March 2012 - 10:20 PM
Posted 05 March 2012 - 07:21 PM
Posted 14 March 2012 - 01:35 AM