Add to Technorati Favorites
Welcome to ThePowerShellGuy.com Sign in | Join | Help

Browse by Tags

All Tags » Hex   (RSS)

PowerShell : to Hex and back

from an IRC question : [string]::join('',([byte[]]([regex]::matches("1A3761592352350C7A5F20172F1E1A190E2B017313371312141A1539",'\w{2}') |% {"0x$_"}) |% {$_.tostring('x')})) 1a376159235235c7a5f20172f1e1a19e2b17313371312141a1539 Ok, maybe more useful on
Posted by MoW | 0 Comments
Filed under: ,

Hey PowerShell Guy ! what is the Hex value of Chocolate ?

Didn't you always' wanted to know this ? This time not a Hey Scripting Guy ! translation, but from a NG post answer Translating colors to hex and back (color asked was Red actually ;-) ) : PoSH> "{0:x}" -f ([drawing.Color]'Chocolate').ToArgb() ffd2691e
Posted by admin | 4 Comments
Filed under: , , ,

Scripting Games 2007 Beginner PowerShell Event 5

I did not enter the beginners PowerShell Division, but did this 2 oneliners for Event 5: ABCs and 123s ( PS Answer: ABCs and 123s ) in the Beginner division: $r = $str.tochararray() | % {([int]$_).toString('x')} [String]::join('',[Char[]]($r |% {[int]"0x$_"}))
Posted by admin | 2 Comments