wManager.Wow.Helpers Namespace
WRobot

robotManager.Helpful Namespace

Classes


  Class Description
Public class Args
Class Args.
Public class ArgsParser
Class ArgsParser. To facilitate the reading and the use of command line arguments (you can can parse command-line arguments normally (program.exe -arg1) or use the environment variable ArgsEnvironmentVariables with the Json code of the Args class)
Public class BinarySerializer
BinarySerializer. Save/Load binary file.
Public class CustomUrlProtocol
Class CustomUrlProtocol. No longer used by the bot, more info here https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)?redirectedfrom=MSDN
Public class Display
Some functions of the Windows API to manage windows/screen
Public class Extensions
Class Extensions. Some useful class extensions.
Public class GraphicsExtensions
Class GraphicsExtensions.
Public class GZip
Class GZip.
Public class IniFile
Create a New INI file to store or load data
Public class Keyboard
Keyboard Manager
Public class KeyboardHook
Registers a hot key with Windows.

Examples


C#
KeyboardHook hookKeybindingsPause = new KeyboardHook();
hookKeybindingsPause.RegisterHotKey(ModifierKeys.Alt, Keys.X);
hookKeybindingsPause.KeyPressed += delegate(object sender, KeyPressedEventArgs args)
{
     Products.InPause = !Products.InPause;
};
 // ....
hookKeybindingsPause.Dispose();
Public class KeyPressedEventArgs
Event Args for the event that is fired after the hot key has been pressed.
Public class Logging
Class Logging. Methods to help log, user interface to show log is LoggingUserControl
Public class Logging..::..Log
Class Log.
Public class Logging..::..LoggingChangeEventArgs
Class LoggingChangeEventArgs. Implements the EventArgs
Public class Logging..::..StatusChangeEventArgs
Class StatusChangeEventArgs. Implements the EventArgs
Public class LuaBot
Class LuaBot. Methods to run lua code with access to all .net and bot API.

Examples


C#
local log = clr.robotManager.Helpful.Logging
local wowLua = clr.wManager.Wow.Helpers.Lua.Wow
local lua = clr.wManager.Wow.Helpers.Lua

local playerName = lua.LuaDoString('return GetUnitName("player")', clr.System.String, '') -- OR wowLua.GetUnitName("player")
local txt = 'Player name: ' .. playerName .. ' - WRobot version: ' .. clr.wManager.Information.Version
log.Write(txt);
clr.System.Windows.MessageBox.Show(txt)
Public class Math
Class Math.
Public class Mouse
Class Mouse.
Public class Others
Class Others. Several useful methods.
Public class RunCode
Class RunCode. Run C# and VB.net code from string.
Public class ScintillaStyles
Class ScintillaStyles.
Public class Settings
Class Settings. Used by bot to manage settings files.

Examples


C#
using System;
using System.IO;
using robotManager.Helpful;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;

[Serializable]
public class TestSetting : Settings
{
    public static TestSetting CurrentSetting { get; set; }

    private static string FilePath
    {
        get
        {
            // return path like "C:\WRobot\Settings\Test-NAME.REALMNAME.xml"
            return AdviserFilePathAndName("Test", ObjectManager.Me.Name + "." + Usefuls.RealmName);
        }
    }

    private TestSetting()
    {
        TestValue1 = true;
        TestValue2 = "test text";
    }

    public bool Save()
    {
        try
        {
            return Save(FilePath);
        }
        catch (Exception e)
        {
            Logging.WriteError("TestSetting > Save(): " + e);
            return false;
        }
    }

    public static bool Load()
    {
        try
        {
            if (File.Exists(FilePath))
            {
                CurrentSetting = Load<TestSetting>(FilePath);
                return true;
            }
            CurrentSetting = new TestSetting();
        }
        catch (Exception e)
        {
            Logging.WriteError("TestSetting > Load(): " + e);
        }
        return false;
    }

    public bool TestValue1 { get; set; }

    public string TestValue2  { get; set; }
}
Public class Timer
Class Timer.
Public class Utf8StringWriter
Class Utf8StringWriter. Implements the StringWriter
Public class Var
Class Var. Useful to store values for the session.

Examples


C#
Var.SetVar("VariableName", "Test value");
 // ...
string v = Var.GetVar<string>("VariableName");
System.Windows.Forms.MessageBox.Show(v);
Public class Vector3
Vector3 class
Public class XmlSerializer
XmlSerializer

Delegates


  Delegate Description
Public delegate Logging..::..LoggingChangeEventHandler
Delegate LoggingChangeEventHandler
Public delegate Logging..::..StatusChangeEventHandler
Delegate StatusChangeEventHandler

Enumerations


  Enumeration Description
Public enumeration Logging..::..LogType
LogType
Public enumeration ModifierKeys
The enumeration of possible modifiers.
Public enumeration RunCode..::..CodeType
CodeType