logo       

Re: QuickQuestion: msg#00273

windows.autoit.user

Subject: Re: QuickQuestion

By jove yes I think I do know!! Well I do in a sense. Larry, I think
I am going to let you change up the Multiply Function so you can set
the amount of decimals and round.

So here it is:
First thing to do is download the multiply function. you can find it
here
http://groups.yahoo.com/group/AutoItList/files/FUNCTIONS/Multiply.aut

Then write this script.
Let's assume the price of the product is $10.15

SetBatchLines,150
SetEnv,$Argument1,10.15
SetEnv,$Argument2,1.0625
GoSub,$Multiply
IfNotInString,$Result,.,Goto,Finish
StringGetPos,DecPos,$Result,.
StringLeft,WholeNum,$Result,%DecPos%
EnvAdd,DecPos,2
StringMid,DecNum,$Result,%DecPos%,3
StringLen,DecLength,DecNum
IfEqual,DecLength,1,SetEnv,DecNum,%DecNum%0
IfEqual,DecLength,1,Goto,joinValue
IfEqual,DecLength,2,Goto,JoinValue
StringRight,RoundNum,DecNum,1
StringTrimRight,DecNum,DecNum,1
IfGreater,RoundNum,4,EnvAdd,DecNum,1
JoinValue:
SetEnv,$Result,%WholeNum%.%DecNum%
Finish:
MsgBox,4096,Total,%$Result%
exit
#Include Multiply.aut

Make sure this script and the multiply.aut script you downloaded are
in the same folder. Then run it. It should do exactly what you want.

red

--- In AutoItList@xxxxxxxxxxxxxxx, "Private Name" <larrydalooza@xxxx>
wrote:
> Red, you take this one, I gotta make dinner...
>
> Larry
>
> --- In AutoItList@xxxxxxxxxxxxxxx, "Jeff" <fusionmystik@xxxx> wrote:
> > i need to make a program that you enter a price and then it will
do
> > the tax of 6.25% anyone know how that would be possible?


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Looking for the latest Free IT White Papers?
Visit SearchNetworking.com to access over 500 white papers.
Get instant access at SearchNetworking.com Today
http://us.click.yahoo.com/YyjvfD/OLNGAA/uitMAA/EGnolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
AutoItList-unsubscribe@xxxxxxxxxxxxxxx



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise