Jump to content

Little help with math.


Recommended Posts

Well, im not good with math, i want solve this problem and find the result of $label in this expression

$label/100 . 1,17 = $combo/100

well how can i use it in autoit?

I tried to make it as an Int() and didnt work, also i tried to use it as a global variable but didnt work, i tried this:

Global $label/100 * 1,17 = $combo/100

but i get an error instead of the result of this math.

Link to comment
Share on other sites

I guess you mean somthing like this

Global $result = GuiCtrlRead($label)/100 * 1,17

Global $x = GuiCtrlRead($combo)/100

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Which one is the result and which the input?

$label/100 * 1,17 = $combo/100

equals

$label* 1,17 = $combo

#include <GUIConstantsEx.au3>

GUICreate("My GUI combo") ; will create a dialog box that when displayed is centered

$combo = GUICtrlCreateCombo("1", 10, 10) ; create first item
GUICtrlSetData(-1, "2|3|4|5|6", "1") ; add other item snd set a new default
$label = GUICtrlCreateLabel("1.17", 10, 40)

GUISetState()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

    If $msg = $combo Then
        GUICtrlSetData($label, Number(GUICtrlRead($combo)) * 1.17)
    EndIf
WEnd
Link to comment
Share on other sites

Can you guess what I mean too?

:mellow: I can try my very best.

Besides, I like the video of Chris Isaaks version more.

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

then to find the result of $combo need make

$result = $x

right?

Have a look at what KaFu wrote.

Maybe in your case it would be easier to give you the answer if you describe your goal with a few sentences,

instead of writing confusing Autoit source :mellow::lol:

@trancexx: Uhh, I'll think about that. :(

What you are thinking? I don't know, but I hope men don't sing the lyrics of that song, if they got to know you.

Edited by Xenobiologist

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...