Jump to content

Text effects UDF


peethebee
 Share

Recommended Posts

Hi!

Here we go again.

I started to code a UDF containing at the moment about 5 functions to animate text in any control (you need the controlid) and window (handle). The speed is included seperately as param for every func.

I wait for your suggestions for new effects and your reviews on the funcs availible.

peethebee

EDIT: Removed file, get it directly via my fileman!

Edited by peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Link to comment
Share on other sites

  • Replies 79
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi!

I do not really understand. Do you have a screenshot? If it should be too fast, you can increase the $delay.

peethebee

Edited by peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Link to comment
Share on other sites

here it is.

FYI: I'm running XP Pro SP2, no themes

<{POST_SNAPBACK}>

same on my system. W2K SP4, Beta .43

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Hi!

I use WinXp without SPs.

When does this black thing appear? When the effect starts or in the end?

I hope I can fix it then.

So far I've no ideea what could be the problem with it. You could try the effect with other controls too and other effects in the label in order to get to know where the error lies.

peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Link to comment
Share on other sites

The problem is "ClearType" I believe. (at least on the SP2 system). Windows has a problem repainting a set of text that it just typed when using cleartype. @GAFrost, how does it react if you turn cleartype off?

Who else would I be?
Link to comment
Share on other sites

Hi!

I'm sorry that it does not work. btw the general question: Do you like this possibility to do some easy effects with just one function call?

I still don't know when the black part appears. When the effect starts, when he's finished, when?

Additionally I found out that the black part seems to be either 238 pixels brought or as broad as the text.

peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Link to comment
Share on other sites

Hi!

I uploaded a new version (1.2) onto my fileman.

v1.2:

- NEW: _txt_eff__spin, _txt_eff__broad, _txt_eff__small

- _txt_eff__airport now supports $skip_chars

An idea where the error could be located. Is it possible that the label is not refreshed correctly by Windows causing in an overlay of different chars? If the func "_txt_eff__enlarge_from_left" works at your PCs, that could be the problem. A solution could be to make the effect slower.

I hope, it works, peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Link to comment
Share on other sites

same problem with labels, apparently it's a refresh problem, tried the same function on the inputbox and it work fine.

Looks cool in a button set to flat style

Gary

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

This fixed my problem, need beta tho.

Edit: added variable to each function, for controls that need to force redraw default = 0, set to 1 to force

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

here's a twist to couple of the functions:

function calls

_txt_eff__slide_left($GUIwin, $label, "This is a text is removed from right to left quite slowly!", 75, 1)
Sleep(1500)

_txt_eff__remove_from_right($GUIwin, $label, "This is a text which is removed from right to left", 50,1)
Sleep(1500)

functions

Func _txt_eff__slide_left($winhandle, $control_id, $text = "", $delay = 100, $static = 0)
    Opt ("WinTitleMatchMode", 4)
    
    If $text <> "" Then
        For $i = StringLen($text) To 0 Step - 1
            If $static Then GUISetState(@SW_LOCK)
            ControlSetText($winhandle, "", $control_id, StringRight($text, $i))
            Sleep($delay)
            If $static Then GUISetState(@SW_UNLOCK)
        Next
        Return 1
    Else
        Return 0
    EndIf
EndFunc  ;==>_txt_eff__slide_left

Func _txt_eff__remove_from_right($winhandle, $control_id, $text = "", $delay = 100, $static = 0)
    Opt ("WinTitleMatchMode", 4)
    
    If $text <> "" Then
        For $i = StringLen($text) To 0 Step - 1
            If $static Then GUISetState(@SW_LOCK)
            ControlSetText($winhandle, "", $control_id, StringLeft($text, $i))
            Sleep($delay)
            If $static Then GUISetState(@SW_UNLOCK)
        Next
        Return 1
    Else
        Return 0
    EndIf
EndFunc  ;==>_txt_eff__remove_from_right

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

I'm using latest beta (3.1.1.66) and there are no @SW_LOCK & @SW_UNLOCK macros..?

Edit: Oh, sorry: they are there. They are just not included in macros list and I didn't have latest Scite configuration files.

Edited by tuape
Link to comment
Share on other sites

Hi!

I uploaded version 1.3 into fileman. It includes some new funcs.

@rakudave: Thank you very much!

@gafrost: Thank you too, that you worked on it. I will hve a look at it and include it in v1.4 if it works.

Two little questions I came up with while writing the zoom function:

How can I read the current font size and name of a control?

How can I make the control resize itself to the text's width and height?

Thanks and have fun with it, peethebee

ps.s. I'm often not quite sure how to name the funcs cause I'm German. So if the name does not fit, please say it!

Edited by peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Link to comment
Share on other sites

Hi!

I included the suggestion of gafrost. At my computer it works now. Please test it with yours. I think Beta 3.1.1.65 should be required.

Please have a special look at the "about_messages" function!

Ciao, peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

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...