Author Topic: Somebody can help tutor for Furling need learn newbie script.  (Read 4698 times)

He's gotta learn methods, gui, math, variables, functions, in three days???

No, just math functions, that's it.

Console
Code: [Select]
Client checking Add-On: GUI_Calculator
Loading Add-On: GUI_Calculator (CRC:-1141803747)
Executing Add-Ons/GUI_Calculator/client.cs.
Executing Add-Ons/GUI_Calculator/Calculatorbasic.gui.

Client checking Add-On: GUI_Calculator/GUI_Calculator
    nested add-on - will not execute

Client
Code: [Select]
exec("./Calculatorbasic.gui");
$remapdivision[$remapcount] = "Calculator Basic";
$remapname[$remapcount] = "Calculator Toggle";
$remapcmd[$remapcount] = "Calculatorbasic";
$remapcount++;

function CalculatorbasicGUI(%val)
{
if(%val)
{
if(!Calculatorbasic.isAwake())
{
canvas.pushDialog(Calculatorbasic);
}
else
{
canvas.popDialog(Calculatorbasic);
}
}
}

GUI
Code: [Select]
//--- OBJECT WRITE BEGIN ---

new GuiWindowCtrl(Calculatorbasic) {
   profile = "GuiWindowProfile";
   horizSizing = "width";
   vertSizing = "height";
   position = "0 0";
   extent = "136 175";
   minExtent = "8 2";
   enabled = "0";
   visible = "1";
   clipToParent = "1";
   command = "Canvas.popDialog(Calculatorbasic);";
   text = "Calculator-Furling";
   maxLength = "255";
   resizeWidth = "0";
   resizeHeight = "0";
   canMove = "1";
   canClose = "1";
   canMinimize = "0";
   canMaximize = "0";
   minSize = "50 50";

   new GuiBitmapButtonCtrl(0) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "7 141";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "Canvas.popDialog(Calculatorbasic);";
      text = "0";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiTextEditCtrl(CAL) {
      profile = "GuiTextEditProfile";
      horizSizing = "center";
      vertSizing = "center";
      position = "8 27";
      extent = "122 18";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      maxLength = "255";
      historySize = "0";
      password = "0";
      tabComplete = "0";
      sinkAllKeyEvents = "0";
   };
   new GuiBitmapButtonCtrl(clear) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "37 141";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "CALC.settext(\"\"); GUI1.settext(\"\"); GUI2.settext(\"\");";
      text = "C";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(1) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "7 110";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "Canvas.popDialog(Calculator);";
      text = "1";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(2) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "38 110";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "Canvas.popDialog(Calculator);";
      text = "2";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(3) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "69 110";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "Canvas.popDialog(Calculator);";
      text = "3";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(CALminus) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "100 110";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "CALC.settext(GUI1.getValue() - GUI2.getValue());";
      text = "-";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(4) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "7 79";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "Canvas.popDialog(Calculator);";
      text = "4";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(5) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "38 79";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "Canvas.popDialog(Calculator);";
      text = "5";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(6) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "69 79";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "Canvas.popDialog(Calculator);";
      text = "6";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(CALtimes) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "100 79";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "CAL.settext(GUI1.getValue() * GUI2.getValue());";
      text = "X";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(7) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "7 48";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "Canvas.popDialog(Calculator);";
      text = "7";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(8) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "38 48";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "Canvas.popDialog(Calculator);";
      text = "8";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(9) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "69 48";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "Canvas.popDialog(Calculator);";
      text = "9";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(CALdivide) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "100 48";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "CAL.settext(GUI1.getValue() / GUI2.getValue());";
      text = "/";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(CALPLUS) {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "100 141";
      extent = "30 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      command = "CAL.settext(GUI1.getValue() + GUI2.getValue());";
      text = "+";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button2";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
};

//--- OBJECT WRITE END ---


I made keybind, but it doesn't work of pop up :(

It should look like this. I made this GUI finish.
« Last Edit: January 21, 2013, 03:57:27 PM by Cubelands »

Change calculatorBasicGui(%val) to calculatorBasic(%val)

Change calculatorBasicGui(%val) to calculatorBasic(%val)
It worked! I did open GUI full screen.


Code: [Select]
new GuiWindowCtrl(Calculatorbasic) {
   profile = "GuiWindowProfile";
   horizSizing = "width";
   vertSizing = "height";
   position = "0 0";
   extent = "136 175";
   minExtent = "8 2";
   enabled = "0";
   visible = "1";
   clipToParent = "1";
   command = "Canvas.popDialog(Calculatorbasic);";
   text = "Calculator-Furling";
   maxLength = "255";
   resizeWidth = "0";
   resizeHeight = "0";
   canMove = "1";
   canClose = "1";
   canMinimize = "0";
   canMaximize = "0";
   minSize = "50 50";
It should be extent = "136 175"; Not full screen :( How I am going fix it?

Update EDIT:
Code: [Select]
Client checking Add-On: GUI_Calculator
Loading Add-On: GUI_Calculator (CRC:850202123)
Executing Add-Ons/GUI_Calculator/client.cs.
Add-Ons/GUI_Calculator/Calculatorbasic.gui Line: 380 - Syntax error.
>>> Some error context, with ## on sides of error halt:
      buttonType = "PushButton";

      bitmap = "base/client/ui/button2";

      lockAspectRatio = "0";

      alignLeft = "0";

      alignTop = "0";

      overflowImage = "0";

      mKeepCached = "0";

      mColor = "255 255 255 255";

   };

};

//--- OBJECT WRITE END ---

##
>>> Error report complete.

Executing Add-Ons/GUI_Calculator/Calculatorbasic.gui.
Add-Ons/GUI_Calculator/Calculatorbasic.gui Line: 380 - Syntax error.
>>> Some error context, with ## on sides of error halt:
      buttonType = "PushButton";

      bitmap = "base/client/ui/button2";

      lockAspectRatio = "0";

      alignLeft = "0";

      alignTop = "0";

      overflowImage = "0";

      mKeepCached = "0";

      mColor = "255 255 255 255";

   };

};

//--- OBJECT WRITE END ---

##
>>> Error report complete.


Client checking Add-On: GUI_Calculator/GUI_Calculator
    nested add-on - will not execute

Code: [Select]
Add-Ons/GUI_Calculator/client.cs (11): Unable to find object: 'Calculatorbasic' attempting to call function 'isAwake'
BackTrace: ->Calculatorbasic
« Last Edit: January 21, 2013, 05:03:14 PM by Cubelands »

You are missing a gui ctrl object, im almost home, ill show you in like 15 minutes.

Code: [Select]

//THIS IS THE GUI CONTROL
new GuiControl(calculatorBasic) {
   profile = "GuiDefaultProfile";
   horizSizing = "left";
   vertSizing = "left";
   position = "0 0";
   extent = "800 600";
   minExtent = "8 8";
   enabled = "1";
   visible = "1";
   clipToParent = "1";
   
   //THIS IS THE WINDOW CONTROL. THE WINDOW CONTROL
   //NEEDS TO BE INSIDE OF A GUI CONTROL.
new GuiWindowCtrl() {
   profile = "GuiWindowProfile";
   horizSizing = "width";
   vertSizing = "height";
   position = "0 0";
   extent = "136 175";
   minExtent = "8 2";
   enabled = "0";
   visible = "1";
   clipToParent = "1";
   command = "Canvas.popDialog(Calculatorbasic);";
   text = "Calculator-Furling";
   maxLength = "255";
   resizeWidth = "0";
   resizeHeight = "0";
   canMove = "1";
   canClose = "1";
   canMinimize = "0";
   canMaximize = "0";
   minSize = "50 50";

   new GuiBitmapButtonCtrl(0) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "7 141";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "Canvas.popDialog(Calculatorbasic);";
  text = "0";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiTextEditCtrl(CAL) {
  profile = "GuiTextEditProfile";
  horizSizing = "center";
  vertSizing = "center";
  position = "8 27";
  extent = "122 18";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  maxLength = "255";
  historySize = "0";
  password = "0";
  tabComplete = "0";
  sinkAllKeyEvents = "0";
   };
   new GuiBitmapButtonCtrl(clear) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "37 141";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "CALC.settext(\"\"); GUI1.settext(\"\"); GUI2.settext(\"\");";
  text = "C";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(1) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "7 110";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "Canvas.popDialog(Calculator);";
  text = "1";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(2) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "38 110";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "Canvas.popDialog(Calculator);";
  text = "2";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(3) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "69 110";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "Canvas.popDialog(Calculator);";
  text = "3";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(CALminus) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "100 110";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "CALC.settext(GUI1.getValue() - GUI2.getValue());";
  text = "-";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(4) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "7 79";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "Canvas.popDialog(Calculator);";
  text = "4";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(5) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "38 79";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "Canvas.popDialog(Calculator);";
  text = "5";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(6) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "69 79";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "Canvas.popDialog(Calculator);";
  text = "6";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(CALtimes) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "100 79";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "CAL.settext(GUI1.getValue() * GUI2.getValue());";
  text = "X";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(7) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "7 48";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "Canvas.popDialog(Calculator);";
  text = "7";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(8) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "38 48";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "Canvas.popDialog(Calculator);";
  text = "8";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(9) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "69 48";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "Canvas.popDialog(Calculator);";
  text = "9";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(CALdivide) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "100 48";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "CAL.settext(GUI1.getValue() / GUI2.getValue());";
  text = "/";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
   new GuiBitmapButtonCtrl(CALPLUS) {
  profile = "BlockButtonProfile";
  horizSizing = "right";
  vertSizing = "top";
  position = "100 141";
  extent = "30 30";
  minExtent = "8 2";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  command = "CAL.settext(GUI1.getValue() + GUI2.getValue());";
  text = "+";
  groupNum = "-1";
  buttonType = "PushButton";
  bitmap = "base/client/ui/button2";
  lockAspectRatio = "0";
  alignLeft = "0";
  alignTop = "0";
  overflowImage = "0";
  mKeepCached = "0";
  mColor = "255 255 255 255";
   };
};
};

//--- OBJECT WRITE END ---
« Last Edit: January 21, 2013, 05:22:48 PM by elm »


My frist sccessful finish GUI Calculator.

New problem issues:
X close will not work.

How the number button (click any the numbers) put in text box?

  • number
  • addition
  • subtraction
  • multiplication
  • division
  • equality
above list need put in text box too.
« Last Edit: January 21, 2013, 07:55:21 PM by Cubelands »


to get the x button to work, you set the closeCommand to canvas.popDialog(calculatorBasic);

also good job on your first mod.

to get the x button to work, you set the closeCommand to canvas.popDialog(calculatorBasic);

also good job on your first mod.
They are worked!

Syntax error in input-
Code: [Select]
command = "1.setValue(1.getValue() @%1);";
1 to 9 numbers.

Syntax error in input-
Code: [Select]
command = "1.setValue(1.getValue() @%1);";
1 to 9 numbers.

An object name cannot start with a number and neither can a variable name.
Also, assuming "1 to 9 numbers" are the buttons with numbers, why are you setting their value?

An object name cannot start with a number and neither can a variable name.
Also, assuming "1 to 9 numbers" are the buttons with numbers, why are you setting their value?
cuz Brian Smithers told me. He made mistake gave me this wrong line script.

cuz Brian Smithers told me. He made mistake gave me this wrong line script.

Rule number one. Never listen to Brian Smith.

Rule number one. Never listen to Brian Smith.
Okay, how I make the number button input to textbox?

I said
theobjectname.setvalue(theobjectname.getvalue() @ %someNum);