alcatel Posted February 13, 2009 Posted February 13, 2009 i have writen one script, but i keep having this error " Line -1: Error: Unknown function name ". can anyone tell me, why this happens?
Manjish Posted February 13, 2009 Posted February 13, 2009 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
alcatel Posted February 13, 2009 Author Posted February 13, 2009 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
Authenticity Posted February 13, 2009 Posted February 13, 2009 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.
Manjish Posted February 13, 2009 Posted February 13, 2009 define the start() function.. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now