SomeoneHere Posted August 22, 2009 Share Posted August 22, 2009 alright... so i have this loooong number . . . 0xB0E41803A8E4180328E51803740C1E03C0E41803A8E4180328E51803740C1E03 and i want to do certain types of arithmetic w/ it... such as addition/subtraction and bitshifting . . . problem is well.. the number is too big to store to a variable >_<... so how can i go about performing these operations? Link to comment Share on other sites More sharing options...
BugFix Posted August 22, 2009 Share Posted August 22, 2009 I think BigInteger functions may help you: http://http://www.autoitscript.com/forum/index.php?showtopic=27495&view=findpost&p=196197 Best Regards BugFix Link to comment Share on other sites More sharing options...
WolfWorld Posted August 22, 2009 Share Posted August 22, 2009 (edited) alright... so i have this loooong number . . . 0xB0E41803A8E4180328E51803740C1E03C0E41803A8E4180328E51803740C1E03 and i want to do certain types of arithmetic w/ it... such as addition/subtraction and bitshifting . . . problem is well.. the number is too big to store to a variable >_<... so how can i go about performing these operations? That should not be a problem, autoit can't have line exceed 1024. Split your string to $sString = "rwrwerereVeryLongddddddddddd" & _ "tewtetnext line joining" Oops, sorry. I thought you convert the number to HEX to post it here(did not even check the HEX yet) Edited August 22, 2009 by athiwatc Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets! Link to comment Share on other sites More sharing options...
Yashied Posted August 22, 2009 Share Posted August 22, 2009 Maybe split into pieces (array of DWORD) and work with it. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Bowmore Posted August 22, 2009 Share Posted August 22, 2009 (edited) The following wikipedia article contains a useful introduction to arbitrary precision arithmetic. There are also links to some free function libraries code that it should be possible to convert into AutoIt code. It is however likely to be very slow. This sort of stuff is very slow, even when implemented in C http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic Edited August 22, 2009 by Bowmore "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
Yashied Posted August 22, 2009 Share Posted August 22, 2009 Well, addition/subtraction and bitshifting will not be slow. In principle there is nothing complicated. Just work with the digits of two numbers, starting with the last one and convert to the string. I'll be glad if somebody will make the working UDF for AutoIt. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
SomeoneHere Posted August 22, 2009 Author Share Posted August 22, 2009 (edited) **edited** Edited August 22, 2009 by SomeoneHere Link to comment Share on other sites More sharing options...
SomeoneHere Posted August 22, 2009 Author Share Posted August 22, 2009 (edited) alright, so now i gotta change what i was doing... the thing is i use MemoryRead (from NomadMemory.au3) to read which is the size of "char[32]" . . . i have everything working fine but now i have a problem... sometimes when i go to read char[32], it doesn't read it all, it only reads the first 16 dwords . . . any solutions for this? . . . i need to get all 32 dwords >_< and i can't read them separately because it's constantly changing Edited August 22, 2009 by SomeoneHere Link to comment Share on other sites More sharing options...
SomeoneHere Posted August 22, 2009 Author Share Posted August 22, 2009 NomadMemory.au3 . . . http://pastebin.com/m348e7195 Link to comment Share on other sites More sharing options...
martin Posted August 23, 2009 Share Posted August 23, 2009 alright, so now i gotta change what i was doing... the thing is i use MemoryRead (from NomadMemory.au3) to read which is the size of "char[32]" . . . i have everything working fine but now i have a problem... sometimes when i go to read char[32], it doesn't read it all, it only reads the first 16 dwords . . . any solutions for this? . . . i need to get all 32 dwords >_< and i can't read them separately because it's constantly changing If you need to read 32 DWORDs why do you use char[32] which is 32 bytes? I would have thought that char[32] would only read the first 8 DWORDS. Are you sure they are dwords and not words? Why not use char[128] for 32 dwords or char[64] for 32 words? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
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