Source language: Translate to:

UTF-8

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Postby Capn » Sat Jul 18, 2009 11:54 am

I know this is an extremely old post but I thought I'd toss this in here anyway, for those that might find it useful -- or to hear from those that might have a better way to do it...

Code: Select all
. init input var ...
SetVar "[FIXCHARS.VAR]" "[TextVar]"

Loop "33" "88" "[I]"

     SetVar "[J]" "56+[I]"
     SetVar "[K]" "56+[J]"
     SetVar "[L]" "56+[K]"

         StrReplace "[FIXCHARS.VAR]" "&#[I];" "[#[I]]" "[FIXCHARS.VAR]" ""
         StrReplace "[FIXCHARS.VAR]" "&#[I];" "[#[I]]" "[FIXCHARS.VAR]" ""

         StrReplace "[FIXCHARS.VAR]" "&#[J];" "[#[J]]" "[FIXCHARS.VAR]" ""
         StrReplace "[FIXCHARS.VAR]" "&#[J];" "[#[J]]" "[FIXCHARS.VAR]" ""

         StrReplace "[FIXCHARS.VAR]" "&#[K];" "[#[K]]" "[FIXCHARS.VAR]" ""
         StrReplace "[FIXCHARS.VAR]" "&#[K];" "[#[K]]" "[FIXCHARS.VAR]" ""

         StrReplace "[FIXCHARS.VAR]" "&#[L];" "[#[L]]" "[FIXCHARS.VAR]" ""
         StrReplace "[FIXCHARS.VAR]" "&#[L];" "[#[L]]" "[FIXCHARS.VAR]" ""

EndLoop


. set output
SetVar "[TextVar]" "[FIXCHARS.VAR]"



It would be more useful as a subroutine or a function rather than the example shown.

Basically, it splits the range of 33 through 256 into four equal columns then replaces the characters as per their corresponding loop values.

I haven't tried a routine for Hex characters yet. Anybody else?
Capn
 
Posts: 23
Joined: Thu Dec 13, 2007 11:58 am

Postby Alex » Sat Jul 18, 2009 12:21 pm

Hi Capn,

Cool thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Previous

Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests

cron