if the pic doesnt work, its probably cause its to big, it has to be 50x50
sprinkles, i have actually updated it a little, so it draws a line behind it when it moves and has a new functions.. exit!, pen up and pen down..
i do also assume u have the autoit interpreter/compiler/autoit installed anyway
after the includes, add the line
then after that
code
func pen()
if $console = false Then
if $pen = false Then
ToolTip("Pen down!")
sleep(500)
tooltip("")
$pen = true
Else
tooltip("Pen up!")
sleep(500)
ToolTip("")
$pen = False
EndIf
EndIf
EndFunc
HotKeySet("+!d","pen")
Func drawpix($dc,$x,$y,$color)
DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
EndFunc
Func pict($x,$y)
$dc= DllCall ("user32.dll", "int", "GetDC", "hwnd", "")
drawpix($dc,$x+25,$y+25,0x000000FF)
DllCall ("user32.dll", "int", "ReleaseDC", "hwnd", 0, "int", $dc[0])
EndFunc
Note that pressing alt+shift+d will toggle the pen thing
then look for
add in it
code
if $func = "pen down" Then
$pen = True
_GUICtrlEdit_InsertText($conout,@crlf & "Pen down!")
EndIf
if $func = "pen up" Then
$pen = false
_GUICtrlEdit_InsertText($conout,@crlf & "Pen up!")
EndIf
if $func = "exit" Then
Exit
EndIf
then move all the way down to the while 1 loop
add at the start
code
if $pen = true Then
pict($picpos[0],$picpos[1])
EndIf
that is all to have a turtle graphics clone