Postagem em destaque
- Gerar link
- X
- Outros aplicativos
BlackTDN :: Feliz Natal e Boas Festas :: via PowerShell
‘(18029799997931744,139752119745773792|%{"{0,60}"-f [Convert]::ToString($_, 2).Replace("0"," ")})-split”(.{12}|Mh)”|?{$_}’|%{iex $_;-join[char[]]$_[[char[]]"nOBB7[4oBCaenRa"]} |
ou, se preferir algo mais animado….( Powershell – Oh Christmas Tree, Oh Christmas tree – One more change :: By Sean Kearneyon )
# PowershellTree-V-whatever.PS1 #Clear the Screen clear-host #Move it all down the line write-host # Assign two special characters into an array for potential "LIGHTS" $starchar=[char][byte]15, "*" # Number of rows Deep for the Tree- from 2 to whatever fits on the screen, after 30 it gets funky $Rows = 30 # These variables are for the Bouncing Marquee at the bottom $BottomRow=$Rows+4 # Standard console Colours $colors = "DarkRed","DarkBlue","DarkCyan","DarkMagenta","DarkYellow","Gray","DarkGray","Blue","Green","Cyan","Red","Magenta","Yellow","White" # Get where the Cursor was $oldpos = $host.ui.RawUI.CursorPosition # BsponPosh’s ORIGINAL Tree building Algorithm :) Foreach ($r in ($rows..1)){ # trunk # A slight change, an extra row on the stump of the tree write-host $("{0}***" -f (' ' * ($Rows -1) )) -ForegroundColor DarkRed $host.ui.RawUI.CursorPosition = $oldpos # New Addins by Sean “The Energized Tech” Kearney # Compute the possible number of stars in tree (Number of Rows Squared) $numberstars=[math]::pow($Rows,2) # Number of lights to give to tree. %25 percent of the number of green stars. You pick $numberlights=$numberstars *.35 # Initialize an array to remember all the “Star Locations” for ($i = 0; $i -lt $numberlights; $i++) # Probably redundant, but just in case, remember where the heck I am! $oldpos = $host.ui.RawUI.CursorPosition # New change. Create an Array of positions to place lights on and off foreach ($light in ($numberlights..1)) $row=(get-random -min 1 -max (($Rows)+1)) # Pick a Random Column – Note The Column Position is $column=($Rows-$row)+(get-random -min 1 -max ($row*2)) #Grab the current position and store that away in a $Temp Variable # Now Build new location of X,Y into $HOST # Store this away for later # Now update that “STAR” with a Colour while($true) { # Now we just pull all those stars up and blank em back for ($light=1; $light -lt 7; $light++) $host.ui.RawUI.CursorPosition=($Starlocation | get-random) $flip=get-random -min 1 -max 1000 # Write a Random "star character" on the screen write-Host ($starchar | get-random) -ForegroundColor ($colors | get-random) -nonewline # Remember where we are $temppos=$oldpos # Set a position for the row and Column $oldpos.X=$BottomColumn # update the console $host.ui.Rawui.CursorPosition=$oldpos # Bump up the column position based upon direction $BottomColumn=$BottomColumn+$Direction # Ok this was a BAD way to do it but it works for If ($BottomColumn -gt $Rows) If ($BottomColumn -lt 1) # Print greeting. Space must be before and after to avoid write-host " Happy Holidays Powershell " -ForegroundColor ($colors | get-random) # End of the loop, keep doin’ in and go “loopy!” } |
Hehe… Sean Kearneyon é bem criativo… (Cheesy Christmas Tree Script)
$colors = "cyan","Green","Yellow","Red","magenta","white" Clear-Host Write-Host while($true) # Row One # Row Two # Row Three # Row Four # Row Five # Row Six # Stump $host.ui.RawUI.CursorPosition = $oldpos Write-Host |
[]s
иαldσ dj
- Gerar link
- X
- Outros aplicativos
Comentários
Postagens mais visitadas
BlackTDN :: RLeg ~ Desvendando a Função ParamBox
- Gerar link
- X
- Outros aplicativos
Protheus :: Chamando Funções do Menu Diretamente e sem a Necessidade de Login
- Gerar link
- X
- Outros aplicativos
Fazum ae de conferir meu jogo da MegaDaVirada, se eu ganhar te dou R$1 e nunca mais mexo com AdvPL.
ResponderExcluir