View Full Version : My First Script has an Error
Erik teh Viking
09-29-2006, 12:16 AM
procedure LaunchFirefox;
begin
if function(FindColor(var x,y: Integer; 120564, 0,0, 1023,0, 0,767, 1023,767: Integer): Boolean;)=true then
movemouse(x,y,true)
clickmouse(x,y Left:bootlean)true
clickmouse(x,y Left:bootlean)true
end.
then it says in the error box
Line 3: [Error] (3:4): Syntax error in script
Just to get the feel of SCAR I'm making a script that will launch firefox
the blah
09-29-2006, 12:22 AM
procedure LaunchFirefox;
begin
if function(FindColor(var x,y: Integer; 120564, 0,0, 1023,0, 0,767, 1023,767: Integer): Boolean;)=true then
movemouse(x,y,true)
clickmouse(x,y Left:bootlean)true
clickmouse(x,y Left:bootlean)true
end.
then it says in the error box
Line 3: [Error] (3:4): Syntax error in script
Just to get the feel of SCAR I'm making a script that will launch firefox
Dude in the documention it describes how the function is made...so u dont need function or var or : integer or :boolean or watever
Erik teh Viking
09-29-2006, 12:33 AM
like that then
procedure LaunchFirefox;
begin
FindColor(x,y; 120564, 0,0, 1023,0, 0,767, 1023,767)=true then
movemouse(x,y,true)
clickmouse(x,y)true
clickmouse(x,y)true
end.
Ruroken
09-29-2006, 01:20 AM
yeah like that. Wanna get really complex use DTMS or bitmaps......:D
bobert5696
09-29-2006, 01:41 AM
ruroken, what are you talking about??? no, its like this:
procedure LaunchFirefox;
begin
if(FindColor(x,y; 120564, 0,0, 1023,0, 0,767, 1023,767)) then
movemouse(x,y,true)
clickmouse(x,y)
clickmouse(x,y);
end.
that should work, and if not, then this:
procedure LaunchFirefox;
begin
if(FindColor(x,y; 120564, 0,0, 1023,0, 0,767, 1023,767)) then
begin
movemouse(x,y,true)
clickmouse(x,y)
clickmouse(x,y);
end
end.
or, if you want to get really technical:
procedure LaunchFirefox;
const FFcolor=120564;
begin
if(FindColor(x,y; FFcolor, 0,0, 1023,0, 0,767, 1023,767)) then
begin
movemouse(x,y,true)
clickmouse(x,y)
clickmouse(x,y);
end;
end.
or you could use bitmaps/dtms like ruroken said, however, when you start making RS scripts, dont use clickmouse and movemouse, use
mouse for movement & clicking, and mmouse for just moving, before starting runescape scripts, make sure to dl SRL, and read the manual with it for all the 1337 procedures with it
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.