Sign in to follow this  
Followers 0
Mat

Funky text - The program

4 posts in this topic

#1 ·  Posted (edited)

--|||||||--|||--|||--||----||--||---||--||--||------|||||||||--|||||||--||----||--|||||||||-

--|||------|||--|||--||||--||--||-||----||--||---------|||-----|||-------||--||------|||----

--||||||---|||--|||--||-||-||--||||------||||----------|||-----||||||-----||||-------|||----

--|||------|||--|||--||--||||--||-||------||-----------|||-----|||-------||--||------|||----

--|||-------||||||---||----||--||---||----||-----------|||-----|||||||--||----||-----|||----

--||||||---||--||------|||||||||||--||||||---|||||||--|||||||---||||||---|||||||--|||-----

--|||-|||--||--||------|||-|||-|||--|||-|||----|||----|||------|||-------|||------|||-----

--||||||----||||-------|||-|||-|||--|||-|||----|||----||||||----||||||---||||||---|||-----

--|||-|||----||--------|||-|||-|||--|||-|||----|||----|||-----------|||--|||------|||-----

--||||||-----||--------|||-|||-|||--||||||---|||||||--|||||||---||||||---|||||||--|||||||-

The function

I actually started the program first, but it got very messy, and impossible to do any real scripting, so I made the functoin itself for a while, and forgot the program had even been started. after I finished the func, I went back through the folders (deleting tests and random snippets) and found the source for the GUI. I worked through the night and got this: Winshot-GUI (May I also take this chance to advertise my screenshot program, which was used to get this jpg)

And here is the source: FunkyText.au3

There are going to be a lot of problems, so please point them out. DO NOT complain to me about certain combinations of charaters for $B and $t, as this depends purely on the browser, and I will ignore it.

If you want me to add characters, please make my life easy and send the code, rather than just the letter, that way I can Just copy and past it in.

Case "F"
            $Line[0] &= "F"
            $Line[1] &= $B & $t & $t & $t & $t & $t & $t & $t & $B; -|||||||-
            $Line[2] &= $B & $t & $t & $t & $B & $B & $B & $B & $B; -|||-----
            $Line[3] &= $B & $t & $t & $t & $t & $t & $t & $B & $B; -||||||--
            $Line[4] &= $B & $t & $t & $t & $B & $B & $B & $B & $B; -|||-----
            $Line[5] &= $B & $t & $t & $t & $B & $B & $B & $B & $B; -|||-----

$B is for blank and $t is for text.

----||----------------||---

---||||--------------||||--

--||--||------------||--||-

---------------------------

----------||||||||---------

Edited by Mat

Share this post


Link to post
Share on other sites



question

how exactly is this used?

sorry to sound like a nub lol but i have a feeling ppl will be asking the same thing

Cheers

Snowman


Intermediate AutoIt/Autohotkey User

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

see my sig; thats waht you are aiming to get.

Test to input is the text to convert.

Text and blank refer to the characters you use eg:

; M@'s Funky text!!! - Blank character; - Text Character; ) Text converted; AUTOIT

--))))))))--)))--)))--)))))))))--))))))))--)))))))--)))))))))-

--)))--)))--)))--)))-----)))-----)))--)))----)))-------)))----

--))))))))--)))--)))-----)))-----)))--)))----)))-------)))----

--)))--)))--)))--)))-----)))-----)))--)))----)))-------)))----

--)))--)))---))))))------)))-----))))))))--)))))))-----)))----

; M@'s Funky text!!! - Blank character; - Text Character; | Text converted; AUTOIT

--||||||||--|||--|||--|||||||||--||||||||--|||||||--|||||||||-

--|||--|||--|||--|||-----|||-----|||--|||----|||-------|||----

--||||||||--|||--|||-----|||-----|||--|||----|||-------|||----

--|||--|||--|||--|||-----|||-----|||--|||----|||-------|||----

--|||--|||---||||||------|||-----||||||||--|||||||-----|||----

see the difference?

If you want to save it to a file, you put the file name in the input, or click the ... to find it through the dialog. If you select display file on exit, it quite simply shellexecutes the created file on exit. If you tick the other box (copy text to clipboard), or leave the save to file bit blank or with the original text, it will put the text on the clipboard. the check button does not work.

look at the link to winshot-GUI in my original post, It has a basic example.

as far as actual uses go, Titles, my sig etc are the only real examples.

a pretty bad video

Edited by mdiesel

Share this post


Link to post
Share on other sites

#include <WinAPI.au3>
#include <WindowsConstants.au3>

Opt("PixelCoordMode", 2)

_FunkyText("Wide Boy Dixon", " ", ")")

Func _FunkyText($sText, $sBlank, $sFill)
    Local $hGUI = GUICreate("Funky Text", 800, 128)
    GUISetBkColor(0xffffff)
    GUISetFont(-1, -1, -1, "System")
    Local $hDC = _WinAPI_GetDC($hGUI)
    $tRECT = DllStructCreate($tagRect)
    DllStructSetData($tRECT, "Left", 0)
    DllStructSetData($tRECT, "Top", 0)
    DllStructSetData($tRECT, "Right", @DesktopWidth)
    DllStructSetData($tRECT, "Bottom", @DesktopHeight)
    _WinAPI_DrawText($hDC, $sText, $tRECT, $DT_CALCRECT)
    Local $w = DllStructGetData($tRECT, "Right") - DllStructGetData($tRECT, "Left")
    Local $h = DllStructGetData($tRECT, "Bottom") - DllStructGetData($tRECT, "Top")

    GUISetState()
    _WinAPI_DrawText($hDC, $sText, $tRECT, $DT_LEFT)
    
    $sLine = ""
    For $y = 0 to $h
        For $x = 0 to $w
            $nCol = PixelGetColor($x, $y, $hGUI)
            Switch $nCol
                Case 0xffffff
                    $sLine &= $sBlank
                Case Else
                    $sLine &= $sFill
            EndSwitch
        Next
        $sLine &= @CRLF
    Next
    
    ConsoleWrite($sLine)
    
    GUIDelete($hGUI)
EndFunc

XX----XX----XX-XX------XX--------------XXXXXXX-----------------------XXXXXX----XX--------------------------

XX----XX----XX-XX------XX--------------XX----XX----------------------XX---XX---XX--------------------------

XX----XX----XX---------XX--------------XX----XX----------------------XX----XX------------------------------

-XX--XXXX--XX--XX---XXXXX---XXXX-------XX----XX---XXXX--XX----XX-----XX----XX--XX-XX----XX--XXXX---XXXXX---

-XX--XXXX--XX--XX--XX--XX--XX--XX------XXXXXXX---XX--XX-XX----XX-----XX----XX--XX--XX--XX--XX--XX--XX--XX--

--XX-X--X-XX---XX--XX--XX--XXXXXX------XX----XX--XX--XX--XX--XX------XX----XX--XX---XXXX---XX--XX--XX--XX--

--XXXX--XXXX---XX--XX--XX--XX----------XX----XX--XX--XX--XX--XX------XX----XX--XX----XX----XX--XX--XX--XX--

---XX----XX----XX--XX--XX--XX----------XX----XX--XX--XX---XXXX-------XX----XX--XX---XXXX---XX--XX--XX--XX--

---XX----XX----XX--XX--XX--XX--XX------XX----XX--XX--XX---XXXX-------XX---XX---XX--XX--XX--XX--XX--XX--XX--

---XX----XX----XX---XXXXX---XXXX-------XXXXXXX----XXXX-----XX--------XXXXXX----XX-XX----XX--XXXX---XX--XX--

-----------------------------------------------------------XX----------------------------------------------

----------------------------------------------------------XX-----------------------------------------------

---------------------------------------------------------XX------------------------------------------------

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  
Followers 0