SeaHorseShooter
2014-06-20 19:32:22
Hello all! I'm coding a simple script to take the grapes from the cooking guild, and then later I will be learning on how to take the grapes and store them in the bank etc but my code does not seem to be working. It finds the grape just fine, but it does not right click like it is supposed to. Here is my code
Any help on why it is not right clicking the grape and then picking it up? All help appreciated! :D
program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
procedure clickGrape();
var
x, y: integer; //we need to declare these variables since findObject outputs these
begin
if mainscreen.findObject(x, y, 6822793, 54, ['grape'], MOUSE_RIGHT) then
begin
writeLn('We right clicked a grape'); //if findObject results true, this will print
chooseOption.select(['Take Grapes']); // this will choose ‘Take Grapes’ option in chooseOptions menu
end;
end;
begin
clearDebug();
setupSRL();
clickGrape();
end. Any help on why it is not right clicking the grape and then picking it up? All help appreciated! :D