Jump to content
Sign in to follow this  
ltjKt1

Using Images in Bartpe

Recommended Posts

ltjKt1

Hi,

I am a autoIT newbie, and looking to use compiled scripts in BartPE. So far I haven't been able to get simple tests of the GuiCtrlCreatePic to work under BartPE. Is this a known issue? Or am I doing something wrong?

I am using the compile option in the editor to create an executable, and the "test.gif" lives next to it. Running from windows it works just fine, but from BarPE I see no image.

Thanks,

Josh

#include <GUIConstantsEx.au3>

;Set options
    Opt("GUIOnEventMode", 1)
    Opt('MustDeclareVars', 1)
;Create GUI Window
    GUICreate("My Test of Images", 600, 300) 
;Graphic
GuiCtrlCreatePic("test.gif",0,0, 600,78)
    GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
;Displays the window
    GUISetState(@SW_SHOW)
; Enter an infinite loop
    While 1
        Sleep(10)
    WEnd

Func CLOSEClicked()
    Exit
EndFunc

post-58225-12754080990147_thumb.gif

ImgTest.au3

Share this post


Link to post
Share on other sites
NullStmt

Hey Josh,

I'm not using AutoIt with BartPE myself, but I have seen several other posts in these forums about the interaction of those two items. Most of the problems in the posts seemed to be related to BartPE missing some of the normal DLLs and system resources since it is a stripped down version of a normal Windows system. Since you mentioned that your program works fine under normal Windows, but not under BartPE I would expect that the same is probably true for your program.

Regards,

Craig

Share this post


Link to post
Share on other sites
Mobius

ItjKt1,

Bitmap images are supported by the standard BartPE system but not jpg or gif when using GuiCtrlCreatePic.

You could probably reintroduce certain system dll's and re-image BartPE or use third party image libraries to achieve what you want, but I just use bmp's.

Edited by Mobius

Share this post


Link to post
Share on other sites
ltjKt1

Bitmap images are supported by the standard BartPE system but not jpg or gif when using GuiCtrlCreatePic.

That was the trick. Thank you, thank you.

Josh

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.