au3scr Posted December 15, 2007 Share Posted December 15, 2007 I have problem with making calc.. I am trying to make one , but i dont know how make functions like + #i wanna make it so if ui click on + then it cleas $inputvastus and hange value : $buffer1 = string from $inputvastus #... # #it is stupid idea a little that i talked above so how make buttons like + and - and * and / work? in my calc? Here is source that i already have How i make calculating functions? [autoit]#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=c:\documents and settings\rain\my documents\kxf\form1.kxf $Form1_1 = GUICreate("RCalc", 611, 372, 193, 125) $Button1 = GUICtrlCreateButton("2", 64, 288, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button2 = GUICtrlCreateButton("6", 104, 248, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button3 = GUICtrlCreateButton("9", 104, 208, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button4 = GUICtrlCreateButton("7", 24, 208, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button5 = GUICtrlCreateButton("1", 24, 288, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button6 = GUICtrlCreateButton("3", 104, 288, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button7 = GUICtrlCreateButton("8", 64, 208, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button8 = GUICtrlCreateButton("5", 64, 248, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button9 = GUICtrlCreateButton("4", 24, 248, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button10 = GUICtrlCreateButton("+", 176, 328, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button11 = GUICtrlCreateButton("-", 176, 288, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button12 = GUICtrlCreateButton("*", 176, 248, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button13 = GUICtrlCreateButton("=", 216, 328, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button14 = GUICtrlCreateButton("%", 216, 288, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button15 = GUICtrlCreateButton("/", 216, 248, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button16 = GUICtrlCreateButton("-/+", 64, 328, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button17 = GUICtrlCreateButton("0", 24, 328, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button18 = GUICtrlCreateButton(",", 104, 328, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button19 = GUICtrlCreateButton("x^2", 176, 208, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button20 = GUICtrlCreateButton("x^3", 216, 208, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button21 = GUICtrlCreateButton("Cos", 256, 328, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button22 = GUICtrlCreateButton("Sin", 256, 288, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button23 = GUICtrlCreateButton("M-", 256, 248, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button24 = GUICtrlCreateButton("M+", 256, 208, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Button25 = GUICtrlCreateButton("GB", 328, 327, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button26 = GUICtrlCreateButton("MB", 328, 287, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button27 = GUICtrlCreateButton("KB", 328, 247, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button28 = GUICtrlCreateButton("ZB", 368, 327, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button29 = GUICtrlCreateButton("EB", 368, 287, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button30 = GUICtrlCreateButton("PB", 368, 247, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button31 = GUICtrlCreateButton("B", 328, 207, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button32 = GUICtrlCreateButton("TB", 368, 207, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button33 = GUICtrlCreateButton("[", 408, 327, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button34 = GUICtrlCreateButton(")", 408, 287, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button35 = GUICtrlCreateButton("(", 408, 247, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button36 = GUICtrlCreateButton("YB", 408, 207, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $Button37 = GUICtrlCreateButton("micro", 446, 327, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button38 = GUICtrlCreateButton("milli", 446, 287, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button39 = GUICtrlCreateButton("centi", 446, 247, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button40 = GUICtrlCreateButton("atto", 502, 327, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button41 = GUICtrlCreateButton("femto", 502, 287, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button42 = GUICtrlCreateButton("pico", 502, 247, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button43 = GUICtrlCreateButton("deci", 446, 207, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button44 = GUICtrlCreateButton("nano", 502, 207, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button45 = GUICtrlCreateButton("Chr", 558, 327, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button46 = GUICtrlCreateButton("]", 558, 287, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button47 = GUICtrlCreateButton("yocto", 558, 247, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button48 = GUICtrlCreateButton("zepto", 558, 207, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF00FF) $Button49 = GUICtrlCreateButton("Str To HEX", 328, 168, 83, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) $Button50 = GUICtrlCreateButton("Str To HEX", 424, 168, 83, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) $Button51 = GUICtrlCreateButton("Str -> Binar", 520, 168, 85, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) $Button52 = GUICtrlCreateButton("Binar -> Str", 232, 168, 85, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) $Button53 = GUICtrlCreateButton("Dec", 177, 169, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) $Button54 = GUICtrlCreateButton("C", 104, 168, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x008000) $Button55 = GUICtrlCreateButton("F", 104, 128, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x008000) $Button56 = GUICtrlCreateButton("D", 24, 128, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x008000) $Button57 = GUICtrlCreateButton("E", 64, 128, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x008000) $Button58 = GUICtrlCreateButton("B", 64, 168, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x008000) $Button59 = GUICtrlCreateButton("A", 24, 168, 30, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x008000) $Button60 = GUICtrlCreateButton("Abs", 176, 128, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) $Button61 = GUICtrlCreateButton("Exp", 232, 128, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) $Button62 = GUICtrlCreateButton("r^2 -> Pii", 288, 128, 85, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) $Button63 = GUICtrlCreateButton("d -> Pii", 384, 128, 83, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) $Button64 = GUICtrlCreateButton("Pii * r^2", 472, 128, 85, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) $Button65 = GUICtrlCreateButton("a*h/2", 560, 128, 45, 30, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) $Label1 = GUICtrlCreateLabel("r", 24, 80, 9, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateInput("", 40, 80, 45, 21) $Label2 = GUICtrlCreateLabel("d", 104, 80, 13, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateInput("", 120, 80, 45, 21) $Label3 = GUICtrlCreateLabel("Pii", 176, 80, 22, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateInput("", 200, 80, 45, 21) $Label4 = GUICtrlCreateLabel("a", 256, 80, 13, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateInput("", 272, 80, 45, 21) $Label5 = GUICtrlCreateLabel("h", 328, 80, 12, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateInput("", 344, 80, 45, 21) $Label6 = GUICtrlCreateLabel("V", 400, 80, 14, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateInput("", 416, 80, 45, 21) $Label7 = GUICtrlCreateLabel("s", 480, 80, 12, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateInput("", 496, 80, 45, 21) $Label8 = GUICtrlCreateLabel("t", 544, 80, 8, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateInput("", 560, 80, 45, 21) $inputvastus = GUICtrlCreateInput("vastus", 24, 48, 577, 21) $Label9 = GUICtrlCreateLabel("Buffer1", 24, 24, 38, 17) $buffer1 = GUICtrlCreateInput("buffer1", 64, 16, 121, 21) $Label10 = GUICtrlCreateLabel("Buffer2", 200, 24, 38, 17) GUICtrlCreateInput("buffer2", 240, 16, 121, 21) $Label11 = GUICtrlCreateLabel("Buffer3", 376, 24, 38, 17) GUICtrlCreateInput("buffer3", 416, 16, 121, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;Men Link to comment Share on other sites More sharing options...
Valuater Posted December 15, 2007 Share Posted December 15, 2007 Learn to searchhttp://www.autoitscript.com/forum/index.ph...st&p=418728http://www.autoitscript.com/forum/index.ph...st&p=415879http://www.autoitscript.com/forum/index.ph...st&p=390675http://www.autoitscript.com/forum/index.ph...st&p=374121heres a whole listhttp://www.autoitscript.com/forum/index.ph...e=%2BCalculator8) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now