ID:865554
 
(See the best response by Lummox JR.)
Descriptive Problem Summary: the winget() proc is unable to return macro data. I attempted many arguments, and every time, winget would return a blank string.

Numbered Steps to Reproduce Problem: Using winget to return a macro's information.

Code Snippet (if applicable) to Reproduce Problem:
usr << winget(usr, "macro.SPACE","command")


Expected Results: I expect it to bring back the currently set command. The byond reference states that it should also work on macros, but it doesn't.

Actual Results: A blank string.

Does the problem occur:
Every time? Or how often? Everytime.
In other games? I tried it on a test game with no other codingg.
In other user accounts?
On other computers? Have not tried on other computers.

When does the problem NOT occur?

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? I have not tried it with other versions.

Workarounds:
Is your macro set named just "macro"? Also, is the key combination exactly "SPACE", or do you have a modifier on it? (such as REP, CTRL, SHIFT, ect?)
I actually tried "macro.*" to return all the marco'd values, but that didn't work. so i tried different elements..

And yes, the macro set is named "macro" as the default..
Best response
I think you're actually just using this wrong. Per the reference, your macro needs to have an ID to interact with it. The macro's name is not macro.SPACE but macro.my_id, where my_id is just whatever you chose to give it. Using this with a macro with an ID, the command is returned correctly from winget().

I'll move this to Developer Help.
Ah, I see. Thank you for the help,