Jump to content
Sign in to follow this  
Oel

Super-Duper-Save-Text-Converter

Recommended Posts

Oel

Always thought saving your password on your computer without taking the risk that someone steals it?

Then this script is right for you!

 

This script reads and creates weird codes that almost no one can read (except you of course.)

 

code: Good luck understanding this code... its a mess

;D_O CODE by: DasOel

;Ignore the "$charX possibly used befored declaration." errors
#include <BMP3.au3>
#include <Array.au3>

Global $String = "I <3 Super-Duper-Save-Text-Converter"
Global $ReadFile = False
Global $FileDir = "C:\Users\FinOel\Desktop\test.bmp"


Global $stackX[0]
Global $stackY[0]
Global $stackColor[0]
Global $lastX = 0
Global $lastY = 0





#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$mainForm = GUICreate("Super-Duper-Save-Text-Converter", 334, 187, 192, 124)
$loadFIle = GUICtrlCreateGroup("Load File", 0, 0, 329, 105)
$Input1 = GUICtrlCreateInput("Filedir, .bmp!", 16, 24, 209, 24)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Load", 240, 24, 75, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("Output:", 8, 80, 306, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group1 = GUICtrlCreateGroup("Create File", 0, 104, 329, 81)
$Input2 = GUICtrlCreateInput("Filedir, .bmp!", 16, 152, 217, 24)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("Create", 240, 152, 75, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Text = GUICtrlCreateInput("Text", 16, 128, 217, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            GUICtrlSetData($Label2, "Output: Loading...")
            ReadCode(GUICtrlRead($Input1))
            GUICtrlSetData($Label2, "Output: " & $result)
        Case $Button2
            SetChars()
            CreateCode(GUICtrlRead($Text))


    EndSwitch
WEnd









if $ReadFile == False Then
    SetChars()
    CreateCode($String)

Else
    ReadCode($FileDir)
EndIf

Func RandomHexColor()
    Local $color
    For $i = 1 To 6
        $ranCharNum = Random(1,2,1)

        if $ranCharNum == 1 Then
            $ranNum = Random(1,9,1)
            $color = $color & $ranNum
        Else
            $ranChar = Random(1,6,1)
            if $ranChar == 1 Then
                $char = "A"
            EndIf
            if $ranChar == 2 Then
                $char = "B"
            EndIf
            if $ranChar == 3 Then
                $char = "C"
            EndIf
            if $ranChar == 4 Then
                $char = "D"
            EndIf
            if $ranChar == 5 Then
                $char = "E"
            EndIf
            if $ranChar == 6 Then
                $char = "F"
            EndIf
            $color = $color & $char
        EndIf
    Next
    return $color
EndFunc

Func SetChars($readfile2 = false)
    ConsoleWrite(@CRLF & "Setting chars..." & @CRLF)
    if $readfile2 == false Then

        ;Step 1 ////////////////////////////////////////////////////
        Global $charA = RandomHexColor()
        Global $charB = RandomHexColor()
        Global $charC = RandomHexColor()
        Global $charD = RandomHexColor()
        Global $charE = RandomHexColor()
        Global $charF = RandomHexColor()
        Global $charG = RandomHexColor()
        Global $charH = RandomHexColor()
        Global $charI = RandomHexColor()
        Global $charJ = RandomHexColor()
        Global $charK = RandomHexColor()
        Global $charL = RandomHexColor()
        Global $charM = RandomHexColor()
        Global $charN = RandomHexColor()
        Global $charO = RandomHexColor()
        Global $charP = RandomHexColor()
        Global $charQ = RandomHexColor()
        Global $charR = RandomHexColor()
        Global $charS = RandomHexColor()
        Global $charT = RandomHexColor()
        Global $charU = RandomHexColor()
        Global $charV = RandomHexColor()
        Global $charW = RandomHexColor()
        Global $charX = RandomHexColor()
        Global $charY = RandomHexColor()
        Global $charZ = RandomHexColor()

        Global $charAu = RandomHexColor()
        Global $charBu = RandomHexColor()
        Global $charCu = RandomHexColor()
        Global $charDu = RandomHexColor()
        Global $charEu = RandomHexColor()
        Global $charFu = RandomHexColor()
        Global $charGu = RandomHexColor()
        Global $charHu = RandomHexColor()
        Global $charIu = RandomHexColor()
        Global $charJu = RandomHexColor()
        Global $charKu = RandomHexColor()
        Global $charLu = RandomHexColor()
        Global $charMu = RandomHexColor()
        Global $charNu = RandomHexColor()
        Global $charOu = RandomHexColor()
        Global $charPu = RandomHexColor()
        Global $charQu = RandomHexColor()
        Global $charRu = RandomHexColor()
        Global $charSu = RandomHexColor()
        Global $charTu = RandomHexColor()
        Global $charUu = RandomHexColor()
        Global $charVu = RandomHexColor()
        Global $charWu = RandomHexColor()
        Global $charXu = RandomHexColor()
        Global $charYu = RandomHexColor()
        Global $charZu = RandomHexColor()

        Global $charSPACE = RandomHexColor()
        Global $charDOUBLEDOT = RandomHexColor()
        Global $charSLASH = RandomHexColor()
        Global $charBACKSLASH = RandomHexColor()
        Global $charUNDERLINED = RandomHexColor()
        Global $charHYPHEN = RandomHexColor()
        Global $charDOT = RandomHexColor()
        Global $charAT = RandomHexColor()
        Global $char0 = RandomHexColor()
        Global $char1 = RandomHexColor()
        Global $char2 = RandomHexColor()
        Global $char3 = RandomHexColor()
        Global $char4 = RandomHexColor()
        Global $char5 = RandomHexColor()
        Global $char6 = RandomHexColor()
        Global $char7 = RandomHexColor()
        Global $char8 = RandomHexColor()
        Global $char9 = RandomHexColor()
        Global $charMAL = RandomHexColor()
        Global $charPLUS = RandomHexColor()
        Global $charOPEN = RandomHexColor()
        Global $charCLOSE = RandomHexColor()
        Global $charKOMMA = RandomHexColor()
        Global $charISEQUAL = RandomHexColor()
        Global $charQUESTION = RandomHexColor()
        Global $charHASHTAG = RandomHexColor()
        Global $charAND = RandomHexColor()
        Global $charAE = RandomHexColor()
        Global $charOE = RandomHexColor()
        Global $charUE = RandomHexColor()
        Global $charEXCLAMATION = RandomHexColor()
        Global $charGREATER = RandomHexColor()
        Global $charLESS = RandomHexColor()
    Else

    EndIf
EndFunc

Func StringEquals($string1, $string2)
    if StringInStr($string1, $string2) Then
        return True
    Else
        return False
    EndIf
EndFunc

Func CreateCode($String2)
    $String2 = $String2
    ConsoleWrite(@CRLF & "Creating code..." & @CRLF)
    For $i = 1 To StringLen($String2)

        _ArrayAdd($stackX, $lastX)
        _ArrayAdd($stackY, $lastY)

        if $lastX + 2 > 20 or $lastX + 2 == 20 Then
            $lastX = 0
            $lastY += 1
        Else
            $lastX += 2
        EndIf

        ;Step 2 ////////////////////////////////////////////////
        if GetFirstChar($String2, $i) == "a" Then
            _ArrayAdd($stackColor, $charA)
        EndIf
        if GetFirstChar($String2, $i) == "b" Then
            _ArrayAdd($stackColor, $charB)
        EndIf
        if GetFirstChar($String2, $i) == "c" Then
            _ArrayAdd($stackColor, $charC)
        EndIf
        if GetFirstChar($String2, $i) == "d" Then
            _ArrayAdd($stackColor, $charD)
        EndIf
        if GetFirstChar($String2, $i) == "e" Then
            _ArrayAdd($stackColor, $charE)
        EndIf
        if GetFirstChar($String2, $i) == "f" Then
            _ArrayAdd($stackColor, $charF)
        EndIf
        if GetFirstChar($String2, $i) == "g" Then
            _ArrayAdd($stackColor, $charG)
        EndIf
        if GetFirstChar($String2, $i) == "h" Then
            _ArrayAdd($stackColor, $charH)
        EndIf
        if GetFirstChar($String2, $i) == "i" Then
            _ArrayAdd($stackColor, $charI)
        EndIf
        if GetFirstChar($String2, $i) == "j" Then
            _ArrayAdd($stackColor, $charJ)
        EndIf
        if GetFirstChar($String2, $i) == "k" Then
            _ArrayAdd($stackColor, $charK)
        EndIf
        if GetFirstChar($String2, $i) == "l" Then
            _ArrayAdd($stackColor, $charL)
        EndIf
        if GetFirstChar($String2, $i) == "m" Then
            _ArrayAdd($stackColor, $charM)
        EndIf
        if GetFirstChar($String2, $i) == "n" Then
            _ArrayAdd($stackColor, $charN)
        EndIf
        if GetFirstChar($String2, $i) == "o" Then
            _ArrayAdd($stackColor, $charO)
        EndIf
        if GetFirstChar($String2, $i) == "p" Then
            _ArrayAdd($stackColor, $charP)
        EndIf
        if GetFirstChar($String2, $i) == "q" Then
            _ArrayAdd($stackColor, $charQ)
        EndIf
        if GetFirstChar($String2, $i) == "r" Then
            _ArrayAdd($stackColor, $charR)
        EndIf
        if GetFirstChar($String2, $i) == "s" Then
            _ArrayAdd($stackColor, $charS)
        EndIf
        if GetFirstChar($String2, $i) == "t" Then
            _ArrayAdd($stackColor, $charT)
        EndIf
        if GetFirstChar($String2, $i) == "u" Then
            _ArrayAdd($stackColor, $charU)
        EndIf
        if GetFirstChar($String2, $i) == "v" Then
            _ArrayAdd($stackColor, $charV)
        EndIf
        if GetFirstChar($String2, $i) == "w" Then
            _ArrayAdd($stackColor, $charW)
        EndIf
        if GetFirstChar($String2, $i) == "x" Then
            _ArrayAdd($stackColor, $charX)
        EndIf
        if GetFirstChar($String2, $i) == "y" Then
            _ArrayAdd($stackColor, $charY)
        EndIf
        if GetFirstChar($String2, $i) == "z" Then
            _ArrayAdd($stackColor, $charZ)
        EndIf





        if GetFirstChar($String2, $i) == "A" Then
            _ArrayAdd($stackColor, $charAu)
        EndIf
        if GetFirstChar($String2, $i) == "B" Then
            _ArrayAdd($stackColor, $charBu)
        EndIf
        if GetFirstChar($String2, $i) == "C" Then
            _ArrayAdd($stackColor, $charCu)
        EndIf
        if GetFirstChar($String2, $i) == "D" Then
            _ArrayAdd($stackColor, $charDu)
        EndIf
        if GetFirstChar($String2, $i) == "E" Then
            _ArrayAdd($stackColor, $charEu)
        EndIf
        if GetFirstChar($String2, $i) == "F" Then
            _ArrayAdd($stackColor, $charFu)
        EndIf
        if GetFirstChar($String2, $i) == "G" Then
            _ArrayAdd($stackColor, $charGu)
        EndIf
        if GetFirstChar($String2, $i) == "H" Then
            _ArrayAdd($stackColor, $charHu)
        EndIf
        if GetFirstChar($String2, $i) == "I" Then
            _ArrayAdd($stackColor, $charIu)
        EndIf
        if GetFirstChar($String2, $i) == "J" Then
            _ArrayAdd($stackColor, $charJu)
        EndIf
        if GetFirstChar($String2, $i) == "K" Then
            _ArrayAdd($stackColor, $charKu)
        EndIf
        if GetFirstChar($String2, $i) == "L" Then
            _ArrayAdd($stackColor, $charLu)
        EndIf
        if GetFirstChar($String2, $i) == "M" Then
            _ArrayAdd($stackColor, $charMu)
        EndIf
        if GetFirstChar($String2, $i) == "N" Then
            _ArrayAdd($stackColor, $charNu)
        EndIf
        if GetFirstChar($String2, $i) == "O" Then
            _ArrayAdd($stackColor, $charOu)
        EndIf
        if GetFirstChar($String2, $i) == "P" Then
            _ArrayAdd($stackColor, $charPu)
        EndIf
        if GetFirstChar($String2, $i) == "Q" Then
            _ArrayAdd($stackColor, $charQu)
        EndIf
        if GetFirstChar($String2, $i) == "R" Then
            _ArrayAdd($stackColor, $charRu)
        EndIf
        if GetFirstChar($String2, $i) == "S" Then
            _ArrayAdd($stackColor, $charSu)
        EndIf
        if GetFirstChar($String2, $i) == "T" Then
            _ArrayAdd($stackColor, $charTu)
        EndIf
        if GetFirstChar($String2, $i) == "U" Then
            _ArrayAdd($stackColor, $charUu)
        EndIf
        if GetFirstChar($String2, $i) == "V" Then
            _ArrayAdd($stackColor, $charVu)
        EndIf
        if GetFirstChar($String2, $i) == "W" Then
            _ArrayAdd($stackColor, $charWu)
        EndIf
        if GetFirstChar($String2, $i) == "X" Then
            _ArrayAdd($stackColor, $charXu)
        EndIf
        if GetFirstChar($String2, $i) == "Y" Then
            _ArrayAdd($stackColor, $charYu)
        EndIf
        if GetFirstChar($String2, $i) == "Z" Then
            _ArrayAdd($stackColor, $charZu)
        EndIf








        if GetFirstChar($String2, $i) == " " Then
            _ArrayAdd($stackColor, $charSPACE)
        EndIf
        if GetFirstChar($String2, $i) == ":" Then
            _ArrayAdd($stackColor, $charDOUBLEDOT)
        EndIf
        if GetFirstChar($String2, $i) == "/" Then
            _ArrayAdd($stackColor, $charSLASH)
        EndIf
        if GetFirstChar($String2, $i) == "\" Then
            _ArrayAdd($stackColor, $charBACKSLASH)
        EndIf
        if GetFirstChar($String2, $i) == "_" Then
            _ArrayAdd($stackColor, $charUNDERLINED)
        EndIf
        if GetFirstChar($String2, $i) == "-" Then
            _ArrayAdd($stackColor, $charHYPHEN)
        EndIf
        if GetFirstChar($String2, $i) == "0" Then
            _ArrayAdd($stackColor, $char0)
        EndIf
        if GetFirstChar($String2, $i) == "1" Then
            _ArrayAdd($stackColor, $char1)
        EndIf
        if GetFirstChar($String2, $i) == "2" Then
            _ArrayAdd($stackColor, $char2)
        EndIf
        if GetFirstChar($String2, $i) == "3" Then
            _ArrayAdd($stackColor, $char3)
        EndIf
        if GetFirstChar($String2, $i) == "4" Then
            _ArrayAdd($stackColor, $char4)
        EndIf
        if GetFirstChar($String2, $i) == "5" Then
            _ArrayAdd($stackColor, $char5)
        EndIf
        if GetFirstChar($String2, $i) == "6" Then
            _ArrayAdd($stackColor, $char6)
        EndIf
        if GetFirstChar($String2, $i) == "7" Then
            _ArrayAdd($stackColor, $char7)
        EndIf
        if GetFirstChar($String2, $i) == "8" Then
            _ArrayAdd($stackColor, $char8)
        EndIf
        if GetFirstChar($String2, $i) == "9" Then
            _ArrayAdd($stackColor, $char9)
        EndIf
        if GetFirstChar($String2, $i) == "@" Then
            _ArrayAdd($stackColor, $charAT)
        EndIf
        if GetFirstChar($String2, $i) == "." Then
            _ArrayAdd($stackColor, $charDOT)
        EndIf
        if GetFirstChar($String2, $i) == "*" Then
            _ArrayAdd($stackColor, $charMAL)
        EndIf
        if GetFirstChar($String2, $i) == "+" Then
            _ArrayAdd($stackColor, $charPLUS)
        EndIf
        if GetFirstChar($String2, $i) == "(" Then
            _ArrayAdd($stackColor, $charOPEN)
        EndIf
        if GetFirstChar($String2, $i) == ")" Then
            _ArrayAdd($stackColor, $charCLOSE)
        EndIf
        if GetFirstChar($String2, $i) == "," Then
            _ArrayAdd($stackColor, $charKOMMA)
        EndIf
        if GetFirstChar($String2, $i) == "=" Then
            _ArrayAdd($stackColor, $charISEQUAL)
        EndIf
        if GetFirstChar($String2, $i) == "?" Then
            _ArrayAdd($stackColor, $charQUESTION)
        EndIf
        if GetFirstChar($String2, $i) == "#" Then
            _ArrayAdd($stackColor, $charHASHTAG)
        EndIf
        if GetFirstChar($String2, $i) == "&" Then
            _ArrayAdd($stackColor, $charAND)
        EndIf
        if GetFirstChar($String2, $i) == "ä" Then
            _ArrayAdd($stackColor, $charAE)
        EndIf
        if GetFirstChar($String2, $i) == "ö" Then
            _ArrayAdd($stackColor, $charOE)
        EndIf
        if GetFirstChar($String2, $i) == "ü" Then
            _ArrayAdd($stackColor, $charUE)
        EndIf
        if GetFirstChar($String2, $i) == "!" Then
            _ArrayAdd($stackColor, $charEXCLAMATION)
        EndIf
        if GetFirstChar($String2, $i) == ">" Then
            _ArrayAdd($stackColor, $charGREATER)
        EndIf
        if GetFirstChar($String2, $i) == "<" Then
            _ArrayAdd($stackColor, $charLESS)
        EndIf

    Next
    if $lastX + 2 > 20 or $lastX + 2 == 20 Then
        $lastX = 0
        $lastY += 1
    Else
        $lastX += 2
    EndIf
    _ArrayAdd($stackX, $charX)
    _ArrayAdd($stackY, $charY)
    _ArrayAdd($stackColor, "FFFFFF")

    ConsoleWrite(@CRLF & "Painting image..." & @CRLF)
    $BMP = _BMPCreate(20, $lastY + 9) ;Step3 /////////////////////////////
    For $i = 0 To StringLen($String2) - 1
        ConsoleWrite(@CRLF & $i & "/" & StringLen($String2))
        _PixelWrite($BMP, $stackX[$i], $stackY[$i], $stackColor[$i])
    Next

    ;Step 4 ////////////////////////////////////////////////////////////
    If StringEquals($String2, "a") Then
        _PixelWrite($BMP, 0, $lastY + 4, $charA)
    EndIf
    If StringEquals($String2, "b") Then
        _PixelWrite($BMP, 1, $lastY + 4, $charB)
    EndIf
    If StringEquals($String2, "c") Then
        _PixelWrite($BMP, 2, $lastY + 4, $charC)
    EndIf
    If StringEquals($String2, "d") Then
        _PixelWrite($BMP, 3, $lastY + 4, $charD)
    EndIf
    If StringEquals($String2, "e") Then
        _PixelWrite($BMP, 4, $lastY + 4, $charE)
    EndIf
    If StringEquals($String2, "f") Then
        _PixelWrite($BMP, 5, $lastY + 4, $charF)
    EndIf
    If StringEquals($String2, "g") Then
        _PixelWrite($BMP, 6, $lastY + 4, $charG)
    EndIf
    If StringEquals($String2, "h") Then
        _PixelWrite($BMP, 7, $lastY + 4, $charH)
    EndIf
    If StringEquals($String2, "i") Then
        _PixelWrite($BMP, 8, $lastY + 4, $charI)
    EndIf
    If StringEquals($String2, "j") Then
        _PixelWrite($BMP, 9, $lastY + 4, $charJ)
    EndIf
    If StringEquals($String2, "k") Then
        _PixelWrite($BMP, 10, $lastY + 4, $charK)
    EndIf
    If StringEquals($String2, "l") Then
        _PixelWrite($BMP, 11, $lastY + 4, $charL)
    EndIf
    If StringEquals($String2, "m") Then
        _PixelWrite($BMP, 12, $lastY + 4, $charM)
    EndIf
    If StringEquals($String2, "n") Then
        _PixelWrite($BMP, 13, $lastY + 4, $charN)
    EndIf
    If StringEquals($String2, "o") Then
        _PixelWrite($BMP, 14, $lastY + 4, $charO)
    EndIf
    If StringEquals($String2, "p") Then
        _PixelWrite($BMP, 15, $lastY + 4, $charP)
    EndIf
    If StringEquals($String2, "q") Then
        _PixelWrite($BMP, 16, $lastY + 4, $charQ)
    EndIf
    If StringEquals($String2, "r") Then
        _PixelWrite($BMP, 17, $lastY + 4, $charR)
    EndIf
    If StringEquals($String2, "s") Then
        _PixelWrite($BMP, 18, $lastY + 4, $charS)
    EndIf
    If StringEquals($String2, "t") Then
        _PixelWrite($BMP, 19, $lastY + 4, $charT)
    EndIf
    If StringEquals($String2, "u") Then
        _PixelWrite($BMP, 0, $lastY + 5, $charU)
    EndIf
    If StringEquals($String2, "v") Then
        _PixelWrite($BMP, 1, $lastY + 5, $charV)
    EndIf
    If StringEquals($String2, "w") Then
        _PixelWrite($BMP, 2, $lastY + 5, $charW)
    EndIf
    If StringEquals($String2, "x") Then
        _PixelWrite($BMP, 3, $lastY + 5, $charX)
    EndIf
    If StringEquals($String2, "y") Then
        _PixelWrite($BMP, 4, $lastY + 5, $charY)
    EndIf
    If StringEquals($String2, "z") Then
        _PixelWrite($BMP, 5, $lastY + 5, $charZ)
    EndIf



    If StringEquals($String2, "A") Then
        _PixelWrite($BMP, 16, $lastY + 6, $charAu)
    EndIf
    If StringEquals($String2, "B") Then
        _PixelWrite($BMP, 17, $lastY + 6, $charBu)
    EndIf
    If StringEquals($String2, "C") Then
        _PixelWrite($BMP, 18, $lastY + 6, $charCu)
    EndIf
    If StringEquals($String2, "D") Then
        _PixelWrite($BMP, 19, $lastY + 6, $charDu)
    EndIf
    If StringEquals($String2, "E") Then
        _PixelWrite($BMP, 0, $lastY + 7, $charEu)
    EndIf
    If StringEquals($String2, "F") Then
        _PixelWrite($BMP, 1, $lastY + 7, $charFu)
    EndIf
    If StringEquals($String2, "G") Then
        _PixelWrite($BMP, 2, $lastY + 7, $charGu)
    EndIf
    If StringEquals($String2, "H") Then
        _PixelWrite($BMP, 3, $lastY + 7, $charHu)
    EndIf
    If StringEquals($String2, "I") Then
        _PixelWrite($BMP, 4, $lastY + 7, $charIu)
    EndIf
    If StringEquals($String2, "J") Then
        _PixelWrite($BMP, 5, $lastY + 7, $charJu)
    EndIf
    If StringEquals($String2, "K") Then
        _PixelWrite($BMP, 6, $lastY + 7, $charKu)
    EndIf
    If StringEquals($String2, "L") Then
        _PixelWrite($BMP, 7, $lastY + 7, $charLu)
    EndIf
    If StringEquals($String2, "M") Then
        _PixelWrite($BMP, 8, $lastY + 7, $charMu)
    EndIf
    If StringEquals($String2, "N") Then
        _PixelWrite($BMP, 9, $lastY + 7, $charNu)
    EndIf
    If StringEquals($String2, "O") Then
        _PixelWrite($BMP, 10, $lastY + 7, $charOu)
    EndIf
    If StringEquals($String2, "P") Then
        _PixelWrite($BMP, 11, $lastY + 7, $charPu)
    EndIf
    If StringEquals($String2, "Q") Then
        _PixelWrite($BMP, 12, $lastY + 7, $charQu)
    EndIf
    If StringEquals($String2, "R") Then
        _PixelWrite($BMP, 13, $lastY + 7, $charRu)
    EndIf
    If StringEquals($String2, "S") Then
        _PixelWrite($BMP, 14, $lastY + 7, $charSu)
    EndIf
    If StringEquals($String2, "T") Then
        _PixelWrite($BMP, 15, $lastY + 7, $charTu)
    EndIf
    If StringEquals($String2, "U") Then
        _PixelWrite($BMP, 16, $lastY + 7, $charUu)
    EndIf
    If StringEquals($String2, "V") Then
        _PixelWrite($BMP, 17, $lastY + 7, $charVu)
    EndIf
    If StringEquals($String2, "W") Then
        _PixelWrite($BMP, 18, $lastY + 7, $charWu)
    EndIf
    If StringEquals($String2, "X") Then
        _PixelWrite($BMP, 19, $lastY + 7, $charXu)
    EndIf
    If StringEquals($String2, "Y") Then
        _PixelWrite($BMP, 0, $lastY + 8, $charYu)
    EndIf
    If StringEquals($String2, "Z") Then
        _PixelWrite($BMP, 1, $lastY + 8, $charZu)
    EndIf




    If StringEquals($String2, ":") Then
        _PixelWrite($BMP, 6, $lastY + 5, $charDOUBLEDOT)
    EndIf
    If StringEquals($String2, " ") Then
        _PixelWrite($BMP, 7, $lastY + 5, $charSPACE)
    EndIf
    If StringEquals($String2, "/") Then
        _PixelWrite($BMP, 8, $lastY + 5, $charSLASH)
    EndIf
    If StringEquals($String2, "\") Then
        _PixelWrite($BMP, 9, $lastY + 5, $charBACKSLASH)
    EndIf
    If StringEquals($String2, "_") Then
        _PixelWrite($BMP, 10, $lastY + 5, $charUNDERLINED)
    EndIf
    If StringEquals($String2, "-") Then
        _PixelWrite($BMP, 11, $lastY + 5, $charHYPHEN)
    EndIf
    If StringEquals($String2, "0") Then
        _PixelWrite($BMP, 12, $lastY + 5, $char0)
    EndIf
    If StringEquals($String2, "1") Then
        _PixelWrite($BMP, 13, $lastY + 5, $char1)
    EndIf
    If StringEquals($String2, "2") Then
        _PixelWrite($BMP, 14, $lastY + 5, $char2)
    EndIf
    If StringEquals($String2, "3") Then
        _PixelWrite($BMP, 15, $lastY + 5, $char3)
    EndIf
    If StringEquals($String2, "4") Then
        _PixelWrite($BMP, 16, $lastY + 5, $char4)
    EndIf
    If StringEquals($String2, "5") Then
        _PixelWrite($BMP, 17, $lastY + 5, $char5)
    EndIf
    If StringEquals($String2, "6") Then
        _PixelWrite($BMP, 18, $lastY + 5, $char6)
    EndIf
    If StringEquals($String2, "7") Then
        _PixelWrite($BMP, 19, $lastY + 5, $char7)
    EndIf
    If StringEquals($String2, "8") Then
        _PixelWrite($BMP, 0, $lastY + 6, $char8)
    EndIf
    If StringEquals($String2, "9") Then
        _PixelWrite($BMP, 1, $lastY + 6, $char9)
    EndIf
    If StringEquals($String2, "@") Then
        _PixelWrite($BMP, 2, $lastY + 6, $charAT)
    EndIf
    If StringEquals($String2, ".") Then
        _PixelWrite($BMP, 3, $lastY + 6, $charDOT)
    EndIf
    If StringEquals($String2, "*") Then
        _PixelWrite($BMP, 4, $lastY + 6, $charMAL)
    EndIf
    If StringEquals($String2, "+") Then
        _PixelWrite($BMP, 5, $lastY + 6, $charPLUS)
    EndIf
    If StringEquals($String2, "=") Then
        _PixelWrite($BMP, 6, $lastY + 6, $charISEQUAL)
    EndIf
    If StringEquals($String2, "(") Then
        _PixelWrite($BMP, 7, $lastY + 6, $charOPEN)
    EndIf
    If StringEquals($String2, ")") Then
        _PixelWrite($BMP, 8, $lastY + 6, $charCLOSE)
    EndIf
    If StringEquals($String2, ",") Then
        _PixelWrite($BMP, 9, $lastY + 6, $charKOMMA)
    EndIf
    If StringEquals($String2, "?") Then
        _PixelWrite($BMP, 10, $lastY + 6, $charQUESTION)
    EndIf
    If StringEquals($String2, "#") Then
        _PixelWrite($BMP, 11, $lastY + 6, $charHASHTAG)
    EndIf
    If StringEquals($String2, "&") Then
        _PixelWrite($BMP, 12, $lastY + 6, $charAND)
    EndIf
    If StringEquals($String2, "ä") Then
        _PixelWrite($BMP, 13, $lastY + 6, $charAE)
    EndIf
    If StringEquals($String2, "ö") Then
        _PixelWrite($BMP, 14, $lastY + 6, $charOE)
    EndIf
    If StringEquals($String2, "ü") Then
        _PixelWrite($BMP, 15, $lastY + 6, $charUE)
    EndIf
    If StringEquals($String2, "!") Then
        _PixelWrite($BMP, 2, $lastY + 8, $charEXCLAMATION)
    EndIf
    If StringEquals($String2, ">") Then
        _PixelWrite($BMP, 3, $lastY + 8, $charGREATER)
    EndIf
    If StringEquals($String2, "<") Then
        _PixelWrite($BMP, 4, $lastY + 8, $charLESS)
    EndIf




    _BMPWrite($BMP, GUICtrlRead($Input2))
EndFunc


Func GetFirstChar($String4, $From = 1)
    $String4 = StringMid($String4, $From, 1)
    return $String4
EndFunc

Func ReadCode($FileDir2)
    $lastX = 0
    $lastY = 0
    $BMP = _BMPOpen($FileDir2)
    Do
        if $lastX + 2 > 20 or $lastX + 2 == 20 Then
            $lastX = 0
            $lastY += 1
        Else
            $lastX += 2
        EndIf
    Until _PixelRead($BMP, $lastX, $lastY) == "FFFFFF"

    $lastX = 0
    ;Step 5 //////////////////////////////////////////////////
    $charA = _PixelRead($BMP, 0, $lastY + 4)
    $charB = _PixelRead($BMP, 1, $lastY + 4)
    $charC = _PixelRead($BMP, 2, $lastY + 4)
    $charD = _PixelRead($BMP, 3, $lastY + 4)
    $charE = _PixelRead($BMP, 4, $lastY + 4)
    $charF = _PixelRead($BMP, 5, $lastY + 4)
    $charG = _PixelRead($BMP, 6, $lastY + 4)
    $charH = _PixelRead($BMP, 7, $lastY + 4)
    $charI = _PixelRead($BMP, 8, $lastY + 4)
    $charJ = _PixelRead($BMP, 9, $lastY + 4)
    $charK = _PixelRead($BMP, 10, $lastY + 4)
    $charL = _PixelRead($BMP, 11, $lastY + 4)
    $charM = _PixelRead($BMP, 12, $lastY + 4)
    $charN = _PixelRead($BMP, 13, $lastY + 4)
    $charO = _PixelRead($BMP, 14, $lastY + 4)
    $charP = _PixelRead($BMP, 15, $lastY + 4)
    $charQ = _PixelRead($BMP, 16, $lastY + 4)
    $charR = _PixelRead($BMP, 17, $lastY + 4)
    $charS = _PixelRead($BMP, 18, $lastY + 4)
    $charT = _PixelRead($BMP, 19, $lastY + 4)
    ConsoleWrite(@CRLF & $charT & @CRLF)
    $charU = _PixelRead($BMP, 0, $lastY + 5)
    ConsoleWrite(@CRLF & $charU & @CRLF)
    $charV = _PixelRead($BMP, 1, $lastY + 5)
    $charW = _PixelRead($BMP, 2, $lastY + 5)
    $charX = _PixelRead($BMP, 3, $lastY + 5)
    $charY = _PixelRead($BMP, 4, $lastY + 5)
    $charZ = _PixelRead($BMP, 5, $lastY + 5)



    $charAu = _PixelRead($BMP, 16, $lastY + 6)
    $charBu = _PixelRead($BMP, 17, $lastY + 6)
    $charCu = _PixelRead($BMP, 18, $lastY + 6)
    $charDu = _PixelRead($BMP, 19, $lastY + 6)
    $charEu = _PixelRead($BMP, 0, $lastY + 7)
    $charFu = _PixelRead($BMP, 1, $lastY + 7)
    $charGu = _PixelRead($BMP, 2, $lastY + 7)
    $charHu = _PixelRead($BMP, 3, $lastY + 7)
    $charIu = _PixelRead($BMP, 4, $lastY + 7)
    $charJu = _PixelRead($BMP, 5, $lastY + 7)
    $charKu = _PixelRead($BMP, 6, $lastY + 7)
    $charLu = _PixelRead($BMP, 7, $lastY + 7)
    $charMu = _PixelRead($BMP, 8, $lastY + 7)
    $charNu = _PixelRead($BMP, 9, $lastY + 7)
    $charOu = _PixelRead($BMP, 10, $lastY + 7)
    $charPu = _PixelRead($BMP, 11, $lastY + 7)
    $charQu = _PixelRead($BMP, 12, $lastY + 7)
    $charRu = _PixelRead($BMP, 13, $lastY + 7)
    $charSu = _PixelRead($BMP, 14, $lastY + 7)
    $charTu = _PixelRead($BMP, 15, $lastY + 7)
    $charUu = _PixelRead($BMP, 16, $lastY + 7)
    $charVu = _PixelRead($BMP, 17, $lastY + 7)
    $charWu = _PixelRead($BMP, 18, $lastY + 7)
    $charXu = _PixelRead($BMP, 19, $lastY + 7)
    $charYu = _PixelRead($BMP, 0, $lastY + 8)
    $charZu = _PixelRead($BMP, 1, $lastY + 8)



    $charDOUBLEDOT = _PixelRead($BMP, 6, $lastY + 5)
    $charSPACE = _PixelRead($BMP, 7, $lastY + 5)
    $charSLASH = _PixelRead($BMP, 8, $lastY + 5)
    $charBACKSLASH = _PixelRead($BMP, 9, $lastY + 5)
    $charUNDERLINED = _PixelRead($BMP, 10, $lastY + 5)
    $charHYPHEN = _PixelRead($BMP, 11, $lastY + 5)
    $char0 = _PixelRead($BMP, 12, $lastY + 5)
    $char1 = _PixelRead($BMP, 13, $lastY + 5)
    $char2 = _PixelRead($BMP, 14, $lastY + 5)
    $char3 = _PixelRead($BMP, 15, $lastY + 5)
    $char4 = _PixelRead($BMP, 16, $lastY + 5)
    $char5 = _PixelRead($BMP, 17, $lastY + 5)
    $char6 = _PixelRead($BMP, 18, $lastY + 5)
    $char7 = _PixelRead($BMP, 19, $lastY + 5)
    $char8 = _PixelRead($BMP, 0, $lastY+ 6)
    $char9 = _PixelRead($BMP, 1, $lastY + 6)
    $charAT = _PixelRead($BMP, 2, $lastY + 6)
    $charDOT = _PixelRead($BMP, 3, $lastY + 6)
    $charMAL = _PixelRead($BMP, 4, $lastY + 6)
    $charPLUS = _PixelRead($BMP, 5, $lastY + 6)
    $charISEQUAL = _PixelRead($BMP, 6, $lastY + 6)
    $charOPEN = _PixelRead($BMP, 7, $lastY + 6)
    $charCLOSE = _PixelRead($BMP, 8, $lastY + 6)
    $charKOMMA = _PixelRead($BMP, 9, $lastY + 6)
    $charQUESTION = _PixelRead($BMP, 10, $lastY + 6)
    $charHASHTAG = _PixelRead($BMP, 11, $lastY + 6)
    $charAND = _PixelRead($BMP, 12, $lastY + 6)
    $charAE = _PixelRead($BMP, 13, $lastY + 6)
    $charOE = _PixelRead($BMP, 14, $lastY + 6)
    $charUE = _PixelRead($BMP, 15, $lastY + 6)
    $charEXCLAMATION = _PixelRead($BMP, 2, $lastY + 8)
    $charGREATER = _PixelRead($BMP, 3, $lastY + 8)
    $charLESs = _PixelRead($BMP, 4, $lastY + 8)
    ConsoleWrite(@CRLF & "--------------------" & @CRLF)
    $lastY = 0
    $1 = false
    Do
        if $1 = true Then
        if $lastX + 2 > 20 or $lastX + 2 == 20 Then
            $lastX = 0
            $lastY += 1
        Else
            $lastX += 2
        EndIf
    EndIf
    $1 = true
    Global $result

        ;Step 6 ///////////////////////////////////////////////////////
        If _PixelRead($BMP, $lastX, $lastY) == $charA Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("a")
            $result = $result & "a"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charB Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("b")
            $result = $result & "b"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charC Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("c")
            $result = $result & "c"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charD Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("d")
            $result = $result & "d"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charE Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("e")
            $result = $result & "e"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charF Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("f")
            $result = $result & "f"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charG Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("g")
            $result = $result & "g"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charH Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("h")
            $result = $result & "h"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charI Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("i")
            $result = $result & "i"
        EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charJ Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("j")
            $result = $result & "j"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charK Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("k")
            $result = $result & "k"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charL Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("l")
            $result = $result & "l"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charM Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("m")
            $result = $result & "m"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charN Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("n")
            $result = $result & "n"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charO Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("o")
            $result = $result & "o"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charP Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("p")
            $result = $result & "p"
            EndIf
        EndIf

        If _PixelRead($BMP, $lastX, $lastY) == $charQ Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("q")
            $result = $result & "q"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charR Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("r")
            $result = $result & "r"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charS Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("s")
            $result = $result & "s"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charT Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("t")
            $result = $result & "t"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charU Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("u")
            $result = $result & "u"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charV Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("v")
            $result = $result & "v"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charW Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("w")
            $result = $result & "w"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charX Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("x")
            $result = $result & "x"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charY Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("y")
            $result = $result & "y"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charZ Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("z")
            $result = $result & "z"
            EndIf
        EndIf








        If _PixelRead($BMP, $lastX, $lastY) == $charAu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("A")
            $result = $result & "A"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charBu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("B")
            $result = $result & "B"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charCu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("C")
            $result = $result & "C"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charDu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("D")
            $result = $result & "D"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charEu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("E")
            $result = $result & "E"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charFu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("F")
            $result = $result & "F"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charGu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("G")
            $result = $result & "G"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charHu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("H")
            $result = $result & "H"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charIu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("I")
            $result = $result & "I"
        EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charJu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("J")
            $result = $result & "J"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charKu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("K")
            $result = $result & "K"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charLu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("L")
            $result = $result & "L"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charMu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("M")
            $result = $result & "M"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charNu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("N")
            $result = $result & "N"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charOu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("O")
            $result = $result & "O"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charPu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("P")
            $result = $result & "P"
            EndIf
        EndIf

        If _PixelRead($BMP, $lastX, $lastY) == $charQu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("Q")
            $result = $result & "Q"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charRu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("R")
            $result = $result & "R"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charSu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("S")
            $result = $result & "S"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charTu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("T")
            $result = $result & "T"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charUu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("U")
            $result = $result & "U"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charVu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("V")
            $result = $result & "V"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charWu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("W")
            $result = $result & "W"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charXu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("X")
            $result = $result & "X"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charYu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("Y")
            $result = $result & "Y"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charZu Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("Z")
            $result = $result & "Z"
        EndIf







        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charDOUBLEDOT Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite(":")
            $result = $result & ":"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charSPACE Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite(" ")
            $result = $result & " "
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charSLASH Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("/")
            $result = $result & "/"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charBACKSLASH Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("\")
            $result = $result & "\"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charUNDERLINED Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("_")
            $result = $result & "_"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charHYPHEN Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("-")
            $result = $result & "-"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $char0 Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("0")
            $result = $result & "0"
        EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $char1 Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("1")
            $result = $result & "1"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $char2 Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("2")
            $result = $result & "2"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $char3 Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("3")
            $result = $result & "3"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $char4 Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("4")
            $result = $result & "4"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $char5 Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("5")
            $result = $result & "5"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $char6 Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("6")
            $result = $result & "6"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $char7 Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("7")
            $result = $result & "7"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $char8 Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("8")
            $result = $result & "8"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $char9 Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("9")
            $result = $result & "9"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charAT Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("@")
            $result = $result & "@"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charDOT Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite(".")
            $result = $result & "."
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charMAL Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("*")
            $result = $result & "*"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charPLUS Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("+")
            $result = $result & "+"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charOPEN Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("(")
            $result = $result & "("
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charCLOSE Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite(")")
            $result = $result & ")"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charKOMMA Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite(",")
            $result = $result & ","
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charISEQUAL Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("=")
            $result = $result & "="
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charQUESTION Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("?")
            $result = $result & "?"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charHASHTAG Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("#")
            $result = $result & "#"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charAND Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("&")
            $result = $result & "&"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charAE Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("ä")
            $result = $result & "ä"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charOE Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("ö")
            $result = $result & "ö"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charUE Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("ü")
            $result = $result & "ü"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charEXCLAMATION Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("!")
            $result = $result & "!"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charGREATER Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite(">")
            $result = $result & ">"
            EndIf
        EndIf
        If _PixelRead($BMP, $lastX, $lastY) == $charLESS Then
            if _PixelRead($BMP, $lastX, $lastY) == "FFFFFF" = False Then
            ConsoleWrite("<")
            $result = $result & "<"
            EndIf
        EndIf

    Until _PixelRead($BMP, $lastX, $lastY) == "FFFFFF"
    ConsoleWrite(@CRLF & "--------------------" & @CRLF)

    if StringEquals($result, "https://") or StringEquals($result, "www.") == True Then
        #include <MsgBoxConstants.au3>
        $msg = MsgBox(4, "Do you want to open this link", $result)
        if $msg = 6 Then
        ShellExecute ("C:\Program Files (x86)\Opera\launcher.exe", $result)
    Else
    EndIf
    EndIf

EndFunc

thanks to evilertoaster for his great Bitmap Library!

Pls don't mind my english & programing skills!

 

 

Super-Duper-Save-Text-Converter.zip

Edited by Oel
update

Share this post


Link to post
Share on other sites
JLogan3o13

Good luck understanding this code... its a mess

Usually not the way to instill confidence in your script... 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
ViciousXUSMC

A neat concept, probably could be polished up a bit.

Maybe add a file select dialog or a drag & drop functionality to the example GUI?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • ufukreis1212
      By ufukreis1212
      Hello, I am new members. Help me please. I want vbs convert to au3 .
      This vbs code : 
      'deneme Set SystemSet = GetObject("winmgmts:").InstancesOf ("Win32_OperatingSystem") strOSArch = GetObject("winmgmts:root\cimv2:Win32_OperatingSystem=@").OSArchitecture Set objNetwork = CreateObject("Wscript.Network") Set wshShell = CreateObject( "WScript.Shell" ) strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) Set oShell = WScript.CreateObject("WScript.Shell") proc_arch = oShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") Set oEnv = oShell.Environment("SYSTEM") strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colMB = objWMIService.ExecQuery("Select * from Win32_BaseBoard") Set colCSes = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem") Set colProcessors = objWMIService.ExecQuery("Select * from Win32_Processor") Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItemsx = objWMIService.ExecQuery( _ "SELECT * FROM Win32_VideoController",,48) '------------------------------------------------------------------- Set obj = GetObject("winmgmts:").InstancesOf("Win32_PhysicalMemory") i = 1 For Each obj2 In obj memTmp1 = obj2.capacity / 1024 / 1024 TotalRam = TotalRam + memTmp1 i = i +1 Next '-------------------------------------------------------------------- Dim objWMIService : Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("Select Architecture from Win32_Processor") For Each objItem in colItems if objItem.Architecture = 0 then strArchitecture = "x86" end if if objItem.Architecture = 9 then strArchitecture = "x64" end if next '-------------------------------------------------------------------- strComputer = "." ' Local computer strMemory = "" i = 1 set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory") For Each objItem In colItems if strMemory <> "" then strMemory = strMemory & vbcrlf strMemory = strMemory & "Bank" & i & " : " & (objItem.Capacity /1024 /1024) & " Mb" i = i + 1 Next installedModules = i - 1 Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray") For Each objItem in colItems totalSlots = objItem.MemoryDevices Next '---------------------------------------------------------------------- Set objWMISvc = GetObject( "winmgmts:\\.\root\cimv2" ) Set colItems = objWMISvc.ExecQuery( "Select * from Win32_ComputerSystem" ) For Each objItem in colItems strComputerDomain = objItem.Domain Next for each System in SystemSet For Each objItem in colItemsx For Each objProcessor in colProcessors For Each bbType In colMB MbVendor = bbType.Manufacturer MbModel = bbType.Product MsgBox "İşletim Sistemi : " & System.Caption & vbNewLine & _ "İşletim Sistemi Versionu : " & + System.Version & vbNewLine & _ "Windows Mimari Yapısı: " & strOSArch & vbNewLine & _ "Kullanıcı isminiz: " & objNetwork.UserName & vbNewLine & _ "Bilgisayar ismi: " & strComputerName & vbNewLine & _ "Çalışma Grubu: " & strComputerDomain & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Anakart: " & MbVendor & " " & "[" & MbModel & "]" & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Grafik Kartı: " & objItem.Caption & vbNewLine & _ "Driver Version: " & objItem.DriverVersion & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "İşlemci Üreticisi: " & objProcessor.Manufacturer & vbNewLine & _ "İşlemci İsmi: " & objProcessor.Name & vbNewLine & _ "CPU Mimarisi: " & strArchitecture & vbNewLine & _ "İşlemci Çekirdek sayısı: " & oEnv("NUMBER_OF_PROCESSORS") & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Toplam RAM: " & TotalRam & " MB" & vbNewLine & _ "Toplam Slot: " & totalSlots & vbNewLine & _ "Boş Slot: " & (totalSlots - installedModules) & vbNewLine & _ "Ramlerin bulunduğu slotlar:" & vbcrlf & strMemory,0,"deneme" Next Next Next Next please help me , thanks.
    • JuanFelipe
      By JuanFelipe
       
      Hello friends, I have a query, it happens that I have a matrix nxn, the first column of this contains each cell a number with 21 digits, when I pass this matrix to Excel I obviously write that number as 1,10016E + 20, I solved it by adding a * at the end of each cell, but I want it to be written as a text so that I do not have to remove that *, I searched in Google but could not find an effective solution, thanks in advance. 
    • Puls3
      By Puls3
      Hi, This is my first post on the AutoIt Forums, I most of the time was able to get help from this community by merely searching though google and have been able to solve hundreds of problems this way, though in this case I was incapable of finding a solution to my problem. I am quite confident that it is a user error (And my fault) but I haven't been able to determine what I did wrong, any and all help would be greatly appreciated! I have uploaded my whole script pardon passwords to provide as much information as possible.
      I declared a global array at the top of the script and am having issues when I try to set it's value, and I fail to understand why.
      Error Message:
      "D:\Projects\AutoIt\Arena\Base.au3" (270) : ==> Subscript used on non-accessible variable.:
      $ExpMax[$i] = IniRead($TempSavePath, "Combatant" & $i, "ExpMax", $ExpMax[0])
      $ExpMax^ ERROR
      ConsoleWrite Log:
      Ran.
      Checking launch parameters.
      No launch parameters.
      Initiating load.
      Checking for save file.
      Save file not found.
      Load canceled.
      Loading or creating Combatant 1
      Base.au3
    • RamDemon
      By RamDemon
      Hi,
      Did anyone tried to  use Redis  with AutoIT as store DB ?
       Redis <-- more about it
      Mladen
    • nooneclose
      By nooneclose
      Hey. I'm working on a new project and was wondering if there is a better way to "update" my Column E array. 
      Here is my code: 
      Local $nI  = 0                                                            ;Creates a name index of 0: nI = Name index Local $nII = 1                                                            ;Creates a name index of 1 for second loop: nII = Name Index 2 For    $iN = 0 To $IndexRows Step 1                                       ;Checks the roster for any names that appear twice      For $iN2 = 0 To $IndexRows Step 1          if $d_Names[$nI] == $d_Names[$nII] And $d_Names[$nII] <> "" Then              Local $timeSheetName = _ArraySearch($e_Names, $d_Names[$nI], 0, 0, 0, 0, 1)              ;MsgBox($MB_SYSTEMMODAL, "Found it", $d_Names[$nI] & " In column E on Row " & $timeSheetName)              Local $eI  = $timeSheetName + 1              ;ConsoleWrite($timeSheetName & @CRLF)              ;ConsoleWrite($eI & @CRLF)              ;ConsoleWrite(@CRLF)              _Excel_RangeInsert($OpenWorkbook.ActiveSheet, "E" & $eI & ":F" & $eI, $xlShiftDown)                                                                          ;Inserts a empty cell in columns E and F.              _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $d_Names[$nII], "E" & $eI)                                                                         ;Fills the empty cell in columns E with the doubled name              $aArray_Index = 2                                           ;Array element counter              For $Index = 2 To $IndexRows Step 1                        ;Loops through every row in the Excel file unto no rows are found or a null row is found                  $Array_Value_E = _Excel_RangeRead($OpenWorkbook, Default, "E"&$Index)                  $e_names[$aArray_Index] = $Array_Value_E                ;While the code loops every value in column E is stored in the E array (updating the array)                  $aArray_Index += 1              Next              ExitLoop          EndIf      Next      $nI  += 1      $nII += 1 Next Basically, It checks a roster for people whose name appears twice then inserts a new "row" for that person because they work in two different departments.
      I have to find that name however in Column E if two appear in column D. My code works but I think it is not as efficient as it could be. 
      Any ideas on how to improve the "update" for my array?
      (once it finds the double names in Column D it then searches for that name by going name by name in the Column E array and once it finds it inserts a new row. However, the E array doesn't have that new row stored in it so I have to "update" the array to properly find the next name)
      Any and all tips would be greatly appreciated. 
       
      NOTE: Just assume I'm opening the excel file properly please do not add that code in, it only complicates your answer. 
×