Jump to content
Sign in to follow this  
Zanaj

No data from GUICrtlRead

Recommended Posts

Zanaj

Heya I am making a comparator...To a game (:

It's calacurated by stat, most wanted stat and so on. However when try to write data, to see if everything worked. However nothing get printed out. Can somebody help me?

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Pia\Desktop\Nickis Ting\Koda\Forms\Main.kxf
$Main = GUICreate("Main", 252, 606, 197, 0)
GUISetBkColor(0xF0F0F0)
$Add = GUICtrlCreateButton("Add", 8, 8, 155, 25)
$Compare = GUICtrlCreateButton("Compare", 8, 40, 155, 25)
$NoEdit = GUICtrlCreateLabel("In those cases the best choise is", 8, 80, 158, 17)
$NoEdit2 = GUICtrlCreateLabel("Steady damage:", 8, 104, 81, 17)
$NoEdit3 = GUICtrlCreateLabel("Highest damage:", 8, 128, 84, 17)
$NoEdit4 = GUICtrlCreateLabel("Highest Crit:", 8, 152, 61, 17)
$Steady = GUICtrlCreateLabel(" ", 104, 104, 7, 17)
$Dmg = GUICtrlCreateLabel(" ", 104, 128, 7, 17)
$Crit = GUICtrlCreateLabel(" ", 104, 152, 7, 17)
$NoEdit6 = GUICtrlCreateLabel("Str", 24, 208, 17, 17)
$Label3 = GUICtrlCreateLabel("Int", 24, 232, 16, 17)
$Label4 = GUICtrlCreateLabel("Luck", 16, 280, 28, 17)
$Label5 = GUICtrlCreateLabel("Will", 24, 304, 21, 17)
$Label6 = GUICtrlCreateLabel("Dex", 24, 256, 23, 17)
$Int = GUICtrlCreateInput("", 64, 232, 33, 21)
$Str = GUICtrlCreateInput(" ", 64, 208, 33, 21)
$Luck = GUICtrlCreateInput("", 64, 280, 33, 21)
$Dex = GUICtrlCreateInput("", 64, 256, 33, 21)
$Will = GUICtrlCreateInput("", 64, 304, 33, 21)
$Label7 = GUICtrlCreateLabel("Damage", 0, 328, 44, 17)
$Min = GUICtrlCreateInput("", 64, 328, 33, 21)
$Label8 = GUICtrlCreateLabel("Crit", 24, 352, 19, 17)
$Critical = GUICtrlCreateInput("", 64, 352, 33, 21)
$Label9 = GUICtrlCreateLabel("Balance", 0, 376, 43, 17)
$Balance = GUICtrlCreateInput("", 64, 376, 33, 21)
$Max = GUICtrlCreateInput("", 112, 328, 33, 21)
$NoEdit5 = GUICtrlCreateLabel("Whats your base stats?", 8, 184, 115, 17)
$Lab = GUICtrlCreateLabel("Hp", 24, 400, 18, 17)
$Hp = GUICtrlCreateInput("", 64, 400, 33, 21)
$Labe = GUICtrlCreateLabel("Mp", 24, 424, 19, 17)
$Mp = GUICtrlCreateInput("", 64, 424, 33, 21)
GUICtrlCreateLabel("Stamina", 0, 448, 42, 17)
$Sp = GUICtrlCreateInput("", 64, 448, 33, 21)
$Matk = GUICtrlCreateLabel("Magic atk", 0, 472, 51, 17)
$Mat = GUICtrlCreateInput("", 64, 472, 33, 21)
$Mdef = GUICtrlCreateLabel("Magic def", 0, 496, 51, 17)
$Mde = GUICtrlCreateInput("", 64, 496, 33, 21)
$Label = GUICtrlCreateLabel("Def", 0, 520, 21, 17)
$Def = GUICtrlCreateInput("", 64, 520, 33, 21)
$Stat = GUICtrlCreateInput("What is the most importen stat?", 8, 544, 185, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
   Case $Add
   NewSet()
  
   Case $Compare
  
EndSwitch
WEnd

Func NewSet()
   #Region Variables
   Local $Input[15]
   Local $CurrentForm
   Local $CurrentArray
   #EndRegion
  
   #Region Main form
$Form2 = GUICreate(" $Name", 219, 495, 920, 94)
   $Add = GUICtrlCreateButton("Add", 56, 440, 75, 25)
   
    $Name = GUICtrlCreateInput("Name of set", 8, 0, 121, 21)
    $IntInput = GUICtrlCreateInput("", 80, 96, 33, 21)
    $StrInput = GUICtrlCreateInput(" ", 80, 72, 33, 21)
    $LuckInput = GUICtrlCreateInput("", 80, 144, 33, 21)
    $DexInput = GUICtrlCreateInput("", 80, 120, 33, 21)
    $WillInput = GUICtrlCreateInput("", 80, 168, 33, 21)
    $BalanceInput = GUICtrlCreateInput("", 80, 264, 33, 21)
    $CritInput = GUICtrlCreateInput("", 80, 240, 33, 21)
    $HpInput = GUICtrlCreateInput("", 80, 288, 33, 21)
    $MpInput = GUICtrlCreateInput("", 80, 312, 33, 21)
    $SpInput = GUICtrlCreateInput("", 80, 336, 33, 21)
    $MatkInput = GUICtrlCreateInput("", 80, 360, 33, 21)
    $MdefInput = GUICtrlCreateInput("", 80, 384, 33, 21)
    $DefInput = GUICtrlCreateInput("", 80, 408, 33, 21)
    $MdmgInput = GUICtrlCreateInput("", 80, 216, 33, 21)
    $MxdmgInput = GUICtrlCreateInput("", 80, 192, 33, 21)
   
   
    $StrNegative = GUICtrlCreateCheckbox("Negative", 120, 72, 97, 17)
    $IntNegative = GUICtrlCreateCheckbox("Negative", 120, 96, 97, 17)
    $DexNegative = GUICtrlCreateCheckbox("Negative", 120, 120, 97, 17)
    $LuckNegative = GUICtrlCreateCheckbox("Negative", 120, 144, 97, 17)
    $WillNegative = GUICtrlCreateCheckbox("Negative", 120, 168, 97, 17)
    $NegativeBal = GUICtrlCreateCheckbox("Negative", 120, 264, 97, 17)
    $NegativeHp = GUICtrlCreateCheckbox("Negative", 120, 288, 97, 17)
    $NegativeCrit = GUICtrlCreateCheckbox("Negative", 120, 240, 97, 17)
    $NegativeMdmg = GUICtrlCreateCheckbox("Negative", 120, 192, 97, 17)
    $NegativeMp = GUICtrlCreateCheckbox("Negative", 120, 312, 97, 17)
    $NegativeSp = GUICtrlCreateCheckbox("Negative", 120, 336, 97, 17)
    $NegativeMatk = GUICtrlCreateCheckbox("Negative", 120, 360, 97, 17)
    $NegativeDef = GUICtrlCreateCheckbox("Negative", 120, 404, 97, 17)
    $NegativeMdef = GUICtrlCreateCheckbox("Negative", 120, 384, 97, 17)
    $Checkbox1 = GUICtrlCreateCheckbox("Negative", 120, 216, 97, 17)
   
   
   
   
   
    $Str = GUICtrlCreateLabel("Str", 40, 72, 17, 17)
    $Int = GUICtrlCreateLabel("Int", 40, 96, 16, 17)
    $Luck = GUICtrlCreateLabel("Luck", 32, 144, 28, 17)
    $Will = GUICtrlCreateLabel("Will", 40, 168, 21, 17)
    $Dex = GUICtrlCreateLabel("Dex", 40, 120, 23, 17)
    $MxDmg = GUICtrlCreateLabel("MaxDmg", 16, 192, 43, 17)
    $Crit = GUICtrlCreateLabel("Crit", 40, 240, 19, 17)
    $Balance = GUICtrlCreateLabel("Balance", 16, 264, 43, 17)
    $Hp = GUICtrlCreateLabel("Hp", 40, 288, 18, 17)
    $Mp = GUICtrlCreateLabel("Mp", 40, 312, 19, 17)
    $SSP=GUICtrlCreateLabel("Stamina", 16, 336, 42, 17)
    $Matk = GUICtrlCreateLabel("Magic atk", 16, 360, 51, 17)
    $Mdef = GUICtrlCreateLabel("Magic def", 16, 384, 51, 17)
    $Def = GUICtrlCreateLabel("Def", 16, 408, 21, 17)
    $Mndmg = GUICtrlCreateLabel("MinDmg", 16, 216, 43, 17)
   
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
   Case $GUI_EVENT_CLOSE
   Exit
   Case $Add
   #Region Addtion weapon
   ;Setting up variables
   Local $Inputs[15]
      $Inputs[0] = GUICtrlRead($IntInput)
      $Inputs[1] = GUICtrlRead($StrInput)
      $Inputs[2] = GUICtrlRead($LuckInput)
      $Inputs[3] = GUICtrlRead($DexInput)
      $Inputs[4] = GUICtrlRead($WillInput)
      $Inputs[5] = GUICtrlRead($BalanceInput)
      $Inputs[6] = GUICtrlRead($CritInput)
      $Inputs[7] = GUICtrlRead($HpInput)
      $Inputs[8] = GUICtrlRead($MpInput)
      $Inputs[9] = GUICtrlRead($SpInput)
      $Inputs[10] = GUICtrlRead($MatkInput)
      $Inputs[11] = GUICtrlRead($MdefInput)
      $Inputs[12] = GUICtrlRead($DefInput)
      $Inputs[13] = GUICtrlRead($MdmgInput)
      $Inputs[14] = GUICtrlRead($MxdmgInput)
     
      ;Tries to output the taken values.
      Msgbox(0,"",$Input[0] & @CRLF & $Input[1] & @CRLF & $Input[2] & @CRLF & $Input[3] & @CRLF & $Input[4] & @CRLF & $Input[5] & @CRLF & $Input[6] & @CRLF & $Input[7] & @CRLF & $Input[8] & @CRLF & $Input[9] & @CRLF & $Input[10] & @CRLF & $Input[11] & @CRLF & $Input[12] & @CRLF & $Input[13] & @CRLF & $Input[14] & @CRLF)
   #EndRegion
  
EndSwitch
WEnd
Return $Inputs[14] ; This return the values you get owo...I need this for later use
EndFunc

And is there any way this can be done easier?

Share this post


Link to post
Share on other sites
Zanaj

It is a game however YOU type YOUR stats so it have NOTHING to do with the exe, rather than saying what weapon is best o-o...Based of what you give. I thought this was okey as this have, no keylogging nor automating in it towards the game. It's more a calcurater than anything.

However I am sorry if, this is against the rule, but I honestely can't see the bad in it.

Sincerly Zanaj

Edited by Zanaj

Share this post


Link to post
Share on other sites
Andreik

Because the name of variable is $Inputs not $Input.


When the words fail... music speaks

Share this post


Link to post
Share on other sites
Zanaj

That akwarken moment when you realize you really did something stupid....Ty have a nice day and good luck on any projcets you may be.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×