LOULOU Posted June 25, 2008 Posted June 25, 2008 I want ot have the modulo of this great number Mod(5117523067010037908340055150701,97) But the result is false. It will be 80 How can i do to have the right result ? Thanks
monoceres Posted June 25, 2008 Posted June 25, 2008 Hi! AutoIt doesn't support that big of a number (I don't think any language does that natively, that number is huuuuuge). I came up with a solution though MsgBox(0, "", _GreatMod("5117523067010037908340055150701","97")) Func _GreatMod($num1, $num2) RegWrite("HKCU\Software\Microsoft\Calc","layout","REG_DWORD",0); So that calc.exe will have the right layut Opt("SendKeyDelay", 0) Opt("SendKeyDownDelay", 1) $fpid = Run("calc.exe", @SystemDir, @SW_HIDE); Doesn't hide the calculator for some unknown reason(!) WinWait("[CLASS:SciCalc]") ControlSend("[CLASS:SciCalc]", "", 403, $num1) Sleep(25 * StringLen($num1) + 20) ControlClick("[CLASS:SciCalc]", "", 94) ControlSend("[CLASS:SciCalc]", "", 403, $num2) Sleep(25 * StringLen($num2) + 20) ControlClick("[CLASS:SciCalc]", "", 112) $return = StringTrimRight(ControlGetText("[CLASS:SciCalc]", "", 403), 2) ProcessClose($fpid) Return $return EndFunc ;==>_GreatMod Broken link? PM me and I'll send you the file!
LOULOU Posted June 26, 2008 Author Posted June 26, 2008 Hi! AutoIt doesn't support that big of a number (I don't think any language does that natively, that number is huuuuuge). I came up with a solution though MsgBox(0, "", _GreatMod("5117523067010037908340055150701","97")) Func _GreatMod($num1, $num2) RegWrite("HKCU\Software\Microsoft\Calc","layout","REG_DWORD",0); So that calc.exe will have the right layut Opt("SendKeyDelay", 0) Opt("SendKeyDownDelay", 1) $fpid = Run("calc.exe", @SystemDir, @SW_HIDE); Doesn't hide the calculator for some unknown reason(!) WinWait("[CLASS:SciCalc]") ControlSend("[CLASS:SciCalc]", "", 403, $num1) Sleep(25 * StringLen($num1) + 20) ControlClick("[CLASS:SciCalc]", "", 94) ControlSend("[CLASS:SciCalc]", "", 403, $num2) Sleep(25 * StringLen($num2) + 20) ControlClick("[CLASS:SciCalc]", "", 112) $return = StringTrimRight(ControlGetText("[CLASS:SciCalc]", "", 403), 2) ProcessClose($fpid) Return $return EndFunc ;==>_GreatMod Thanks for this formula doesn't works on French system
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now