Author Topic: GUI Help  (Read 3639 times)

Note: All GUI progress is halted until somebody can help me with the 1st part  :panda:

EDIT: It says there's a Syntax error somewhere in here...

Code: [Select]
     new GuiButtonCtrl() {
         profile = "GuiButtonProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "330 158";
         extent = "31 18";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         command = "messageBoxOk(Calculations","@$add1 + $add2@"");";
         text = "Enter";
         groupNum = "-1";
         buttonType = "PushButton";
« Last Edit: April 22, 2013, 10:01:22 PM by MrLoganator111 »

Try:
Quote
    new GuiButtonCtrl() {
         profile = "GuiButtonProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "330 158";
         extent = "31 18";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         command = "messageBoxOk(\"Calculations\", $add1 + $add2);";
         text = "Enter";
         groupNum = "-1";
         buttonType = "PushButton";

Code: [Select]
exec("./Home.cs");
Can somebody help me put this into the client.cs? The actual GUI name is Home (its a .cs file, but i have it set so that the extension is hidden)
just put it in there.......

just put it in there.......
Does it matter where? And do I have to put anything before it? Sorry if I sound stupid. Im very new to coding and scripting.

It usually doesn't matter where you put it. But just to be safe, put it on the very first line.

It usually doesn't matter where you put it. But just to be safe, put it on the very first line.
Oh and the file is just called "Home". No file extension is shown. Should I put "exec(Home);"  ???

EDIT: It says invalid file name even though I put the exact name.

Find a guide on how to show file extensions somewhere on google. But if your lazy, you can try executing it as "home.gui".

I change the name to "Home.gui", it says "Missing file: Home.gui"
 I changed the name to "Home", it says "Missing file: Home.gui" ... any ideas? Here's the current folder.

http://www.mediafire.com/?84jgck22p75a1st

Put the home.gui in your .zip folder. And replace your client.cs first line with,

Code: [Select]
exec("./home.gui");
« Last Edit: April 23, 2013, 10:27:01 AM by Honorabl3 »

you cannot execute a file unless it has a .cs or .gui extension
add the extension if it isn't there

you cannot execute a file unless it has a .cs or .gui extension
add the extension if it isn't there

This won't work if he doesn't have the extension feauture enabled. It'll just turn to home.gui.txt, but he'll see it as home.gui.

you cannot execute a file unless it has a .cs or .gui extension
add the extension if it isn't there
But then I have to change every single one in the Home.gui file.  :panda: Testing now.

Ok everything works, except for some reason, it comes up 2 times as "unnamed". Not a big problem, but its odd.

Wait, now the key bind won't work. Here's the client.cs The official name of the file is Home.gui

Code: [Select]
exec("./Home.gui");

$remapDivision[$remapCount] = "Log Bot GUI";
$remapName[$remapCount] = "Open Gui";
$remapCmd[$remapCount] = "openmygui";
$remapCount++;

function openmygui(%pressed)
{
     //will call this function twice, once when the button is pressed, once when released
     //the only difference will be the %pressed argument

     if(!%pressed)
          return; //we don't want anything happening when we release the button

     if(home.gui.isawake()) //assuming that home is the name of your gui
          canvas.popdialog(home.gui);
     else
          canvas.pushdialog(home.gui);
}

But then I have to change every single one in the Home.gui file.  :panda: Testing now.
You don't need to change every single line on the file. Just the name of the file. The key bind probably doesn't work because you changed every single line.

Also, it would help if you posted your .zip ..