- IP to Decimal Converter.livecode.zip
- Here's the stack.
- (15.1 KiB) Downloaded 309 times
IP to Decimal converter
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
-
- Livecode Opensource Backer
- Posts: 132
- Joined: Mon Jan 14, 2013 3:37 pm
Re: IP to Decimal converter
Thank you Richmond.
I thought it might be useful if the decimal number could also be converted back to an IP address, so I gave it a try:
- Gerrie
I thought it might be useful if the decimal number could also be converted back to an IP address, so I gave it a try:
Code: Select all
set the itemdelimiter to "."
if fld "DEK" is an integer then
put fld "DEK" into tNum
put tNum div (256^3) into fld "EYEPEE"
subtract fld "EYEPEE" * (256^3) from tNum
put "." & tNum div (256^2) after fld "EYEPEE"
subtract item 2 of fld "EYEPEE" * (256^2) from tNum
put "." & tNum div 256 after fld "EYEPEE"
subtract item 3 of fld "EYEPEE" * 256 from tNum
put "." & tNum after fld "EYEPEE"
end if
010100000110010101100001011000110110010100111101010011000110111101110110011001010010101101010100011100100111010101110100011010000010101101001010011101010111001101110100011010010110001101100101
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: IP to Decimal converter
Well Ledgitimate/Gerrie there is no earthly reason why you shouldn't
download my stack, put your script into a new button, bung your
name on the front (next to mine if
you want to be fair) and re-uploading it.
download my stack, put your script into a new button, bung your
name on the front (next to mine if
you want to be fair) and re-uploading it.
-
- Livecode Opensource Backer
- Posts: 132
- Joined: Mon Jan 14, 2013 3:37 pm
Re: IP to Decimal converter
Okay, here it is
- Gerrie

- Gerrie
- Attachments
-
- IP to Decimal Converter.livcode.zip
- Here's the stack with the new button.
- (20.95 KiB) Downloaded 249 times
010100000110010101100001011000110110010100111101010011000110111101110110011001010010101101010100011100100111010101110100011010000010101101001010011101010111001101110100011010010110001101100101