Exemplo n.º 1
0
        static public void fncChatOpen()
        {
            //SendKeys.Send("{ESC}");
            Win32API.keybd_click(Win32API.VK_ESCAPE);

            //SendKeys.Send("/");
            Win32API.keybd_click(Win32API.VK_DIVIDE);
        }
Exemplo n.º 2
0
        //ページング実行
        private void fncHePage(int page)
        {
            if (page <= 0)
            {
                page = 1;
            }
            textBox1.Text = page.ToString();
            string strOutput = "";

            strOutput += "he page " + page;
            refForm.fncExecuteCommand(strOutput);
            Win32API.keybd_click(Win32API.VK_DIVIDE);
        }
Exemplo n.º 3
0
        //検索
        private void button9_Click(object sender, EventArgs e)
        {
            string strOutput  = "";
            string parameters = fncSetParameters();

            if (parameters.Length == 0)
            {
                return;
            }
            strOutput += "he search" + parameters;
            refForm.fncExecuteCommand(strOutput);
            Win32API.keybd_click(Win32API.VK_DIVIDE);
        }
Exemplo n.º 4
0
        public void fncExecuteCommand(String cmd)
        {
            if (appSettings.ExcuteType == 1)
            {
                //cmd = "/" + cmd;
                Clipboard.SetDataObject(cmd);
                if (TargetWindow.fncFindMinecraft())
                {
                    TargetWindow.fncChatOpen();
                    //Thread.Sleep(50);
                    //SendKeyUtility.SendKeyAsync("^v" + fncGetEnd());
                    //SendKeys.Send("^v" + fncGetEnd());
                    Win32API.keybd_paste();
                    if (appSettings.FlgExcute)
                    {
                        Win32API.keybd_click(Win32API.VK_RETURN);
                    }
                }
            }
            else if (appSettings.ExcuteType == 2)
            {
                Clipboard.SetDataObject(cmd);
                if (TargetWindow.fncFindMinecraftServer())
                {
                    //コマンド実行
                    SendKeys.Send(cmd + fncGetEnd());
                    //Win32API.keybd_paste_cmd();
                }
            }
            else if (appSettings.ExcuteType == 3)
            {
                Clipboard.SetDataObject(cmd);
                if (TargetWindow.fncFindBukkitGUI())
                {
                    //マウスポインタの位置を取得する
                    //X座標を取得する
                    int x = Cursor.Position.X;
                    //Y座標を取得する
                    int y = Cursor.Position.Y;

                    //Generalタブをクリック
                    Cursor.Position = new Point(TargetWindow.winRect.left + 30, TargetWindow.winRect.top + 40);
                    mouse_event(WM_LBUTTONDOWN, 0, 0, 0, 0);
                    mouse_event(WM_LBUTTONUP, 0, 0, 0, 0);

                    //テキストボックスにフォーカス合わせる
                    SendKeys.SendWait("{TAB 7}");

                    //コマンド実行
                    SendKeys.SendWait("^V" + fncGetEnd());

                    //マウスポインタの位置を元に戻す
                    Cursor.Position = new Point(x, y);
                }
            }
            if (appSettings.ExcuteType == 4)
            {
                //cmd = "/" + cmd;
                Clipboard.SetDataObject(cmd);
                if (TargetWindow.fncFindNotepad())
                {
                    //SendKeys.Send("^V" + fncGetEnd());
                    Win32API.keybd_paste();
                    if (appSettings.FlgExcute)
                    {
                        Win32API.keybd_click(Win32API.VK_RETURN);
                    }
                }
            }
            //Clipboard.Clear();
        }