WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   How do you make a /command to reopen the form? (https://www.wowinterface.com/forums/showthread.php?t=6014)

Simulator 08-31-06 11:41 PM

How do you make a /command to reopen the form?
 
Hey all,

Right now my project is automatically opening and displaying as soon as a log into the game. I'm wondering, once I close this form, how can I make a /command to reopen it? I know to show a window its NameForm:Show();, but I am unsure as to how I would go about registering a /command to run that command. I tried doing some searches, and the only thing I could find that was remotely close didn't work.

Any help is appreciated!

Nulkris 09-01-06 04:45 AM

Code:

SLASH_ShowForm1 = "/showform"
SlashCmdList["ShowForm"] = function(cmd) NameForm:Show() end

where the text in red must be the same.

Simulator 09-01-06 10:53 AM

Thank you very much!

For some reason the code I tried before was very similar to that but didn't work... this worked out great though!

Cheers :)


All times are GMT -6. The time now is 05:03 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI