Iconizer

Iconizer - A stupid program to convert text into icons to display on Ascii-world forums. There is no real purpose to this other than I need a break from another project.

'=========================================================================
'Iconizer - A stupid program to convert text into icons
'to display on Ascii-world forums. There is no real purpose to this
'other than I need a break from another project.
'Letters aA - zZ are transliterated with an icon synbol, as are a space (arrow icon)
'a question mark and an exclamation mark. Other characters are passed through.
'To pass through one of the transliterated chars use the \ character.
'Written using FB .14b
'Public Domain
'=========================================================================
Option Explicit

Dim icout As String
Dim icn As String
Dim i As Integer
Dim ch As String
Dim skey As String
Dim passthrough As Integer

Sub PrintTitle
    Color 14, 0
    Locate 1, 40 - Len("Iconizer")
    Print "Inconizer"
End Sub

getinput:
Cls
PrintTitle
Color 15, 0
Locate 2, 1
Input "Enter text to iconize: ";icn
icout = ""
For i = 1 To Len(icn)
    ch = LCase$(Mid$(icn, i, 1))
    If passthrough Then
        icout = icout  + ch + " "
        passthrough = 0
    Else
        Select Case ch
            Case "a": icout = icout  + ":D "
            Case "b": icout =  icout  + ":) "
            Case "c": icout = icout  + ":( "
            Case "d": icout = icout  + ":o "
            Case "e":  icout = icout  + ":idea: "
            Case "f":  icout = icout  + ":shock:"
            Case "g":  icout = icout  + ":? "
            Case "h":  icout = icout  + "8) "
            Case "i":  icout = icout  + ":lol: "
            Case "j":  icout = icout  + ":x "
            Case "k":  icout = icout  + ":P "
            Case "l":  icout = icout  + ":oops: "
            Case "m":  icout = icout  + ":cry: "
            Case "n":  icout = icout  + ":evil: "
            Case "o":  icout = icout  + ":twisted: "
            Case "p":  icout = icout  + ":roll: "
            Case "q":  icout = icout  + ":wink: "
            Case "r":  icout = icout  + ":| "
            Case "s":  icout = icout  + ":mrgreen: "
            Case "t":  icout = icout  + ":asmile: "
            Case "u":  icout = icout  + ":asmile2: "
            Case "v":  icout = icout  + ":aclub: "
            Case "w":  icout = icout  + ":astar: "
            Case "x":  icout = icout  + ":aspade: "
            Case "y":  icout = icout  + ":adiamond: "
            Case "z":  icout = icout  + ":aheart: "
            Case "!":  icout = icout  + ":!: "
            Case "?":  icout = icout  + ":?: "
            Case " ":  icout = icout  + ":arrow: "
            Case "\": passthrough = 1
            Case Else: icout = icout  + ch + " "
        End Select
    End If
Next
Cls
PrintTitle
Color 15, 0
Locate 2, 1
Print "Output:"
Print icout
Print
Do
    Input "Another translation (Y,N): ";skey
    skey = UCase$(skey)
Loop Until skey = "Y" Or skey = "N"
If skey = "Y" Then Goto getinput
End
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.