Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
Advanced question regarding mouse cursor detection
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-17-2009, 10:26 PM
Newcomer
 
Join Date: Sep 2009
Posts: 1
Default Advanced question regarding mouse cursor detection

Hello scar scripters,

I'm looking for a way to detect if the current mouse position is on a link by looking at the mouse cursor's image itself. I'm afraid this is the only way i can do it.

I've already tried to take a screenshot of mouse cursor that displays when
it's on a link however screenshots don't include cursor images. Nor does scar
count the cursor's bitmap or colors when looking for pixels/bitmaps on the screen.

I'll give you a not working sample of the outcome i'm looking for:

Code:
Program new;
var
x,y,cursorimage:integer;
begin
cursorimage := loadbitmap('C:\junkfolder\cursor.bmp');
repeat
movemousesmooth(500+random(100),200+random(100));
wait(200);
until(findbitmapin(cursorimage,x,y,500,200,600,300));
getmousepos(x,y);
wait(200)
movemousesmooth(x,y);
wait(200)
clickmouse(x,y,true);
end.
Thats it, help is appreciated.


EDIT:

I'm thinking that there can be an alternative after all.

Could something like this work?

Code:
if(not(findcolor(x,y,16777215,100,500,200,600)))then
movemousesmooth(x,y)
This doesn't work but i would like the program to store coordinates where the color WASN'T 16777215.

The moving object i'm trying to click has too many color variations to effectively detect it's location by color. But the background of the object is moving on is always white(16777215).

This shouldn't be too hard so there actually must be a way to solve this.

Last edited by Janektamm2 : 09-18-2009 at 05:36 PM. Reason: adding new info
Reply With Quote
  #2  
Old 01-17-2010, 05:17 AM
Newcomer
 
Join Date: May 2009
Posts: 5
Default Re: Advanced question regarding mouse cursor detection

u need to put the bitmap into a string
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 11:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1