Jump to content

FreeText.au3 - Place Text Anwhere


Valuater
 Share

Recommended Posts

Create Free Style Text Anywhere... As many as you want!

...with Color and Animation!

FreeText.au3 "Ver 2.5.2 " ; 11/26/2008, AutoIt Ver 3.2.12.0

Some of The Functions...

Posted Image

Possibly The Best Example Yet ...eXPoSiTIoN...

Demo Script...

#include <FreeText.au3> ; ver 2.0.0
#include <Array.au3>

; FreeText.au3 - Demonstration Code - Horse Race
HotKeySet("{ESC}", "Terminate")
Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

Dim $wait = 5

; you can copy and paste the Functions
_FreeText_Functions()

ToolTip("Hit (ESC) to Exit", 1, 1, "FreeText", 1)
; $BGrnd = _FreeText_CreateBackGround("Random")

Sleep($wait)
$TextGUI = _FreeText_Create("Valuater")
Sleep($wait)
_FreeText_StairCase($TextGUI, -15)
$GUI_Pos = _FreeText_GetPosition($TextGUI)
_ArrayDisplay($GUI_Pos)
Sleep($wait)
$DPos = _FreeText_Scatter($TextGUI);, 200, 3, 100, 0)
Sleep($wait)
_FreeText_ColorStrobe($TextGUI)
Sleep($wait)
_FreeText_SetTrans($TextGUI, 20)
Sleep($wait)
_FreeText_SetPosition($TextGUI, $DPos)
Sleep($wait)
_FreeText_Move($TextGUI, 200, 200)
Sleep($wait)
_FreeText_Blink($TextGUI)
Sleep($wait)
_FreeText_SetTrans($TextGUI, 255)
Sleep($wait)
_FreeText_ColorStrobe($TextGUI)
Sleep($wait)
_FreeText_SetColor($TextGUI, "Red")
Sleep($wait)
_FreeText_StairCase($TextGUI)
Sleep($wait)
_FreeText_ShockWave($TextGUI)
Sleep($wait)
_FreeText_Bump($TextGUI)
Sleep($wait)
_FreeText_Move($TextGUI, 100, 100)
Sleep($wait)
$TextGUI2 = _FreeText_Create("Examiner", -1, -1, 30)
Sleep($wait)
_FreeText_Animate($TextGUI2, 2)
Sleep($wait)
_FreeText_Animate($TextGUI2, 7)
Sleep($wait)
_FreeText_ColorStrobe($TextGUI2)
Sleep($wait)
_FreeText_Animate($TextGUI2, 6)
Sleep($wait)
$thanks = _FreeText_Create("ENJOY!  8)", 300, -1, 30)
Sleep($wait)
_FreeText_ColorStrobe($thanks)
Sleep($wait * 3)

Tested Autoit ver 3.2.12.0

ENJOY!!!

Valuater

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

Help with more UDF uses and/or comments appreciated... Thanks!

Function List Ver 2.0.0

_FreeText_Create($String, $Left = -1, $Top = -1, $Size = 50, $Color = "Black", $Font = "Arial", $Wieght = 1000)
Returns TextGUI Array  

_FreeText_CreateBackGround($Color = "Random", $trans = 200)
Returns BKGUI 

_FreeText_CreateBalls($Count, $Left = -1, $Top = -1, $Size = 50, $Color = "Black") 
Returns BallsGUI Array  

_FreeText_CreateBlocks($Count, $Left = -1, $Top = -1, $Size = 50, $Color = "Black") 
Returns BlocksGUI Array  

_FreeText_CreateCubes($Count, $Left = -1, $Top = -1, $Size = 50, $Color = "Black") 
Returns CubesGUI Array  

_FreeText_CreateGlitter($Count = 100, $time = 4000, $delete = 0, $delay = 1) 
Returns $StarsGUI Array  

_FreeText_Animate($T_GUI, $style = 1, $speed = 1000)  

_FreeText_Blink($T_GUI, $delay = 20, $reverse = 1)

 _FreeText_Bump($T_GUI, $bump = 15, $delay = 20, $reverse = 1)

_FreeText_ColorStrobe($T_GUI, $delay = 20, $colors = "yellow,green,blue,Red", $reverse = 1)

_FreeText_Delete($T_GUI)

_FreeText_GetPosition($T_GUI) Returns TextGUI Position Array

_FreeText_HorseRace($T_GUI, $Distance = -1, $time = 60000, $speed = 2, $delay = 1) 

_FreeText_Implode($T_GUI, $delete = 0, $speed = 2, $delay = 20) 

_FreeText_MixUp($T_GUI, $speed = 2, $delay = 5) 

_FreeText_Move($T_GUI, $XX, $YY, $speed = 2, $delay = 20)

_FreeText_MoveAsIs($T_GUI, $XX = 0, $YY = 0, $speed = 2, $delay = 20) 

_FreeText_MoveOne($T_GUI, $Char_Number, $XX, $YY, $speed = 2) 

_FreeText_MoveSwitch($T_GUI, $1st_Char, $2nd_Char, $speed = 2) 

_FreeText_MoveVertical($T_GUI, $XX, $YY, $speed = 2, $delay = 20) 

_FreeText_Rain($T_GUI, $time = 40000, $speed = 2, $delay = 1)  

_FreeText_Rainbow($T_GUI, $time = 1000, $delay = 20, $iUse = 0)

_FreeText_Scatter($T_GUI, $Step = 100, $speed = 2, $delay = 20, $reverse = 1)   
If Reverse = 0 Returns Previous TextGUI Position Array  

_FreeText_SetColor($T_GUI, $Color = "Black")  

_FreeText_SetParent($T_GUI, $h_parent, $delay = 50)  
Some Functions May or May Not Operate as a Child GUI 

_FreeText_SetPosition($T_GUI, $xArray, $speed = 2, $delay = 20)  
Uses TextGUI Position Array Returns from other Functions   

_FreeText_SetOneState($B_GUI, $Char_Number, $state = @SW_SHOW) 

_FreeText_SetState($T_GUI, $state = @SW_SHOW) ; or @SW_HIDE  

_FreeText_SetTrans($T_GUI, $transparency = 255, $delay = 20)  

_FreeText_Shape_ClearText($B_GUI, $delay = 20) 

_FreeText_Shape_RainbowText($B_GUI, $time = 1000, $delay = 20)

_FreeText_Shape_SetText($B_GUI, $Text, $Size = 20, $Color = "black", $Font = "Arial", $Weight = 1000, $delay = 20) 

_FreeText_Shape_SetTextColor($B_GUI, $Color = "black", $delay = 20) 

_FreeText_Shape_SetOneText($B_GUI, $Char_Number, $Text) 

_FreeText_Shape_SetOneTextColor($B_GUI, $Char_Number, $Color = "black") 

_FreeText_Shape_StrobeText($B_GUI, $delay = 20, $colors = "yellow,green,blue,Red", $reverse = 1)  

_FreeText_ShockWave($T_GUI, $wave = 15, $delay = 20, $reverse = 1)

_FreeText_SpinIn($T_GUI, $Points = 8, $delete = 1, $delay = 1) 

_FreeText_SpinOut($T_GUI, $Points = 8, $delete = 1, $delay = 1) 

_FreeText_StairCase($T_GUI, $Step = 15, $speed = 2, $delay = 20, $reverse = 1)  
If Reverse = 0 Returns Previous TextGUI Position Array  

Ver 2.0.0 


Thanks...  Valuater  8)

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

not support Chinese

Some people can look forward to solve this problem.

welcome to china = 欢迎光临中国

this is "欢迎光临中国" Can not be displayed, And the display is garbled.

Edited by YOUF
Link to comment
Share on other sites

Wow. I can't believe it. I seriously thought of using this exact method to make controls on the screen when thinking about AnyGUI. :) This is like the second time someone took my idea out of my brain in the past 24 hours (The first time was I was thinking about Non-Newtonian fluids, and then our Home Economics teacher randomly decided we would make some :P )

Nice work though. I like it :)

EDIT: This one was mine :)

#Include <WindowsConstants.au3>
#Include <WinAPI.au3>
Opt("WinTitleMatchMode", 2)
$sButton = _GUICtrlCreateButton("Test", 100, 50, 100, 50, -1, -1, " - SciTE")
Do
    Sleep(20)
Until GUIGetMsg() = $sButton

Func _GUICtrlCreateButton($sText, $nWidth = -1, $nHeight = -1, $nX = -1, $nY = -1, $sStyle = "", $sExStyle = "", $hParent = "")
    If Not IsDeclared($WS_POPUP) Then
        Local Const $WS_POPUP = 0x80000000
    EndIf
    Local $hGUI = GUICreate("Button1", $nWidth, $nHeight, $nX, $nY, $WS_POPUP, "")
    $hButton = GUICtrlCreateButton($sText, 0, 0, $nWidth, $nHeight, $sStyle, $sExStyle)
    DllCall("user32.dll", "int", "SetParent", "hwnd", $hGUI, "hwnd", WinGetHandle($hParent))
    GUISetState()
    Return $hButton
EndFunc
Edited by KentonBomb
Link to comment
Share on other sites

Create Free Style Text Anywhere... As many as you want!

...with Color and Animation!

FreeText.au3 Ver 1.0.0 May-2008, AutoIt Ver 3.2.12.0

Some of The Functions...

Posted Image

Demo Script...

#include <FreeText.au3> 

; FreeText. au3 - Demonstration Code
$Ver = "Ver 1.0.0 May-2008,  AutoIt Ver 3.2.12.0"

$wait = 500
_FreeText_Functions()
$TextGUI = _FreeText_Create("Valuater")
Sleep($wait)
_FreeText_SetTrans($TextGUI, 20)
Sleep($wait)
_FreeText_Move($TextGUI, 200, 200)
Sleep($wait)
_FreeText_Blink($TextGUI)
Sleep($wait)
_FreeText_SetTrans($TextGUI, 255)
Sleep($wait)
_FreeText_ColorStrobe($TextGUI)
Sleep($wait)
_FreeText_SetColor($TextGUI, "Red")
Sleep($wait)
_FreeText_StairCase($TextGUI)
Sleep($wait)
_FreeText_ShockWave($TextGUI)
Sleep($wait)
_FreeText_Bump($TextGUI)
Sleep($wait)
_FreeText_Animate($TextGUI, 2)
Sleep($wait)
_FreeText_Animate($TextGUI, 7)
Sleep($wait)
_FreeText_Animate($TextGUI, 6)
Sleep($wait)
_FreeText_Animate($TextGUI, 11)
Sleep($wait)
; end
_FreeText_Delete($TextGUI)

$Ver = "Ver 1.0.0 May-2008, AutoIt Ver 3.2.12.0"

ENJOY!!!

Valuater

8)

Have to say i like this! Great control over where I can put things, and what they can do; i can now, using some of my other software for support, tell clients where they SHOULD be clicking if necessary, it rocks.

One thing tho; is it possible for the animations not to animate spaces? It just detracts from the flow of the animation. For example, let's say you are doing a shockwave animation. And you have a few words for text "Click Here Please", the shockwave would process 'click', 'here', and 'please' just fine, but would also try and animate the spaces as well, which literally makes looking at the other text 2x the $wait time.

Can that be adapted out?

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Link to comment
Share on other sites

Very Awesome! Excellent work!

I do agree with zackrspv that it would be cool if it didn't do the effects on spaces

Also, some comment function headings in standard UDF format so we didn't have to guess-and-check would be awesome! :)

Only 2 complaints i have!

Excellent!!!

Link to comment
Share on other sites

Thanks Guys!!! I mean everybody!!!

I Have an Idea on how to fix the space/s problem, however I would love to hear others because I am looking at a heavy re-write to do it... :)

Paulie, The _FreeText_Functions() shows a list of All functions and their individual use/call parameters.

I know I should, and may have a look at Smoke_N's new Function header proggy!.. a little later because everything is in process right now... and mostly I am grabbing the ideas in my head and running with them first..Thx

Not much I can do about the Chinese, sorry... :)

Small update.....

; ver 1.0.1

; Added - _FreeText_GetPosition

; Added - _FreeText_Scatter **** Gotta Love This One!!! ********

; Added - _FreeText_SetParent

; Added - _FreeText_SetPosition

; Added - "Return" to all Functions

working on _FreeText_Slider()

ENJOY!

Valuater... 8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

Thanks Guys!!! I mean everybody!!!

I Have an Idea on how to fix the space/s problem, however I would love to hear others because I am looking at a heavy re-write to do it... :)

Paulie, The _FreeText_Functions() shows a list of All functions and their individual use/call parameters.

I know I should, and may have a look at Smoke_N's new Function header proggy!.. a little later because everything is in process right now... and mostly I am grabbing the ideas in my head and running with them first..Thx

Not much I can do about the Chinese, sorry... :)

Small update.....

; ver 1.0.1

; Added - _FreeText_GetPosition

; Added - _FreeText_Scatter **** Gotta Love This One!!! ********

; Added - _FreeText_SetParent

; Added - _FreeText_SetPosition

; Added - "Return" to all Functions

working on _FreeText_Slider()

ENJOY!

Valuater... 8)

i think the simpilist, and that's pretty relative there lol, way to accomplish the space problem is to detect when a space is to be called and then merge it with the next letter in the sequence. If multiple spaces, then multiple merges. Ie: "Call me Please" can turn into 'call' ' me' and ' please' this way the m and the p, for example, appear at the same time as the space. TBH not sure else how to do it, as you have to keep the original position of the space in tact :)

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Link to comment
Share on other sites

As usual, excellent work @Val. We come to expect good code from you so nothing you do comes as a huge surprise, just a nice one.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Small Update....

; ver 1.0.2

; Added - _FreeText_CreateBalls

; Added - _FreeText_CreateBlocks

; Added - _FreeText_CreateCubes

... Really Cool!!!

Demo Script

#include <FreeText.au3> ; ver 2.0.0
#include <Array.au3>

; FreeText.au3 - Demonstration Code - Horse Race
HotKeySet("{ESC}", "Terminate")
Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

Dim $wait = 5

; you can copy and paste the Functions
_FreeText_Functions()


ToolTip("Hit (ESC) to Exit", 1, 1, "FreeText", 1)
;  $BGrnd = _FreeText_CreateBackGround("Random")

Sleep($wait)

; *******************************************  Use one at a time for testing

$BlockGUI = _FreeText_CreateBalls(12)
;$BlockGUI = _FreeText_CreateBlocks(20)
;$BlockGUI = _FreeText_CreateCubes(20)

Sleep($wait)
_FreeText_Move($BlockGUI, 200, 700, 1, 20)
_FreeText_StairCase($BlockGUI, -15, 1, 20)
$GUI_Pos = _FreeText_GetPosition($BlockGUI)
_ArrayDisplay($GUI_Pos)
Sleep($wait)
$DPos = _FreeText_Scatter($BlockGUI, 300, 1, 20, 0)
Sleep($wait)
_FreeText_ColorStrobe($BlockGUI)
Sleep($wait)
_FreeText_SetTrans($BlockGUI, 20)
Sleep($wait)
_FreeText_SetPosition($BlockGUI, $DPos)
Sleep($wait)
_FreeText_Move($BlockGUI, 200, 200, 1, 20)
Sleep($wait)
_FreeText_Blink($BlockGUI, 20)
Sleep($wait)
_FreeText_SetTrans($BlockGUI, 255)
Sleep($wait)
_FreeText_ColorStrobe($BlockGUI)
Sleep($wait)
_FreeText_SetColor($BlockGUI, "Red")
Sleep($wait)
_FreeText_StairCase($BlockGUI, 15, 1, 20)
Sleep($wait)
_FreeText_ShockWave($BlockGUI)
Sleep($wait)
_FreeText_Bump($BlockGUI)
Sleep($wait)
_FreeText_Move($BlockGUI, 100, 100, 1, 20)
Sleep($wait)
$thanks = _FreeText_Create("ENJOY!  8)", 300, -1, 30)
Sleep($wait)
_FreeText_ColorStrobe($thanks)
Sleep($wait * 3)

Thanks George... :)

... Gotta Love this Stuff!!

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

NEW!!!

Ver 2.0.0 is a "Complete Re-Write" with 2-dimensional Arrays ... and lots more Stuff!

... Even Better Now!

#include <FreeText.au3> ; ver 2.0.0
#include <Array.au3>

; FreeText.au3 - Demonstration Code - Horse Race
HotKeySet("{ESC}", "Terminate")
Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

Dim $wait = 5

; you can copy and paste the Functions
_FreeText_Functions()


ToolTip("Hit (ESC) to Exit", 1, 1, "FreeText", 1)
$BGrnd = _FreeText_CreateBackGround("Random")

Sleep($wait)

; *******************************************  Use one at a time for testing
$BlockGUI = _FreeText_Create("Horse Race")
; $BlockGUI = _FreeText_CreateBalls(10)
; $BlockGUI = _FreeText_CreateBlocks(10)
; $BlockGUI = _FreeText_CreateCubes(10)
_FreeText_SetColor($BlockGUI, "Red")
Sleep($wait)
_FreeText_StairCase($BlockGUI, -5, 1, 10)
;~ ; for shaped GUI's only
_FreeText_Shape_SetText($BlockGUI, "Horse Race")
$Sparkle = _FreeText_CreateGlitter()
Sleep($wait)
_FreeText_Rainbow($BlockGUI, 3000)
Sleep($wait)
$MixUp = _FreeText_MixUp($BlockGUI)
Sleep($wait)
$winner = _FreeText_HorseRace($BlockGUI)
MsgBox(0x0, "Winner", "The winner is #" & $winner, 3)
Sleep($wait)
_FreeText_SetPosition($BlockGUI, $MixUp)
Sleep($wait)
_FreeText_MoveVertical($BlockGUI, 50, 50, 1, 20)
Sleep($wait)
$BGUI = _FreeText_CreateBalls(15)
Sleep($wait)
_FreeText_StairCase($BGUI, -25, 1, 20)
Sleep($wait)
_FreeText_Shape_SetText($BGUI, "'R'a'i'n'M'a'n'")
_FreeText_SetColor($BGUI, "green")
Sleep($wait)
_FreeText_Rainbow($Sparkle, 3000)
_FreeText_Rain($BGUI)
Sleep($wait)
_FreeText_StairCase($BGUI, 55, 1, 20, 0)
Sleep($wait)
_FreeText_MoveAsIs($BGUI, 200)
Sleep($wait)
_FreeText_Bump($BGUI)
Sleep($wait)
$GUI_Pos = _FreeText_GetPosition($BlockGUI)
;_ArrayDisplay($GUI_Pos)
Sleep($wait)
$DPos = _FreeText_Scatter($BGUI, 300, 1, 20, 0)
Sleep($wait)
_FreeText_ColorStrobe($BGUI)
_FreeText_SetColor($BGUI, "green")
_FreeText_Implode($BlockGUI, 1)
_FreeText_SpinIn($BGUI)
;
$thanks = _FreeText_Create("ENJOY!  8)", 300, -1, 30)
Sleep($wait)
_FreeText_ColorStrobe($thanks)
Sleep($wait * 3)

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

does "EVERYTHING" you have say 2.0.0 at the top????

8)

I re-downloaded your FreeText.au3 and placed it in Includes folder... then copied and pasted your newest demo script and saved it as test.au3 on the desktop and there's 11 missing functions -- if I comment out those offending functions I can get the script to run, but it's not nearly as functional as you intended.

Chris

*** EDIT *** I should clarify, it's the horse race script that I am having errors with. ***

Edited by tijiez
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...