for example:
enter 4-2 and 1-8
and it will calculate
4 feet * 12 inches = 48 inches +2 inches = 50 inches
1 feet * 8 inches = 12 inches + 8 inches = 20 inches
and then multiply together = 1,000 square inches
and then calculate square feet & inches
1000 square inches / 144 inches = 6.94 sq.ft.
0.94 * 12 = 11.28
therefore Answer = 6-11 (6 feet 11 inches)
thanks in advance! what am i doing wrong?
i try to make it with function too and no cigar..
Code: Select all
[code=autohotkey file=Untitled.ahk]:*:CA::
Inputbox, length1
Inputbox, length2
length1arr := strSplit(length1, "-")
length2arr := strSplit(length2, "-")
msgbox, % length1arr[1]
inches1 := totalinches(strSplit(length1, "-"), strSplit(length2, "-"))
msgbox, % inches1
inches2 := length2arr.1 * 12 + length2arr.2
answer = inches1 * inches2 * 2
answerinch := mod(answer,12)
answerfeet = %answer% - %answerinch%
answerfeet = answer /12
msgbox, % answerfeet + "-" + answerinch
return
totalinches(feet,inches)
{
Return feet * 12 + inches
}