Mat Posted June 10, 2009 Posted June 10, 2009 (edited) Another program addon i've done, this one is as professional as possible, with context help (thanks to yashied), and calculating as you type etc.Thanks to WBD for his improved _ToBase + _FromBase functions.My main problems was the calculating as you type, as it led to a very slow program at times, but after I figured out a good method to do the roman numerals, I was pretty much sorted! The other one was using contexthelp with a window set on top, and I still haven't worked that one out...Thanks also to yashied, for the nice nd easy context help udf's.Download linkDownloads so far is shown on the download pageMatEdit: Updated download link. Edited April 26, 2010 by Mat AutoIt Project Listing
WideBoyDixon Posted June 10, 2009 Posted June 10, 2009 Your _IntToAny() function looks very complex! Granted that this doesn't have the error checking but it's a bit simpler: Func _ToBase($iNumber, $iBase, $iPad = 1) Local $sRet = "", $iDigit Do $iDigit = Mod($iNumber, $iBase) $sRet = Chr(48 + $iDigit + 7 * ($iDigit > 9)) & $sRet $iNumber = Int($iNumber / $iBase) Until ($iNumber = 0) And (StringLen($sRet) >= $iPad) Return $sRet EndFunc ;==>_ToBase WBD [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center]
Mat Posted June 10, 2009 Author Posted June 10, 2009 thats jennicos... Funny you should say it, i just noticed _ToBase in your sig!! error checking is not a problem, I do that in the loop. I'll have a proper look when I get back, i need to rush off now MDiesel AutoIt Project Listing
WideBoyDixon Posted June 10, 2009 Posted June 10, 2009 A companion function for _ToBase() is: Func _FromBase($sNumber, $iBase) Local $iRet = 0, $sChar Do $iRet *= $iBase $sChar = StringLeft($sNumber, 1) $iRet += Asc($sChar) + 7 * (Asc($sChar) < 58) - 55 $sNumber = StringMid($sNumber, 2) Until $sNumber = "" Return $iRet EndFunc HTH WBD [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center]
Mat Posted June 10, 2009 Author Posted June 10, 2009 you clock in 0.2 ms faster from the tests i've done wbd, so i'm using yours!! Thanks to WBD, code now updated. For some odd reason something wierd happens beyond 15 digits, I am building in testing the length at the mo. MDiesel AutoIt Project Listing
Mat Posted June 12, 2009 Author Posted June 12, 2009 (edited) Updated with improvements to code, it also has resizing now. MDiesel and another!! I have almost "completed" it. (quote marks used deliberately, I very much doubt This will ever be truly complete.) Edited June 15, 2009 by mdiesel AutoIt Project Listing
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