Jump to content
Sign in to follow this  
Bullet

Little help with math.

Recommended Posts

Bullet

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.

Share this post


Link to post
Share on other sites
Xenobiologist

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

Share this post


Link to post
Share on other sites
trancexx

I guess you mean somthing like this

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

Global $x = GuiCtrlRead($combo)/100

Can you guess what I mean too?

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
KaFu

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

Share this post


Link to post
Share on other sites
Xenobiologist

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

Share this post


Link to post
Share on other sites
Bullet

I guess you mean somthing like this

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

Global $x = GuiCtrlRead($combo)/100

then to find the result of $combo need make

$result = $x

right?

Share this post


Link to post
Share on other sites
trancexx

:mellow: I can try my very best.

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

I like it hard, if you know what I mean :(

You'd be wrong.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
Xenobiologist

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

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  

×