Sign in to follow this  
Followers 0
locutus243

Avi Error - Valid Windows Image

3 posts in this topic

I've got a simply GUI window that should have an avi file (which I converted from an animated GIF) in it.

However when I try to open the GUI then the following message appears:-

Sample GUI: AutoIt3.exe - Bad Image

The application or DLL C:\Shortcuts\avi\MouseMouse.avi is not a valid Windows image. Please check this against your installation diskette.

The GUI Window then appears but obviously without the avi. I've had the problem before and managed to fix it but can't seem to find my way round this one. And I have other avi's which I've converted in the same way and are situated in the same place and they work fine...Of the two functions that are listed below, the avi in the first function works fine, but the one in the second was created and is written in exactly the same way but doesn't work???

I've seen there is a post that deals with this from the Registry but I'm already listing the full path so not sure its the same problem. My script is included below for your information:-

Func ClickTip1()
    $ClickTipGUI = GUICreate("Click Tip 1", 350, 150, -1, -1) ; will create a dialog box 
    GUICtrlCreateGroup("Pre-Imp Check", 10, 10, 240, 125)
                GUICtrlCreateLabel("This button runs the Access macro that will check a publication before Implementation. The publication being checked should be entered in the input boxes above. To check by publication leave the FT/OT fields blank.", 20, 30, 225, 80)
    GUICtrlCreateAvi("C:\shortcuts\avi\Elmo.avi", -1, 250, -10)
    GUICtrlSetState(-1, 1)
    GuiSetState()

    While 1
        $ClickTip_MSG = GUIGetMsg()
        If $ClickTip_MSG = $GUI_EVENT_CLOSE Then 
                       GUIDelete($ClickTipGui)
                       ExitLoop
        EndIf
                    Sleep(100); Don't burn out the cpu  
    WEnd
    WinActivate($MainGUI)
        
EndFunc

Func ClickTip2()
                
    $ClickTipGUI = GUICreate("Click Tip 2", 350, 150, -1, -1) ; will create a dialog box 
    GUICtrlCreateGroup("Numerous Items", 10, 10, 240, 125)
    GUICtrlCreateLabel("If there were numerous errors for the same publication then it can become tiresome entering them all. Rather than enter a host of different item numbers you can press this button and it will enter a value which can be used to signify numerous items in the logging process. Typically I use this option if there are more than six items with errors.", 20, 30, 225, 80)
    $elf = GUICtrlCreateAvi("C:\Shortcuts\avi\FallingElf.avi", -1, 250, -10)
    GUICtrlSetState($elf, 1)
    GuiSetState()

    While 1
        $ClickTip_MSG = GUIGetMsg()
        If $ClickTip_MSG = $GUI_EVENT_CLOSE Then 
        GUIDelete($ClickTipGui)
        ExitLoop
        EndIf
                    Sleep(100); Don't burn out the cpu  
    WEnd

    WinActivate($MainGUI)
EndFunc

Share this post


Link to post
Share on other sites



Um, i had that same probim. Make sure that the avi is NOT COMPRESSED in any way. It may look like a big file, but if you use fileinstall in autoit, it will shrink it really tiny, trust me. For some reasons, it doesent support compressed avi files.

Share this post


Link to post
Share on other sites

Yeh that would explain why it isn't working...well kind of.

I've downloaded some Animated Gif's from a website and I want to include them in my GUI. Because AutoIT won't let me include GIf's, I used GIF Construction Set to convert them into .avi files. And now none of them work, so I assume they were compressed in the conversion process.

The weird thing is, last week I did exactly the same thing using exactly the same tools and the .avi files I created last week worked fine in my GUI.

I don't understand what's changed...either with AutoIT or with the .avi files.

Mark

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  
Followers 0