I want to make a bot for some purpose and it will rely on pixel scanning for some purposes, and some will be hard coded.
I wonder why doesnt this script start notepad at all?
HotkeySet("{HOME}","_end")
HotkeySet("{END}","_kill_notepad)
HotKeySet(";","save_lshoot")
HotKeySet("'","save_move")
HotKeySet("","save_rshoot")
Func save_lshoot()
$pos = MouseGetPos()
$res = 'Send("{SHIFTDOWN}")'
$res += 'MouseClick(""LEFT"", " &$pos[0]&", "&$pos[1]&", "&$speed&")"
$res += 'Send("{SHIFTUP}")'
send_to_notepad($res)
EndFunc
Func save_rshoot()
$pos = MouseGetPos()
$res = 'MouseClick("RIGHT", '&$pos[0]&", "&$pos[1]&", "&$speed&")"
send_to_notepad($res)
EndFunc
Func save_move()
$pos = MouseGetPos()
$res = 'MouseClick("LEFT", '&$pos[0]&", "&$pos[1]&", "&$speed&")"
send_to_notepad($res)
EndFunc
Func send_to_notepad($arg)
WinActivate("Untitled - Notepad")
sleep(50)
send($arg)
sleep(50)
WinActivate("Diablo III")
sleep(50)
EndFunc
Func Pixel_color()
$pos = MouseGetPos()
$var = PixelGetColor($pos[0], $pos[1])
send_to_notepad(";save this color for future reference and implementation "&$var)
EndFunc
Func _kill_notepad()
send_to_notepad("Wend")
WinClose("Untitled - Notepad")
EndFunc
Func _end()
Exit 0
EndFunc
Run("notepad.exe")
$startup = '_
Func lshoot($arg1, $arg2)_
Send("{SHIFTDOWN}")_
MouseClick("LEFT",$arg1, $arg2, $speed)_
Send("{SHIFTUP}")_
Sleep($left)_
EndFunc_
Func rshoot($arg1, $arg2)_
MouseClick("RIGHT",$arg1, $arg2, $speed)_
Sleep($right)_
EndFunc_
Func move($arg1, $arg2)_
MouseClick("LEFT",$arg1, $arg2, $speed)_
Sleep($move)_
EndFunc_
Func broll($arg1, $arg2)_
MouseMove($arg1, $arg2, $speed)_
send("2")_
EndFunc_
Func ferret()_
send("1")_
sleep(100)_
EndFunc'
send_to_notepad($startup)
sleep(500)
;WinMinimizeAll()
WinActivate("Diablo III")
$res = 'WinActivate("Diablo III")'
$res += "While 1"
$res += "Sleep(220)"
$res += "move(278, 476)"
$res += "Sleep(2500) ;starting the game"
$res += 'send("1") ;summon the ferret'
send_to_notepad($res)
While 1
Wend
Anyway if someone can tell me how to save output to notepad or directly to some file?