Jump to content

Text effects UDF


peethebee
 Share

Recommended Posts

Thank you for your ideas. I will try to use them!

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!

Thank you very much, gafrost :dance::dance::whistle: .

I will test it too and include it in v1.9.

My own attempt is included in v1.8 (new in my fileman).

In this zip file you find a first version of the designer too.

The preview is not included so far, but the "copy to clipboard" func should work already.

Moreover I only included the first to funcs' params (airport and about_messages).

Feel free to do some first tests.

I think this method could work with any func.

Is there a better way to execute a func with params stored in a single string than the func Execute($string)?

peethebee

Edited by peethebee

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

Link to comment
Share on other sites

Hi!

v1.9 is now online and it includes a complete version of my new "Text Effects Designer" (v0.95).

v1.9 includes many little bug fixes that made some effects not look perfect.

The only problem with the Designer is that the preview does not work in the label. Please check if you have this error too.

peethebee

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

Link to comment
Share on other sites

Just remove the #:

$parts[0] = 4

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

Link to comment
Share on other sites

Hi!

I produced a bug fix.

Will be online in 2 minutes.

Edit: I tis online as v1.9 again in the fileman.

peethebee

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 fixed some problems I came over with and the Designer has been improved.

But the preview in the label does not work at all.

Moreover the color and the style functions do neither work in the input nor in the label.

I hope you like it and perhaps you can help me.

peethebee

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

Link to comment
Share on other sites

Might want to look at what your trying to do with options

Not sure why, but everything indicates that this should work with the label, it now sends the text to the label, but now have old problem.

Case $msg = $preview_button
            If _check_fields(1) = 1 Then
                ContinueLoop
            EndIf
            
        ; generate code
            For $i = 1 To $last_param_given
                $value = GUICtrlRead($param_input[$i])
                If $param_name[$i] = "winhandle" Then $value = "$gui"
                If $param_name[$i] = "control_id" Then $value = $preview_label
                If $param_name[$i] = "texts" Then $value = $credits
                If $param_name[$i] = "delay" Then $value = GUICtrlRead($param_input[$i])
                    
                If (StringIsInt($value) = 0) and (StringIsFloat($value) = 0) Then
                    If StringInStr($value, "$") = 0 Then $value = '"' & $value & '"'
                EndIf
                $out_string = $out_string & $value & ", "
            Next
            
            $out_string = StringTrimRight($out_string, 2)
            $res_string = $out_string & ")"
            Execute ($res_string)
            $res_string = StringReplace($res_string, ", " & $preview_label & ",", ", " & $preview_input & ",")
            Sleep(1000)
            Execute ($res_string)

Func _check_fields($prev = 0)
    Global $last_param_given, $out_string, $value
    $out_string = "_txt_eff__" & $funcs_internal_name[_StringPosInArray($funcs, $func_selected) ]
    $out_string = $out_string & "("
    
; check if required params have been left out
    For $i = 1 To UBound($this_func_params_array) - 1
        If GUICtrlRead($param_input[$i]) = "" And $param_is_opt[$i] = "<no>" Then
            If $prev = 1 Then
                If $param_name[$i] <> "winhandle" And $param_name[$i] <> "control_id" And $param_name[$i] <> "texts" And $param_name[$i] <> "options" Then
                    MsgBox(0x10, "Error!", "You left out at least one parameter that is not optional." & @CRLF & "Please fix that!", 2)
                    Return 1
                EndIf
            Else
                MsgBox(0x10, "Error!", "You left out at least one parameter that is not optional." & @CRLF & "Please fix that!", 2)
                Return 1
            EndIf
        EndIf
    Next
    
; check wich param is filled out the last
    For $i = 1 To UBound($this_func_params_array) - 1
        If GUICtrlRead($param_input[$i]) <> "" And GUICtrlRead($param_input[$i]) <> "(standard)" Then
;~          If GUICtrlRead($param_input[$i]) <> $param_is_opt[$i] Then
                $last_param_given = $i
;~          EndIf           
        EndIf
        If $prev = 1 Then
            If $param_name[$i] = "winhandle" Or $param_name[$i] = "control_id" Or $param_name[$i] = "texts" Or $param_name[$i] = "delay" Then
                If GUICtrlRead($param_input[$i]) <> $param_is_opt[$i] Then
                    $last_param_given = $i
                EndIf
            EndIf
        EndIf
    Next
    
; fill out missing params in between
    For $i = 1 To $last_param_given
        If GUICtrlRead($param_input[$i]) = "" or GUICtrlRead($param_input[$i]) = "(standard)" Then
            If (StringIsInt($param_is_opt[$i]) = 1) Or (StringIsFloat($param_is_opt[$i]) = 1) Then
                GUICtrlSetData($param_input[$i], $param_is_opt[$i])
            Else
                GUICtrlSetData($param_input[$i], "")
            EndIf
        EndIf
    Next
    Return 0
EndFunc  ;==>_check_fields

Gary

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

Hi!

Yes, it seens to be the same problem with the refreshing.

But there is the other one which prevents the color, style and zomm effects from being shown anywhere in the preview.

I don't know, if they are connected to each other.

peethebee

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

Link to comment
Share on other sites

@peethebee

Couldn't get your Designer to work as written for labels, so I re-wrote it.

Lot more code but it works.

Only thing I ran into is if the label is in a group then it won't refresh.

Gary

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

Hi!

THANK YOU, gafrost!

I will have a close look at it.

My experiments with leaving out the grouping did not result in success.

Would be great if it works.

peethebee

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

Link to comment
Share on other sites

Hi!

Hi!

@gafrost:

I had a quick look at it and I really see that this has been much work. Moreover I see that it works - great!

The only problem I had, is that some params are either left out or taken over from the last function displayed.

I think you should delete all controls and recreate them completely new...

Thanks for your work, peethebee

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

Link to comment
Share on other sites

That was a quick run of it, you know the functions better than I do.

Was thinking might create an ini with the information and create the controls from that.

Don't have time for it currently.

Gary

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

Hi!

If you do not have the time, I will have a closer look at it.

Tahnk you anyway,

peethebee

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

Link to comment
Share on other sites

Hi!

Grab the version 1.9.2 which is working completely here: http://www.autoitscript.com/fileman/index.php?act=list&op=get&target=text_effects%2Ftext_effects_1.9.2.zip

I exchanged the label with an button which is more realistic and no proble as the code generator works fine.

I hope you like it and perhaps this UDF could become part of the standard UDFs some time in future.

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