Sign in to follow this  
Followers 0

Resources UDF

640 posts in this topic

#81 ·  Posted

You must run all examples only in compiled form (compiled EXE file) and no directly by Run from Scite.

I think it's your case.

Thats the first thing I tried to do, & same goes for beta compile but @ScriptDir & "\binary_data.dat" file was not created, this is why I asked. :)

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites



#82 ·  Posted

Thats the first thing I tried to do, & same goes for beta compile but @ScriptDir & "\binary_data.dat" file was not created, this is why I asked. :)

As Larry said: Use the same resource identifier (TEST_BMP_1) in Auto3Wrapper directive and also later in  script.

Also try my example without any modifications first.

Share this post


Link to post
Share on other sites

#83 ·  Posted (edited)

As Larry said: Use the same resource identifier (TEST_BMP_1) in Auto3Wrapper directive and also later in script.

Also try my example without any modifications first.

I compile your samples witout modifications: resource_test.au3 & all i see is empty GUI, no extra files are being created. same goes for resource_test_ie.au3

I compile & run this & again nothing happens:

#AutoIt3Wrapper_Res_File_Add=image1.bmp, bitmap, TEST_BMP_1 ; Filename,Section,ResName
#include "resources.au3"
 ; save binary data from resource to file
_ResourceSaveToFile(@ScriptDir & "\binary_data.dat", "TEST_BMP_1")
Edited by goldenix

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites

#84 ·  Posted

Save to file is RC_DATA ... you may need to research the underlying functions and change RC_DATA to RC_BITMAP

Lar.


AutoIt3 Yahoo Group - Expert LarryA tool of Big Blue...

Share this post


Link to post
Share on other sites

#85 ·  Posted (edited)

okkey I got the examples to work, ( after i restarted my pc... :) )

yet why isnt this working? Shuldnt this create the dat file?

#AutoIt3Wrapper_Res_File_Add=image1.bmp, bitmap, TEST_BMP_1
#include "resources.au3"
_ResourceSaveToFile(@ScriptDir & "\binary_data.dat", "TEST_BMP_1")oÝ÷ ØèºÛÚ®&ë-ìjyèµ·®±çZºÚ"µÍÌÍØHH  ÌÎNÚ[XYÙLK  ÌÎNÂÌÍØH  ÌÎNØ]X   ÌÎNÂÌÍØÈH    ÌÎNÕTÕÐTÌIÌÎNÂÐ]]Ò]ÕÜÔ×Ñ[WÐYIÌÍØK   ÌÍØ  ÌÍØoÝ÷ ØƲmè¦ë-Á¨¬¶)à+b榦Ø^­ë(º·±«·q©ívazØb°j{Zµ©eN¬Ì!jئ¶¼¢hv%­¶¬{h¶¡×­+0k(­Â)emç%yªåÊéÝz»-jwZnWºÚ"µÍIÌÍ×ÑÛHØÜ [È ][ÝÉÌLÜÚÚ[ÉÌÎNÂIÌÍ×ÑÛHØÜ   [È ÌÎNÉÌLÉÌÎNÂIÌÍ×Ù[LHH    ÌÎNÚ[XYÙLK  ÌÎNÂIÌÍ×Ù[LH ÌÎNÚ[XYÙL   ÌÎNÂNÝZÙHH[HYÙH]Ú]H^KY[^H^[[È^]Q[R[Ý[
    ÌÍ×ÑÛ  [È ÌÍ×Ù[K  ÌÍ×ÑÛ  [È ÌÍ×Ù[L
Edited by goldenix

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites

#86 ·  Posted

I compile your samples witout modifications: resource_test.au3 & all i see is empty GUI, no extra files are being created. same goes for resource_test_ie.au3

I compile & run this & again nothing happens:

#AutoIt3Wrapper_Res_File_Add=image1.bmp, bitmap, TEST_BMP_1 ; Filename,Section,ResName
#include "resources.au3"
 ; save binary data from resource to file
_ResourceSaveToFile(@ScriptDir & "\binary_data.dat", "TEST_BMP_1")
From my first post:

Notes:

* to compile all script examples must be apropriate resource data files in script directory (from resource_data.zip)

--> in your case unpack all files from resource_data.zip to your script directory

Share this post


Link to post
Share on other sites

#87 ·  Posted

okkey I got the examples to work, ( after i restarted my pc... :) )

yet why isnt this working? Shuldnt this create the dat file?

#AutoIt3Wrapper_Res_File_Add=image1.bmp, bitmap, TEST_BMP_1
#include "resources.au3"
_ResourceSaveToFile(@ScriptDir & "\binary_data.dat", "TEST_BMP_1")oÝ÷ ØèºÛÚ®&ë-ìjyèµ·®±çZºÚ"µÍÌÍØHH  ÌÎNÚ[XYÙLK  ÌÎNÂÌÍØH  ÌÎNØ]X   ÌÎNÂÌÍØÈH    ÌÎNÕTÕÐTÌIÌÎNÂÐ]]Ò]ÕÜÔ×Ñ[WÐYIÌÍØK   ÌÍØ  ÌÍØoÝ÷ ØƲmè¦ë-Á¨¬¶)à+b榦Ø^­ë(º·±«·q©ívazØb°j{Zµ©eN¬Ì!jئ¶¼¢hv%­¶¬{h¶¡×­+0k(­Â)emç%yªåÊéÝz»-jwZnWºÚ"µÍ¨(  ÌÍ×ÑÛHØÜ [È ][ÝÉÌLÜÚÚ[ÉÌÎN¨(    ÌÍ×ÑÛHØÜ [È ÌÎNÉÌLÉÌÎN¨(  ÌÍ×Ù[LHH    ÌÎNÚ[XYÙLK  ÌÎN¨(  ÌÍ×Ù[LH ÌÎNÚ[XYÙL   ÌÎN¨(ÝZÙHH[HYÙH]Ú]H^KY¨[^H^[[È^]¨([R[Ý[
    ÌÍ×ÑÛ  [È ÌÍ×Ù[K  ÌÍ×ÑÛ  [È ÌÍ×Ù[L
READ ALL NOTES in my first post:

Notes:

* _ResourceSaveToFile() don't work with $RT_BITMAP type for now

For save bitmaps use FileInstall() - look into helpfile for details about using it

Also #AutoIt3Wrapper directive must be used way as it is supposed to be used.

Share this post


Link to post
Share on other sites

#88 ·  Posted

READ ALL NOTES in my first post:

For save bitmaps use FileInstall() - look into helpfile for details about using it

Also #AutoIt3Wrapper directive must be used way as it is supposed to be used.

aha in this case the wrapper thingie cant help me, nor can fileinstall, since i cant use variables.

Thank you for your time.


My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites

#89 ·  Posted

this is creativity,

well waiting for Button and other GuiCtrls support

thanks I really needed this solution


[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites

#90 ·  Posted

this is creativity,

well waiting for Button and other GuiCtrls support

thanks I really needed this solution

Thanks.

Unfortunatelly my free time for larger projects is very limited now

so I will welcome anybody's help/ideas on this my unfinished/limited UDF.

Share this post


Link to post
Share on other sites

#91 ·  Posted

Unfortunatelly my free time for larger projects is very limited now

so I will welcome anybody's help/ideas on this my unfinished/limited UDF.

I've never tried to do such huge coding before,

I'm not afraid or anything :D , just kidding

I'll study your UDF after a couple of days I guess if the time allows,

maybe I can get the idea !!!

see ya


[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites

#92 ·  Posted (edited)

I've never tried to do such huge coding before,

I'm not afraid or anything :D , just kidding

I'll study your UDF after a couple of days I guess if the time allows,

maybe I can get the idea !!!

see ya

OK.

Also look at this my Post #34

Edited by Zedna

Share this post


Link to post
Share on other sites

#93 ·  Posted

very very nice project. I have been looking for this kind of thing since i started coding in AI :D

Share this post


Link to post
Share on other sites

#94 ·  Posted (edited)

got it! :D

After having to understand that the res files hade to be in the temp dir

(your exemple - post 1 unchanged),

==> with:

#AutoIt3Wrapper_Res_File_Add="%scriptdir%\ etc.

the resources can be in the script dir.

It's a very good work!

Thank you Zedna.

Edited by grham

Share this post


Link to post
Share on other sites

#95 ·  Posted (edited)

Exellent work !!!

This UDF is just what I've been looking for ever since I began to use Autoit.

:D:P;)

Edited by taz742

Share this post


Link to post
Share on other sites

#96 ·  Posted (edited)

Thanks to all for compliments!!

Just a remark i think there is an error in the example file "test_1.htm":

This is not error. It's intended: test_gif_1 is resource name of GIF image inside EXE file directly linked from HTML (HTML is also in EXE as resource).

Edited by Zedna

Share this post


Link to post
Share on other sites

#97 ·  Posted

Zedna, I believe the information you are looking for about jpeg, png, gif and other images can be gleaned from this page:

http://www.codeproject.com/KB/graphics/loa...f_resource.aspx


Who else would I be?

Share this post


Link to post
Share on other sites

#98 ·  Posted (edited)

Zedna, I believe the information you are looking for about jpeg, png, gif and other images can be gleaned from this page:

http://www.codeproject.com/KB/graphics/loa...f_resource.aspx

Thanks for link.

I saw such similar solutions when I started my first experiments

but I think there is BIG problem with:

IPicture *pic
...
OleLoadPicture(pStream, 0, FALSE,IID_IPicture, (void **)&pic);
...
pic->get_Width(cx);
  pic->get_Height(cy);

It's object oriented syntax, IPicture is object (or class?) and this isn't supported in AutoIt.

That's why I tried to use GDI+ instead. See my post #34 I have the same code up to CreateStreamOnHGlobal() call

I think my GDI+ concept could be fine if I can put correct DllCall syntax for these API functions:

CreateStreamOnHGlobal
GdipLoadImageFromStream
_GDIP_BitmapCreateHBITMAPFromBitmap

in my post #34. I have played with it quickly but no success. Note: Code in post #34 is in old A3L syntax there

EDIT: I will be offline this week so don't worry if I will not reply to future posts immediatelly

Edited by Zedna

Share this post


Link to post
Share on other sites

#99 ·  Posted

I received this problem report:

the current version AutoIt3Wrapper.exe V 1.10.1.4,

date: 13-2-2008 doesn´t work with "resources.au3"

the gui is empty. :-( after compiling.

the old AutoIt3Wrapper.exe v.1.9.4.0, date 11.10.07 work

perfect with "resources.au3".

I will look at it.

Share this post


Link to post
Share on other sites

#100 ·  Posted

Can you implement ResourceWrite, so that the .exe can update the resource data for the next time the .exe runs?

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