Exemple #1
0
 private void ExecuteButton_Click(object sender, EventArgs e)
 {
     if (api.isAPIAttached())
     {
         if (config.useFancyCodeEditor == "true")
         {
             if (webBrowser.Document.InvokeScript("GetText").ToString().Length != 0)
             {
                 api.SendLuaScript(webBrowser.Document.InvokeScript("GetText").ToString());
             }
             else
             {
                 MessageBox.Show("Script box is empty", "Guac");
             }
         }
         else
         {
             if (rtb.Text.Length != 0)
             {
                 api.SendLuaScript(rtb.Text);
             }
             else
             {
                 MessageBox.Show("Script box is empty", "Guac");
             }
         }
     }
     else
     {
         MessageBox.Show("DLL is not attached", "Guac");
     }
 }
Exemple #2
0
        private void ExecuteButton_Click(object sender, EventArgs e)
        {
            if (ScriptList.SelectedItem != null)
            {
                ScriptObject s = (ScriptObject)ScriptList.SelectedItem;

                if (api.isAPIAttached())
                {
                    api.SendLuaScript(s.ScriptContent.ToString());
                }
                else
                {
                    MessageBox.Show("DLL is not attached", "Guac");
                }
            }
        }