View Full Version : Problems with clicking
Zeaox
07-30-2012, 01:34 PM
I am not trying to make a script for rs but the game i am trying to make a script for freezes when you click off of that window. I already have the script set up to the best of my nub abilities and it works find except that the screen dosnt unfreeze when i run the script. when i click on the screen to go back to it simba still shows the script as running but it dosnt do any clicking/moving mouse/etc.
Did u target the window by dragging the green crosshair (at the top of simba beside the run button) to the window?
Zeaox
07-30-2012, 01:37 PM
yup
Footy
07-30-2012, 01:37 PM
I'm confused... What game is this, can you show us the script? Why do you want it to "freeze"?
Zeaox
07-30-2012, 01:38 PM
Shaiya,do i just copy/paste script in here,and i want to unfreeze not freeze
Footy
07-30-2012, 01:40 PM
Use activateclient; right after setupSRL to activate your game window, and hopefully unfreeze it. Let me know how it goes.
Zeaox
07-30-2012, 01:42 PM
program EcFarm;
var
Loads: Integer;
begin
repeat
repeat
MoveMouse (640, 527);
ClickMouse (640, 527, 1);
Wait(4000);
Loads:= Loads+1;
until(Loads >= 150);
MoveMouse (780, 227);
ClickMouse (780, 227, 1);
Wait(1500);
MoveMouse (783, 307)
ClickMouse (783, 307, 1);
Wait(1850);
MoveMouse (780, 389)
ClickMouse (780, 389, 1);
Wait(1495);
until(false);
end.
new to the whole simba thing...whats setupSRL?
Footy
07-30-2012, 01:48 PM
Nvm, you aren't using SRL functions. But it at the beginning of your main loop, at it should make the screen you dragged your crosshairs to come to the front.
Zeaox
07-30-2012, 01:50 PM
ok i got it to where it will activate the client but it will still only click that spot when simba is the active window
Footy
07-30-2012, 01:52 PM
When you chose your co-ords, did you drag your crosshairs to the game before you chose your coords? That could affect it.
Zeaox
07-30-2012, 01:53 PM
i selected the client then hovered my mouse over where i want it to click then copied the coords
Footy
07-30-2012, 01:56 PM
Did you use the color picker tool in simba? Try dragging the crosshairs, picking a co-ordinate where your script should be clicking, and compare it with what's in your script.
Zeaox
07-30-2012, 01:56 PM
k ill try it in a minute im trying to use hotkeys instead of clicks real quick
Footy
07-30-2012, 01:58 PM
Alright, let me know how it goes.
Give that a whirl..
program EcFarm;
var
Loads: Integer;
begin
ActivateClient;
repeat
repeat
MoveMouse(640, 527);
ClickMouse(640, 527, 1);
Wait(4000);
Loads := Loads + 1;
until (Loads >= 150);
MoveMouse(780, 227);
ClickMouse(780, 227, 1);
Wait(1500);
MoveMouse(783, 307) ClickMouse(783, 307, 1);
Wait(1850);
MoveMouse(780, 389) ClickMouse(780, 389, 1);
Wait(1495);
until (false);
end.
Zeaox
07-30-2012, 02:03 PM
your code did the same thing it just gets to the point where it activates the window then simba stops doing the other actions and is there a certain way to do keys? because PressKey(<letter>) wasnt working for me
your code did the same thing it just gets to the point where it activates the window then simba stops doing the other actions and is there a certain way to do keys? because PressKey(<letter>) wasnt working for me
What parameter are u keying in for Presskey? You need to do VK_F1 (srl constant) for example if you want to press F1. You can take a look at http://docs.villavu.com/simba/scriptref/mouseandkeyboard.html for keyboard functions.
Zeaox
07-30-2012, 02:15 PM
i was trying to use R for the letter i got the number for it off the list on that link but it types 4 instead of R
Zeaox
07-30-2012, 02:24 PM
is there something with simba that it wont work when its not the active window?
Simba should work fine when the client is activated, and the VK code for R is 82 so PressKey(82) will work. Trial and error lead me to that number, tested it and it worked.
Zeaox
07-30-2012, 02:32 PM
yeah still dosnt work unless simba is the active window must be some problem with the interaction between the two
What game is it you are trying to play, and how do you mean it doesn't work? The mouse isn't moving or?
I added a couple of other little bits and pieces to it with comments to show you what it's doing and why I put it there. Tested it out and it moved the mouse around and clicked on random stuff (on my notepad, given I don't know what game it's for I used a full-screen notepad as the client).
program EcFarm;
var
Loads: Integer;
begin
ActivateClient; // Makes defined client active window
repeat
Loads := 0; // It will keep increasing loads but never reset it without this
repeat
Status('Loads: ' + IntToStr(Loads)); // Writes what loads equals in the status bar
MoveMouse(640, 527);
ClickMouse(640, 527, 1);
Wait(4000);
Inc(Loads); // Same as Loads := Loads + 1; but neater
until (Loads >= 150);
MoveMouse(780, 227);
ClickMouse(780, 227, 1);
Wait(1500);
MoveMouse(783, 307);
ClickMouse(783, 307, 1);
Wait(1850);
MoveMouse(780, 389);
ClickMouse(780, 389, 1);
Wait(1495);
until (false);
end.
Zeaox
07-30-2012, 02:44 PM
a game called shaiya im trying to make a simple auto kill and when i say it dosnt work if i activate the client then simba stops clicking or doing any other actions it still says the script is running and if i click back to simba it will type/click where and when i want it to but then the game freezes up because it isnt the active window
You're using the crosshair to define your game as the client before running it?
Zeaox
07-30-2012, 03:36 PM
yeah
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.