Jump to content

Resources UDF


Zedna
 Share

Recommended Posts

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]
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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]
Link to comment
Share on other sites

  • 1 month later...

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]

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 1 month later...

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
 Share

  • Recently Browsing   1 member

×
×
  • Create New...