Jump to content

Maximize / restore down wow window attached to wrobot process


Pudge
 Share

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 :)

Link to comment
Share on other sites

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()
    {
    }
}

 

Link to comment
Share on other sites

  • 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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...