how do you recompile the autohotkey kernel to include gdi.ahk aurtomaticaly?
and how do you make it include gdi.ahk every time you compile a new .ahk script intto an exe? should i make a .bat file to replace the Ahk2Exe.exe file? with the line Ahk2Exe.exe/incluse gdi.ahk %%1 ? then use link to compile that into a new Ahk2Exe.exe. i don't even think i have link.. it was on dos2 dirty dos

it's gdi32.dll
buts since it's loaded, it is implyed
but this is the real shocker...
btw, if you can help me make include gdi.ahk work. please convert this to it. i can't even make gdi.ahk do anything but error on every command,
but the only way i can make it work so far is usung gdi32.dll in a dllcall command like this( remember calldll("gdi32.dll\movetoex",UInt,hdc,Uint,y,Uint,x) )

#SingleInstance, Force
#NoEnv
SetBatchLines, -1
; Uncomment if Gdip.ahk is not in your standard library
#Include, Gdip.ahk
Start gdi+
If !pToken := Gdip_Startup()
{
MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
ExitApp
}
OnExit, Exit
; Set the width and height we want as our drawing area, to draw everything in. This will be the dimensions of our bitmap
Width := 5100, Height := 6600
; Create a gdi bitmap with width and height of what we are going to draw into it. This is the entire drawing area for everything
hbm := CreateDIBSection(Width, Height)
; Get a device context compatible with the screen
bhdc := CreateCompatibleDC()
; Select the bitmap into the device context
obm := SelectObject(bhdc, hbm)
; Get a pointer to the graphics of the bitmap, for use with drawing functions
G := Gdip_GraphicsFromHDC(bhdc)
; Set the smoothing mode to antialias = 4 to make shapes appear smother (only used for vector drawing and filling)
Gdip_SetSmoothingMode(G, 4)
; Create a fully opaque red pen (ARGB = Transparency, red, green, blue) of width 3 (the thickness the pen will draw at) to draw a circle
pPen := Gdip_CreatePen(0xffff0000, 3)
; Draw an ellipse into the graphics of the bitmap (this being only the outline of the shape) using the pen created
; This pen has a width of 3, and is drawing from coordinates (100,50) an ellipse of 200x300
Gdip_DrawEllipse(G, pPen, 50, 50, 5000, 6500)
; Delete the pen as it is no longer needed and wastes memory
Gdip_DeletePen(pPen)
; Create a slightly transparent (66) blue pen (ARGB = Transparency, red, green, blue) to draw a rectangle
; This pen is wider than the last one, with a thickness of 10
pPen := Gdip_CreatePen(0x660000ff, 10)
; Draw a rectangle onto the graphics of the bitmap using the pen just created
; Draws the rectangle from coordinates (250,80) a rectangle of 300x200 and outline width of 10 (specified when creating the pen)
Gdip_DrawRectangle(G, pPen, 50, 50, 5000, 6500)
; Delete the brush as it is no longer needed and wastes memory
Gdip_DeletePen(pPen)
StringToPrint := "Defenestration can be hazardous"
Document_Name :="print test"
DllCall("LoadLibrary","str","comdlg32.dll")
;PRINTDIALOG_STRUCT
VarSetCapacity(PRINTDIALOG_STRUCT,66,0), NumPut(66,PRINTDIALOG_STRUCT)
; PD_RETURNDEFAULT: Return hDevMode and hDevNames for default printer,
; instead of displaying the dialog.
; PD_RETURNDC: Return a printer device context.
NumPut((PD_RETURNDC:=0x100),PRINTDIALOG_STRUCT,20) ; (PD_RETURNDC:=0x100)|(PD_RETURNDEFAULT:=0x400)
if !DllCall("comdlg32\PrintDlgA","uint",&PRINTDIALOG_STRUCT)
return
; Free unneeded (for now) structures created by PrintDlg().
if (hDevMode := NumGet(PRINTDIALOG_STRUCT,8))
DllCall("GlobalFree","uint",hDevMode)
if (hDevNames := NumGet(PRINTDIALOG_STRUCT,12))
DllCall("GlobalFree","uint",hDevNames)
; Get the newly created printer device context.
if (hDC := NumGet(PRINTDIALOG_STRUCT,16))
{
VarSetCapacity(DOCUMENTINFO_STRUCT,20,0), NumPut(20,DOCUMENTINFO_STRUCT), NumPut(&Document_Name,DOCUMENTINFO_STRUCT,4)
if DllCall("StartDoc","uint",hDC,"uint",&DOCUMENTINFO_STRUCT,"int") > 0
{
if DllCall("StartPage","uint",hDC,"int") > 0
{
DllCall("TextOut","uint",bhDC,"int",xPos,"int",yPos ,"str",StringToPrint,"int",StrLen(StringToPrint))
BitBlt(hDC, 0, 0, width, height, bhDC, 0, 0)
DllCall("EndPage","uint",hDC,"int")
}
DllCall("EndDoc","uint",hDC)
}
DllCall("DeleteDC","uint",hDC)
}
; Select the object back into the hdc
SelectObject(hdc, obm)
; Now the bitmap may be deleted
DeleteObject(hbm)
; Also the device context related to the bitmap may be deleted
DeleteDC(hdc)
; The graphics may now be deleted
Gdip_DeleteGraphics(G)
Return
Exit:
; gdi+ may now be shutdown on exiting the program
Gdip_Shutdown(pToken)
ExitApp
Return

Well if you have the correct gdip.ahk and still get the message then it is one of the following:

A) you are running this on an old system ( prior to Win XP )
B) you are running this on Linux with WINE
C) you have the wrong gdip.ahk for your AHK installation ( the original version only supported 32 bit AHK see https://www.dropbox.com/s/0e9gdfetbfa8v0o/Gdip_All.ahk )
D) something is seriously wrong with your PC