Sign in to follow this  
Followers 0
uTorrentCZ

Image in GUI loaded from resource of executable

5 posts in this topic

#1 ·  Posted (edited)

Hello.

I am beginner in AutoIT. I tried create some functional scripts.

Now I want to create program with GUI. I tested SampleControls.au3.

The problem is that image is loaded from external file.  

GUICtrlCreatePic("logo.gif", 0, 0, 120, 284)

I read wiki, tried google, but nothing relevant I did not find.

My question: Is it possible to load image from resource of executable (new created .exe from .au3 script)?

If yes, please give me link to wiki or write me, how can I do it.

I can see it in recource of another programs.

CONTROL "", 105, STATIC, SS_BITMAP | SS_REALSIZEIMAGE | WS_CHILD | WS_VISIBLE, 0, 0, 70, 175

Thanks.

Edited by uTorrentCZ

Share this post


Link to post
Share on other sites



I know this thread is old, but I'm having trouble getting things working the UDF. I made sure I have the full version of SciTE and AutoIT3Wrapper.

I tested with the first sample script (as-is with a specific image defined) that sets the jpg to the resource, then sets GUICtrlCreatePic to "" and pulls with _ResourceSetImageToCtrl.  

Resource Hacker is showing TEST_JPG_1 in the file,  but when I run the compiled exe it returns  Error: Subscript used on non-accessible variable.

Any idea what the issue could be?

Share this post


Link to post
Share on other sites

Now I finally see it. Looks like there is a ResourcesEx now? I'll take a gander

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Yes.

If you use latest version of AutoIt then use updated ResourcesEx UDF (link is in my signature and also at end of my original topic/thread).

My original Resources UDF works with older versions of AutoIt and is not updated/improved.

Edited by Zedna

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