SetFormat, FloatFast, 0.3 ; формат округления числа
OnMessage(WM_LBUTTONDOWN:=0x201, "WndProc")
;Space:: ; клавишу можете задать сами
Repeat:
++Itr
SetTimer, WSets, -50
InputBox, Counter
, % "AHK InputBox"
, % "digits only, step: "Itr
,, 125, 90
, A_ScreenWidth/2-65
, A_ScreenHeight/2-45
If ErrorLevel
ExitApp
If Not Counter~="^[0-9]*\.?[0-9]+$"
{
--Itr
Goto, Repeat
}
A_Space . (Itr=1 ? Dividend:=Counter:Divider:=Counter)
Goto, % Itr=1 ? "Repeat":"Continue"
Continue:
; в общем исходя из того, что я не понял, 6-той пункт, сделал пример отсюда:
; http://ru.wikipedia.org/wiki/Процент
MsgBox, 262208
, % Dividend "/"Divider "%"
, % "Result: "Dividend*(Divider/100) ; собственно тут математика
;, % 1.5
ExitApp
WSets:
WinSet, AlwaysOnTop, On, A
WinSet, Style, -0x1440000, A
ControlSetText, Button2, Exit, A
Return
WndProc(p*)
{
PostMessage, WM_NCLBUTTONDOWN:=0xA1, HTCAPTION:=2,,, % "ahk_id"p.4
}