Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Iconizer
Valentina
Dual Button With Rollover Effect
Cuberoids
Reference Xtra
zWinVer Xtra
MP3 Player
Scroll Buttons
NJC - Space Invaders
Convert Decimal to Comma (EU)
 

 

 

Behavior Hex Display

Added on 7/1/1999

 

Compatibilities:
D6_5 D7 D8 Mac PC Script

Rating:

Author: ColeTierney

A few movie scripts which display the ascii values of a lingo string (hexadecimal or decimal). Good for looking at junk.

--From Cole Tierney"s Code Corner
--http://homepages.together.net/%7Etierney/cole/code/
-- A few handlers for examining the contents of a lingo string.
-- Good for looking at non-ascii chars

on putHex thisStr  
  put hex( thisStr )  
end

on hex thisStr -- Returns the chars of "thisStr" as hex strings delimited by spaces  
  set outStr = ""
  set strLength = length( thisStr )  
  repeat with i = 1 to strLength
    put charToHexByteStr( char i of thisStr ) & " " after outStr
  end repeat  
  return outStr  
end

on putDec thisStr  
  put dec( thisStr )  
end

on dec thisStr -- Returns the chars of "thisStr" as decimal strings delimited by spaces  
  set outStr = ""
  set strLength = length( thisStr )  
  repeat with i = 1 to strLength
    put charToNum( char i of thisStr ) & " " after outStr
  end repeat  
  put outStr
  return out  
end

on charToHexByteStr theChar  
  set decimalValue = charToNum( theChar )  
  set nibble1 = nibNumToNibChar( integer( decimalValue / 16 ) )
  set nibble2 = nibNumToNibChar( decimalValue mod 16 )  
  return nibble1 & nibble2  
end

on nibNumToNibChar theNibble  
  case TRUE of      
    ( theNibble < 10 ): return string( theNibble )
    ( theNibble < 16 ): return numToChar( theNibble + 55 )      
    otherwise alert "Nibble overflow." & theNibble      
  end case  
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail