[Macro Plugin] Implementation of switch/case

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

Post Reply
Message
Author
Kaspy
OpenKore Monk
OpenKore Monk
Posts: 401
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

[Macro Plugin] Implementation of switch/case

#1 Post by Kaspy »

At the suggestion of kLabMouse, implemented support for switch/case in Macro Plugin.

Example of use:
Image

This is useful to make the code more organized, making maintenance easier.

Diff: http://pastebin.com/kL7aiTzH
How to use:
It is similar to if followed by several else.
Set within the parenthesis switch the variable that will be compared by case. If the case is verdeiro will activate it. If false, will move to the next.
If every case are false and have an else at the end, it will be activated. If have not else, the code will continue normally.

Test, please:
Not yet sent it to SVN is better than someone else before testing, avoiding bugs.
To test just download it and extract this file inside your plugin macro (usually plugins\macro)folder. Check the option to be able to replace files.

Post here if you have any problems, if everything was properly left or suggestions =)
Image

Kaspy
OpenKore Monk
OpenKore Monk
Posts: 401
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: [Macro Plugin] Implementation of switch/case

#2 Post by Kaspy »

I sent for SVN.
r8782
Image

Post Reply