Sign in to follow this  
Followers 0
alcatel

Script error

6 posts in this topic

i have writen one script, but i keep having this error " Line -1: Error: Unknown function name ".

can anyone tell me, why this happens?

Share this post


Link to post
Share on other sites



probably because, u have certain function in the script, which u haven't defined..

Please post the code, if u want help identifying the exact problem..


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

sure, here it is:

Global $Paused

HotKeySet("{F8}", "Start")

HotKeySet("{Pause}", "_Pause")

HotKeySet("{Esc}", "_Exit")

Start()

Opt("SendKeyDownDelay", 1800)

Send("r")

Sleep(500)

Opt("SendkeyDownDelay", 1800)

Send("g")

$time = 2448

Opt("PixelCoordMode", 1)

Sleep(2000)

Opt("SendKeyDownDelay", 1300)

Send("{F2}")

Sleep(3000)

Opt("SendKeyDownDelay", 1300)

Send("{Space}")

While 1

$pix = PixelSearch( 500, 150, 501, 151, 0xFFFFFF , 30 ,2)

If Not @error Then

Sleep($time)

Opt("SendKeyDownDeley", 1300)

Send("{Space}")

Sleep(1500)

Opt("SendKeyDownDelay", 1300)

Send("{F2}")

Sleep(1500)

Opt("SendKeyDownDelay", 1300)

Send("{Space}")

ContinueLoop

EndIf

WEnd

Func _Pause()

$Paused = Not $Paused

While $Paused

ToolTip("Bot paused",130,20)

sleep(5000)

WEnd

ToolTip("")

EndFunc

Func _Exit()

Exit 0

EndFunc

Share this post


Link to post
Share on other sites

Start() is not defined...

Next time put it inside autoit tags and make sure to check things for syntax error in SciTE editor using Ctrl+F5, you'll get a clue.

Share this post


Link to post
Share on other sites

define the start() function..


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0