Jump to content

Recommended Posts

Posted

Hi guys -n- gals!

Does anyone know how to create a RichEdit control to display animated emoticons like MSN Messenger's. I searched the forums but could not find anything regarding this subject. However, I did find trancexx's GIFAnimation.au3 UDF.

After Doing a web search I found this Here for VB but unfortunately, I'm just learning Autoit so VB is a bit much for me right now.

I did try to use trancexx's UDF and it works but when you close it down the memory goes to 100%.

Thanks

#AutoIt3Wrapper_AU3Check_Parameters=-w 1 -w 2 -w 3 -w 4 -w 5 -w 6

#include <WindowsConstants.au3>
#include <GIFAnimation.au3>
#include <GuiRichEdit.au3>
#include <ButtonConstants.au3>

Opt("MustDeclareVars", 1)

Global $sTempFolder = @TempDir & "\GIFS"
TrayTip("GIF Download", "Please wait while gifs are downloaded and processed", 0)
DirCreate($sTempFolder)
Global $sFile = $sTempFolder & "\smiley-computer012.gif"
If Not FileExists($sFile) Then InetGet("http://www.freesmileys.org/smileys/smiley-computer012.gif", $sFile)
Global $hGIF, $hRichEdit
GUICtrlSetTip($hGIF, "Hit him")

Global $hGui = GUICreate("GIF Animations", 670, 520, -1, -1, $WS_OVERLAPPEDWINDOW)
$hRichEdit = _GUICtrlRichEdit_Create($hGui, "", 10, 10, 300, 220, _
            BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL))
Global $hButton = GUICtrlCreateButton("MsgBox", 370, 490, 100, 25)
Global $hGIF2 = _GUICtrlCreateGIF($sFile, "", 10, 10)
_GUICtrlRichEdit_AppendText($hRichEdit, $hGIF2)
_GuiCtrlRichEdit_AppendText($hRichEdit, @CR & "")
_GuiCtrlRichEdit_AppendText($hRichEdit, @CR & "This is appended text.")
GUICtrlSetResizing($hButton, 802)

TrayTip("", "", 0)
GUIRegisterMsg(15, "_ValidateGIFs"); WM_PAINT

GUISetState()
Global $aSize, $aDimension

While 1
    Switch GUIGetMsg()
        Case -3
            Exit
        Case $hButton

            MsgBox(64, "Some title", "Just to see is the gifs are blocked by this and vice versa.", 0, $hGui)
GUICtrlDelete($hGIF2)
    EndSwitch
WEnd


Func _ValidateGIFs($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam
    _GIF_ValidateGIF($hGIF)

EndFunc   ;==>_ValidateGIFs
Posted

Hi JohnOne; and thanks for your response!

Yes that would be one way of doing it but it would be the long way around. It would take a lot more code to do the same thing. (1,000 lines of code compared to 10,000) I was hoping that someone solved this problem.

Posted (edited)

Yes! I have built a gui around this one that z0mgItsJohn wrote sometime back. Then true modified the code by adding encryption using AES.au which can be found

I've coded a control panel for login to be used for Local Area Network and Wide Area Network, So far I've come to a crossroad to go with Html or RichEdit for the animated emoticons. I will release this code on the Autoit forums after I complete it.

Edited by Newbercase

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
  • Recently Browsing   0 members

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