Although it isn't really related to Memory Editing, but I didn't found a better place to drop this.
When I was looking for a proper method to send slash commands to a wow window, that should stay in background, I finally found this solution.
It's stupid simple, because it does nothing else then copying your command to clipboard and then sending Enter -> Ctrl+V --> Enter to the wow window.
But since it took me like ages to come to this idea, I'm sharing it here, so it could be useful for someone else.
WoWSlashCommand.cs
An Example would look like:
Code:
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using WoWChat;
namespace TestChatCommand
{
class Program
{
[STAThread]
static void Main(string[] args)
{
Process[] pr = Process.GetProcessesByName("wow");
IntPtr hWnd_wow = Process.GetProcessById(pr[0].Id).MainWindowHandle;
WoWSlashCommand.send(hWnd_wow, "/dance");
}
}
}