Code:
; Title: autoer
; Author: orange gold
; Description: Performs different selling / buying methods
MsgBox(0, "auto messanger", "f1 = yell selling" & @CRLF & "f2 = yell buying" & @CRLF & "f3 = chat 2: selling" & @CRLF & "f4 = chat 2: buying" & @CRLF & "f5 = normal selling" & @CRLF & "f6 = normal buying " & @CRLF & "~~~f7 = exit~~~ ")
HotKeySet("{F1}", "ysell")
HotKeySet("{F2}", "ybuy")
HotKeySet("{F3}", "tsell")
HotKeySet("{F4}", "tbuy")
HotKeySet("{F5}", "sell")
HotKeySet("{F6}", "buy")
HotKeySet("{PAUSE}", "unbind")
HotKeySet("{F7}", "exity")
Func ysell() ; yell sell
HotKeySet("{F1}")
Send("{enter}")
Send("/y selling")
HotKeySet("{F1}", "ysell")
idle()
EndFunc
func ybuy() ; yell buy
HotKeySet("{F2}")
Send("{enter}")
Send("/y buying")
HotKeySet("{F2}", "ybuy")
idle()
EndFunc
func tsell() ; chat 2 sell
HotKeySet("{F3}")
Send("{enter}")
Send("/2 selling")
HotKeySet("{F3}", "tsell")
idle()
EndFunc
func tbuy() ; chat 2 buy
HotKeySet("{F4}")
Send("{enter}")
Send("/2 buying")
HotKeySet("{F4}", "tbuy")
idle()
EndFunc
func sell() ; talk sell
HotKeySet("{F5}")
Send("{enter}")
Send("selling")
HotKeySet("{F5}", "sell")
idle()
EndFunc
func buy() ; talk buy
HotKeySet("{F6}")
Send("{enter}")
Send("buying")
HotKeySet("{F6}", "buy")
idle()
EndFunc
Func idle() ; idle, do nothing
while 1
Sleep(1000)
WEnd
EndFunc
Func unbind() ; unbind keys
HotKeySet("{F1}")
HotKeySet("{F2}")
HotKeySet("{F4}")
HotKeySet("{F3}")
HotKeySet("{F5}")
HotKeySet("{F6}")
HotKeySet("{PAUSE}", "rebind")
idle()
EndFunc
Func rebind() ; rebind the keys
HotKeySet("{F1}", "ysell")
HotKeySet("{F2}", "ybuy")
HotKeySet("{F3}", "tsell")
HotKeySet("{F4}", "tbuy")
HotKeySet("{F5}", "sell")
HotKeySet("{F6}", "buy")
HotKeySet("{PAUSE}", "unbind")
idle()
EndFunc
Func exity() ; exit
Exit
EndFunc
;important this idle must be at the end otherwise your script will close when you hit ok
idle()