Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Resources UDF


  • Please log in to reply
627 replies to this topic

#81 goldenix

goldenix

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 738 posts

Posted 12 December 2007 - 04:27 PM

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. :)







#82 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,767 posts

Posted 12 December 2007 - 04:37 PM

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.

#83 goldenix

goldenix

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 738 posts

Posted 12 December 2007 - 04:48 PM

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, 12 December 2007 - 04:51 PM.


#84 LarryDalooza

LarryDalooza

    Schmember

  • Active Members
  • PipPipPipPipPipPip
  • 962 posts

Posted 12 December 2007 - 05:10 PM

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

Lar.
Posted ImageAutoIt3 Yahoo Group - Expert LarryA tool of Big Blue...

#85 goldenix

goldenix

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 738 posts

Posted 12 December 2007 - 08:36 PM

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©ív‹azØ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ˆÌ ͎×ٚ[LˆH  ˆÌÎNÚ[XYÙL‹˜›   ˆÌÎN‚NÝZÙHHš[HY™ÙH]Ú]H^KYˆ[ˆ^H^˜XÝš[H  ˜[È^]‚Qš[R[œÝ[     ˆÌ ͎×ћÛˆ   ˜[È  ˆÌ ͎×ٚ[K ˆÌ ͎×ћÛŒˆ ˜[È  ˆÌ ͎×ٚ[LŠ

Edited by goldenix, 12 December 2007 - 08:38 PM.


#86 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,767 posts

Posted 12 December 2007 - 10:06 PM

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

#87 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,767 posts

Posted 12 December 2007 - 11:12 PM

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©ív‹azØbž°j{Zµ©eN¬ŠÌ!jئ¶¼¢ž hv‚%–›­¶¬Š{h¶œ¡×­†+0k(­Â)emç%yªåÊéÝz»-jwZnWšºÚ"µÍ¨( ˆÌ ͎×ћÛˆHØܚˆ    ˜[È  œ][ÝɈÌLŽÜÚÚ[œÉˆÌÎN¨(  ˆÌ ͎×ћÛŒˆHØܚˆ  ˜[È  ˆÌÎNɈÌLŽÉˆÌÎN¨(   ˆÌ ͎×ٚ[LHH   ˆÌÎNÚ[XYÙLK˜›    ˆÌÎN¨(  ˆÌ ͎×ٚ[LˆH  ˆÌÎNÚ[XYÙL‹˜›   ˆÌÎN¨(ÝZÙHHš[HY™ÙH]Ú]H^KY¨[ˆ^H^˜XÝš[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.

#88 goldenix

goldenix

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 738 posts

Posted 12 December 2007 - 11:28 PM

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.

#89 star2

star2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 461 posts

Posted 13 January 2008 - 05:39 PM

this is creativity,
well waiting for Button and other GuiCtrls support
thanks I really needed this solution

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

.............................................................................AUTOIT

#90 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,767 posts

Posted 13 January 2008 - 07:45 PM

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.

#91 star2

star2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 461 posts

Posted 13 January 2008 - 08:07 PM

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

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

.............................................................................AUTOIT

#92 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,767 posts

Posted 13 January 2008 - 08:18 PM

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, 13 January 2008 - 08:19 PM.


#93 Zephir

Zephir

    Prodigy

  • Active Members
  • PipPipPip
  • 184 posts

Posted 13 January 2008 - 08:33 PM

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

#94 grham

grham

    Wayfarer

  • Active Members
  • Pip
  • 70 posts

Posted 14 January 2008 - 11:55 AM

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, 14 January 2008 - 11:58 AM.


#95 taz742

taz742

    Seeker

  • Active Members
  • 46 posts

Posted 14 January 2008 - 04:03 PM

Exellent work !!!

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

:D :P ;)

Edited by taz742, 14 January 2008 - 04:48 PM.

Posted Image

#96 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,767 posts

Posted 14 January 2008 - 04:48 PM

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, 14 January 2008 - 04:50 PM.


#97 this-is-me

this-is-me

    Pursuer of obscure functionality

  • Active Members
  • PipPipPipPipPipPip
  • 2,466 posts

Posted 15 January 2008 - 05:05 PM

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?

#98 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,767 posts

Posted 15 January 2008 - 11:47 PM

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, 15 January 2008 - 11:54 PM.


#99 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,767 posts

Posted 23 February 2008 - 11:07 PM

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.

#100 HyperVista

HyperVista

    Seeker

  • Active Members
  • 14 posts

Posted 24 February 2008 - 05:49 AM

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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users