Jump to content

Maximize / restore down wow window attached to wrobot process


Recommended Posts

2 hours ago, Droidz said:

hi, try 


robotManager.Helpful.Win32.Native.ShowWindow(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, 3);

(no tested)

Parfait, Mr. Droidz! What would I do without you?!!! Number 4 for minimize :)

You need more code 

using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;

public class Main : wManager.Plugin.IPlugin
{
    [DllImport("user32.dll", SetLastError = true)]
    static extern int GetWindowLong(IntPtr hWnd, int nIndex); 
    public const uint WS_MINIMIZE = 0x20000000;
    public const uint WS_MAXIMIZE = 0x01000000;
    public const int GWL_STYLE = -16;

    void GetState()
    {
        int style = GetWindowLong(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, GWL_STYLE);
        if ((style & WS_MAXIMIZE) == WS_MAXIMIZE)
        {
            MessageBox.Show("maximized");
        }
        else if ((style & WS_MINIMIZE) == WS_MINIMIZE)
        {
            MessageBox.Show("minimized");
        }
        else
        {
            // normal style?
            MessageBox.Show("Normal??? > style=" + style.ToString("x8"));
        }
    }

    public void Initialize()
    {
        GetState();
        robotManager.Helpful.Win32.Native.ShowWindow(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, 6);
        GetState();
        robotManager.Helpful.Win32.Native.ShowWindow(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, 3);
        GetState();
        robotManager.Helpful.Win32.Native.ShowWindow(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, 4);
        GetState();
    }

    public void Dispose()
    {
    }

    public void Settings()
    {
    }
}

 

  • Pudge changed the title to Maximize / restore down wow window attached to wrobot process
  • 4 weeks later...

 

Is it possible to perform such actions with a bot?

On 8/23/2020 at 3:01 PM, Droidz said:

robotManager.Helpful.Win32.Native.ShowWindow(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, 3);

cant find method how get WindowHandle value for wrobot application, if it works

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...