holomind wrote:
seems to be a problem related to windows 7, as it works on windows xp.
in general in vista and i think also in windows 7 the rendering is not directly on the screen anymore but handled as buffers and then the 3d-engine in your graphics card renders all at once. so "windows" are similar to textures in opengl. so if you use gdip they will be translated into this buffers etc. and something seems not to work here maybe. tldr; gdip works differently on xp and windows 7.
there is also discussion here about a similar problem with gdip.
http://www.autohotkey.com/forum/topic32238-495.htmlif ahk is complied into exe then maybe the linking to the dll is different ?
i think its not related to windows7 at all. the "wonder" thing that the exe works and the ahk not, is cause by changes in the gdip.ahk include file provided by TIC. i used an older version to compile the ahk into an exe.
if you use the gdip library which is provided in the first post of this thread then it should work.
the problem is here: these definitions are missing in TICs "new" version of the gdip-helper.ahk.
the errormessage is that this variable is not defined, and then the program is stopped.
you could also just use
image/png
instead of #GDIplus_mimeType_PNG
but there are more of this #.. constants for naming.
then it maybe would also work with tics version of the gdip-helper library.
even putting this at the beginning of your .ahk file should be a quickfix.
main problem is if you use Gdip.ahk from TIC then you are missing all the constants: which are defined in GDIPlusHelper.ahk
look at the section:
;#Include DllCallStruct.ahk
Code:
#GDIplus_mimeType_BMP = image/bmp
#GDIplus_mimeType_JPG = image/jpeg
#GDIplus_mimeType_GIF = image/gif
#GDIplus_mimeType_PNG = image/png
#GDIplus_mimeType_TIF = image/tiff
Hope this gets you running on "windows 7" or better said in 2012, using a script from Thu Aug 24, 2006 (when the first post was created), amazing this still runs in windows 7. (using the correct includes, or using the exe).