Savage_CL commented on a Page, 'You PC is dead!' Fun script  -  Aug 09, 2013

Alright, so I know the point is to be mirthful and not have any real use, but isn't it a little silly, considering you would have to somehow get your target to load a script that spells out "you PC is dead."? You might find this useful, too:

; ascii numbers, space delimited, converted to string
alias a2s {
  ; define our variables
  var %ceiling = $0,%iterator = 1,%string,%number
  ; get through the numbers
  while (%iterator <= %ceiling) {
    ; what is our number?
    %number = $ [ $+ [ %iterator ] ]
    ; is it actually a number? if not, just quit now.
    if (%number !isnum) { return $false }
    ; We're here? good! It's a number
    ; add the corresponding character to the string, replacing spaces with something outrageous to keep track of them later
    %string = %string $+ $chr($iif(%number == 32,12345,$v1))
    ; move on
    inc %iterator
  }
  ; we have our built string with the replaced spaces. Let's change those back and wrap this show up
  %string = $replace(%string,$chr(12345),$chr(32))
  if ($isid) {
    return %string
  }
  echo -a %string
}

; string to ascii numbers, string delimited.
alias s2a {
  ; set the variables
  var %ceiling = $len($1-),%iterator = 1,%string
  ; get through each character in the string
  while (%iterator <= %ceiling) {
    ; add the next number
    %string = %string $asc($mid($1-,%iterator,1))
    ; move on
    inc %iterator
  }
  ; we have our numbers, let's wrap things up!
  if ($isid) {
    return %string
  }
  echo -a %string
}

Oh, also, you don't need the "/" at the beginning of each line in the alias, as evident by my snippet above.

Yama  -  Aug 17, 2013

I know that I don't need to use "/", but I'm used to it^^
Hm... I don't get what your code should do.

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.