Jump to content
Sign in to follow this  
RowdyYates

Auto draw text

Recommended Posts

RowdyYates

1. Does anyone know of a program that can automatically draw text using mouse click/drag commands? No luck searching in the Example Scripts forum. I am using a paint type program only it doesn't have any text options so I would need some type of automated drawing of text. It would be nice if some one had already done something like this so I don't have to make it from scratch.

2. Is there a huge directory compilation some where of user made programs?

Share this post


Link to post
Share on other sites
RowdyYates

I made it in about an hour. If anyone needs a program like this just ask me. Sorry for the bump but I didn't see any edit feature.

Share this post


Link to post
Share on other sites
niubbone

I made it in about an hour. If anyone needs a program like this just ask me. Sorry for the bump but I didn't see any edit feature.

Would like to see it. Seems complex and since I'm new, it takes me days also to make simple functions. Could you send it or post into example?

Share this post


Link to post
Share on other sites
RowdyYates

Won't let me post in the Example Scripts forum so I guess I'll just dump the source here. Once again, sorry for the bump.

;Auto text drawer for various programs that don't have built in text capabilities.
;This version only supports lowercase alphabetic characters, and does not detect invalid entries.
;Must have a paint type tool selected.  Press ` to enter text, then again for it to draw it.
;Only draws simplistic small font.  Press [Esc] to exit program.
HotKeySet("`", "InputOrDraw")
HotKeySet("{ESC}", "Terminate")
$TakeInput = 1
$TextToDraw = ""

While 1 ;I only want you for your body ;)
    Sleep(100)
WEnd

Func InputOrDraw()
    if $TakeInput = 1 then
        $TextToDraw = InputBox("Text Drawer", "Enter the text you want to be drawn", "Enter text here", "", 205, 114)
        $TakeInput = 0
    Else
        DrawText($TextToDraw)
        $TakeInput = 1
    EndIf
    
EndFunc

Func DrawText($DrawThis) ;5 pixels between characters, leave pointer at lower left of next character.
    While StringLen($DrawThis) > 0
        $NextLetter = StringLeft($DrawThis, 1)
        Select
            Case $NextLetter = "a"
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1)-10)
                MouseDown("")
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0)+2, MouseGetPos(1)+11)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)-1)
            Case $NextLetter = "b"
                Mousemove(MouseGetPos(0), MouseGetPos(1)-20)
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)+20)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                MouseUp("")
                Mousemove(MouseGetPos(0)+15, MouseGetPos(1)+10)
            Case $NextLetter = "c"
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1)-8)
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-2)
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-1)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+1)
            Case $NextLetter = "d"
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1)-20)
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)+20)
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+10)
            Case $NextLetter = "e"
                Mousemove(MouseGetPos(0), MouseGetPos(1)-5)
                MouseDown("")
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-5)
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-2)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+2)
            Case $NextLetter = "f"
                Mousemove(MouseGetPos(0)+4, MouseGetPos(1))
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-20)
                Mousemove(MouseGetPos(0)+6, MouseGetPos(1))
                MouseUp("")
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1)+8)
                MouseDown("")
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+12)
            Case $NextLetter = "g"
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1)-10)
                MouseDown("")
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0), MouseGetPos(1)+20)
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-2)
                MouseUp("")
                Mousemove(MouseGetPos(0)+15, MouseGetPos(1)-8)
            Case $NextLetter = "h"
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-20)
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1))
            Case $NextLetter = "i"
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-13)
                MouseUp("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-3)
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-2)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+18)
            Case $NextLetter = "j"
                MouseDown("")
                Mousemove(MouseGetPos(0)+6, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-13)
                MouseUp("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-3)
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-2)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+18)
            Case $NextLetter = "k"
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-17)
                MouseUp("")
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1)+2)
                MouseDown("")
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1)+7)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1)+8)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1))
            Case $NextLetter = "l"
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-17)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+17)
            Case $NextLetter = "m"
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0)+6, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0)+6, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1))
            Case $NextLetter = "n"
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1))
            Case $NextLetter = "o"
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                MouseUp("")
                Mousemove(MouseGetPos(0)+15, MouseGetPos(1))
            Case $NextLetter = "p"
                MouseDown("")
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+20)
                MouseUp("")
                Mousemove(MouseGetPos(0)+15, MouseGetPos(1)-10)
            Case $NextLetter = "q"
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                MouseDown("")
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+20)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)-10)
            Case $NextLetter = "r"
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0)+7, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)+2)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+8)
            Case $NextLetter = "s"
                MouseDown("")
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-5)
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-5)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+10)
            Case $NextLetter = "t"
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1))
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)-17)
                MouseUp("")
                Mousemove(MouseGetPos(0)-5, MouseGetPos(1)+7)
                MouseDown("")
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+10)
            Case $NextLetter = "u"
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+10)
            Case $NextLetter = "v"
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                MouseDown("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)-10)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+10)
            Case $NextLetter = "w"
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                MouseDown("")
                Mousemove(MouseGetPos(0)+4, MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)+4, MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0)+4, MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)+4, MouseGetPos(1)-10)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1)+10)
            Case $NextLetter = "x"
                MouseDown("")
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1)-10)
                MouseUp("")
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                MouseDown("")
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1)+10)
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1))
            Case $NextLetter = "y"
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                MouseDown("")
                Mousemove(MouseGetPos(0), MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                Mousemove(MouseGetPos(0), MouseGetPos(1)+20)
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1))
                MouseUp("")
                Mousemove(MouseGetPos(0)+15, MouseGetPos(1)-10)
            Case $NextLetter = "z"
                Mousemove(MouseGetPos(0), MouseGetPos(1)-10)
                MouseDown("")
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                Mousemove(MouseGetPos(0)-10, MouseGetPos(1)+10)
                Mousemove(MouseGetPos(0)+10, MouseGetPos(1))
                MouseUp("")
                Mousemove(MouseGetPos(0)+5, MouseGetPos(1))
            Case $NextLetter = " "
                Mousemove(MouseGetPos(0)+15, MouseGetPos(1))
            Case Else
                MsgBox(0, "", "Problem!  Somthing was probably typed that wasn't a-z")
        EndSelect
        $DrawThis = StringTrimLeft($DrawThis, 1)
    WEnd
EndFunc

Func Terminate()
    Exit 0
EndFunc

Share this post


Link to post
Share on other sites
niubbone

very nice! thanks and congratulations

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.