Jump to content

Recommended Posts

Posted

i need to know wut i did rong im just getting into autoit and have done good sofar i got a tut from a website and well i get an error when i try to run it....

1) 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~~~")

2)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~~~")

ive tried those two the site is http://albert.teleinc.com/lesson3.html theres six lessons on that site as far as i know...

anyways if you could help it would be really appricated!

Posted

You are mixing single and double quotes badly:

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~~~")

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

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")

;important this idle must be here otherwise your script will close when you hit ok
idle()
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

Looks more like a bot than a tutorial to me.

anyways, try running that. Should not get an error.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...