Zedna Posted March 30, 2012 Author Share Posted March 30, 2012 (edited) Heh, that's awesome I had no idea you could load an animated cursor from a resource. All the research I did last night made it seem like you had to save it out to a file first. I'm curious if you found somewhere that was documented, or if you just tried it out.I just tried what I had in my first test script from yesterday and it worked perfectly despite what you said/expected :-)Great.Later I will add this example for cursors from resources also to my first post in this topic and to next version of my Resources UDF (despite it don't need my Resources UDF)EDIT: I hope I will release new version soon ... Edited March 30, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Morgyone Posted March 30, 2012 Share Posted March 30, 2012 (edited) Thanks a lot guys, you're really awesome you saved me from using SaveToFile - not that it would be all that bad, but this is better for me =) Edited March 30, 2012 by Morgyone Link to comment Share on other sites More sharing options...
Zedna Posted April 2, 2012 Author Share Posted April 2, 2012 (edited) Now I tested this new AutoIt3Wrapper and it works fine with standard cursors (.cur) and also with animated cursors (.ani) It works fine also with cursors (also animated) from my Windows7. Here is testing script: ... ; cursors from Win XP #AutoIt3Wrapper_Res_File_Add=3dsmove.cur, 1, CUR_2 #AutoIt3Wrapper_Res_File_Add=banana.ani, rt_anicursor, ANI_CUR_2 #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_UseX64=n ... Just one note: Cursors are loaded/showed correctly also when UPX is used (now sucessfully tested). So you can comment/remove this line: #AutoIt3Wrapper_UseUpx=n to get smaller compiled EXE without any loss of functionality :-) Edited April 2, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted April 4, 2012 Share Posted April 4, 2012 Why not use the Keep Resource option of UPX ? #AutoIt3Wrapper_Run_After=upx.exe --brute --force --compress-icons=0 --keep-resource=ANI "%out%" Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Zedna Posted April 4, 2012 Author Share Posted April 4, 2012 (edited) Why not use the Keep Resource option of UPX ?#AutoIt3Wrapper_Run_After=upx.exe --brute --force --compress-icons=0 --keep-resource=ANI "%out%"Because it's not needed. CUR and ANI resources work fine even when they are compressed by UPX.In that case you can't see them directly by reshacker.exe but at runtime it works fine. Edited April 4, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
WhiteStar Posted April 9, 2012 Share Posted April 9, 2012 Zedna, Will this be incorporated into the next release of AutoIT ? The current Beta is moving right along and seems fairly close to becoming a release and I was just wondering. Thanks WhiteStar ~ WhiteStar Magic Always tuned to http://www.superbluesradio.com/ Tune in at http://87.117.217.41:8036/ Link to comment Share on other sites More sharing options...
Zedna Posted April 10, 2012 Author Share Posted April 10, 2012 Zedna,Will this be incorporated into the next release of AutoIT ? The current Beta is moving right along and seems fairly close to becoming a release and I was just wondering.ThanksWhiteStarNo. I have no current plans about adding it into standard includesbecause I'm not satisfied with it (there are some ineficiencies/hacks) and there are many things where I'm not sure about solving problems etc. and I haven't got so many time/will to finish all to the best state.At current state this UDF is usable (at least for me) with some limitations and I want to release new version with some proposed fixes/changes posted here in this topic - hopefully soon but no ETA. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
robinsiebler Posted June 14, 2012 Share Posted June 14, 2012 (edited) What am I doing wrong? The pictures do not show up #AutoIt3Wrapper_Res_File_Add=C:\scripts\AutoIt\Build_Auto_Installer\Docs\Avistar Logo.jpg, rt_rcdata, logo #AutoIt3Wrapper_Res_File_Add=C:\scripts\AutoIt\Build_Auto_Installer\Docs\avatar.jpg, rt_rcdata, avatar #include "resources.au3" $Image1 = GUICtrlCreatePic("", 115, 145, 179, 41) _ResourceSetImageToCtrl($Image1, "logo") $Pic1 = GUICtrlCreatePic("", 27, 35, 90, 60) _ResourceSetImageToCtrl($Pic1, "avatar") Edited June 14, 2012 by robinsiebler Link to comment Share on other sites More sharing options...
Zedna Posted June 14, 2012 Author Share Posted June 14, 2012 What am I doing wrong? The pictures do not show upTry this:- use image file names without space (with underscore)- copy images to script directory and in ResFileAdd use just filename without path- copy resources.au3 into script directory (to exclude problems with bad user defined path)- do you compile your script with FULL Scite4AutoIt3?- check by reshacker if images are in compiled output EXE- your AU3 scipt looks OK Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
robinsiebler Posted June 14, 2012 Share Posted June 14, 2012 (edited) Ok, II figured out the problem: I have a 2nd form and I placed the #AutoIt3Wrapper_Res_File_Add statement there, but they had to go into the 1st form. Now for the 2nd problem. The images are showing up but they are way larger than the sizes I specified for the controls.I manually resized the images, but I would like to know if there is an alternate solution. Edited June 14, 2012 by robinsiebler Link to comment Share on other sites More sharing options...
Zedna Posted June 14, 2012 Author Share Posted June 14, 2012 The images are showing up but they are way larger than the sizes I specified for the controls.I manually resized the images, but I would like to know if there is an alternate solution.Search this forum and also this topic. This was asked/answered many times.As far as I can remember the simple solution should be to use static control's style SS_REALSIZECONTROL (for your picture control) - but I'm not sure because I haven't needed/used this yet.http://msdn.microsoft.com/en-us/library/windows/desktop/bb760773%28v=vs.85%29.aspx Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
robinsiebler Posted June 14, 2012 Share Posted June 14, 2012 (edited) I did a search, but didn't really get any hits. I'm not exactly sure what to search for. Edited June 14, 2012 by robinsiebler Link to comment Share on other sites More sharing options...
JBond Posted June 22, 2012 Share Posted June 22, 2012 Hey Zedna! Resources UDF is awesome. Thank you very much for that I've a problem including a .jpg to my script for a GUI. I want to add the file from an SMB-Share like this: #AutoIt3Wrapper_Res_File_Add=\\content\shareIT$\GUI\Installlogo.jpg, rt_rcdata, installlogo_1 but it's not working? Adding the same file by #AutoIt3Wrapper_Res_File_Add=D:\Installlogo.jpg, rt_rcdata, installlogo_1 works fine. Comparing the size of the compiled .exe - it's definitively not included in the exe. Link to comment Share on other sites More sharing options...
Zedna Posted June 22, 2012 Author Share Posted June 22, 2012 (edited) I want to add the file from an SMB-Share like this: #AutoIt3Wrapper_Res_File_Add=contentshareIT$GUIInstalllogo.jpg, rt_rcdata, installlogo_1 but it's not working? This has nothing to do with my Resources UDF. Just add resources normal way from local directory and don't do such unusefull complications. I can't imagine why you need such nonstandard functionality. You may look at sources of AutoIt3Wrapper and look how it's implemented #AutoIt3Wrapper_Res_File_Add there and of course you may make any modifications for your special needs. AutoIt3Wrapper is part of Scite4AutoIt3: http://www.autoitscript.com/site/autoit-script-editor/downloads/ EDIT: Maybe you can use #AutoIt3Wrapper_Run_Before= to copy your icons from net to local before compilation but I'm not sure if it would work Edited June 23, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Pino Posted June 27, 2012 Share Posted June 27, 2012 Hi to alland many thanks to Zedna for the UDF resources.... but I have trouble with your new UDF resources.Here my problem:------------------------------------------------------------------------32Bit program with the new version of UDF resources:If I use the new version of UDF resources andI compile a 32Bit program with the parameter#AutoIt3Wrapper_UseX64=Nonly some of the pictures are visiblewhen I start the program on a Windows 7 32Bit systemonly some of the pictures are visiblewhen I start the program on a Windows 7 64Bit systemThe problem with the invisible pictures is on all types of grafics.------------------------------------------------------------------------64Bit program with the new version of UDF resources:If I use the new version of UDF resources andI compile a 64Bit program with the parameter#AutoIt3Wrapper_UseX64=Yall pictures are visible, everthing is okwhen I start the program on a Windows 7 64Bit system#include-once #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <resources.au3> #region #AutoIt3Wrapper_UseX64=N ; the grafic is a 32x32 pixel BMP-File #AutoIt3Wrapper_Res_File_Add=rot.bmp, rt_bitmap, rot #endregion $Form1 = GUICreate("", 800, 600, 0, 0, BitOR($WS_POPUP, $WS_BORDER)) GUISetState(@SW_SHOW) $j = 1 For $j = 1 to 16 For $i = 1 to 22 GUICtrlCreatePic("", (32*$i)-32+($i*3), (32*$j)-32+($j*3), 32, 32) _ResourceSetImageToCtrl(-1, "rot", $RT_BITMAP) ; set BMP image to picture control from resource Next Next MsgBox(0,"","Wait for close")I'm using AutoIT version 3.3.0.0. I would be very glad if you could check my example.If you could find a solution for me I would be very grateful.Many thanksPino Link to comment Share on other sites More sharing options...
Zedna Posted June 27, 2012 Author Share Posted June 27, 2012 (edited) I tested your example with my bitmap and I could see similar behaviour on my Win7 64bit OS only with old AutoIt 3.2.12.1 (the same for#AutoIt3Wrapper_UseX64=Y/N). With AutoIt beta 3.3.7.23 which I use as "latest" there is no problem no matter of #AutoIt3Wrapper_UseX64 directive. Try to use newer (latest) version of AutoIt and Scite4AutoIt3 (and AutoIt3Wrapper which is part of it). Edited June 27, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Pino Posted June 27, 2012 Share Posted June 27, 2012 Hi Zedna, thanks for help. It's running well with current version 3.3.8.1. Pino Link to comment Share on other sites More sharing options...
kor Posted July 16, 2012 Share Posted July 16, 2012 So am I doing something wrong? I downloaded resources, added the include to the right place and tried to run any of the examples and none of the pictures load in the gui's. I'm running Win 7 enterprise x32 with AutoitIt 3.3.8.1 Link to comment Share on other sites More sharing options...
Zedna Posted July 16, 2012 Author Share Posted July 16, 2012 (edited) I downloaded resources, added the include to the right place and tried to run any of the examples and none of the pictures load in the gui's.Check this:- is installed full Scite4AutoIt3- do you compile script (by F7) and run compiled EXE- are images in script directory (at compile time)- try to use #AutoIt3Wrapper_UseX64=n- test @error after _ResourceSetImageToCtrl()- check by ResHacker if output compiled EXE contains desired resources added by #AutoIt3Wrapper_Res_File_Add=...EDIT:You can copy content of bottom Output panel from Scite after compilation with detailed LOGso we can see what's going on at compile time Edited July 16, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
zpanderson Posted July 31, 2012 Share Posted July 31, 2012 (edited) Zedna, is there any way to write back to the added resources? EDIT: nvm... after doing more research I'm assuming it's not possible... Edited July 31, 2012 by zpanderson Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now