Working with Cursors

Legacy, Delphi and Other Languages Discuss, Working with Cursors at Programmers Lounge forum; ~Setting Cursor Position SetCursorPos(x,y); ~Getting Cursor Position var MyPoint: TPoint; // our point to be recieving the X and Y's ...


Go Back   Gamerz Needs - For All Your Gaming Needs! > Technology Zone > Programmers Lounge > Legacy, Delphi and Other Languages
Forgot Password? | Sign Up!
Register Invite Your FriendsBlogs Fun Stuff FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices

Advertisement
   

Reply
 
Bookmark this Thread Tools Display Modes
  #1  
Old 08-01-2008, 06:30 PM
kaswar's Avatar
All Hope is Gone!
 
Last Online: Today 06:53 PM
Join Date: Nov 2006
Location: Location:
Posts: 2,058
Thanks: 230
Thanked 221 Times in 145 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Downloads: 1
Uploads: 0
Latest Blog:
Rep Power: 11
kaswar will become famous soon enough
Points: 1,052.50
Bank: 112,046.35
Total Points: 113,098.85
Here ya go. Don't get drunk! O.O - joriannn Marked as kashin's property. (One of the four Mighty Titans led by sir SpaceCake) - kashin Merry christmas and seriously i couldnt find any other gift - ItsmYarD Merry Christmas N Happy New Years!!! - BiGbAnG to karwas. Bang - stormer320 
gotcha RPKMHFTAGUITALABPC - ROVE ure not drunk enough yet - swordmas754 
Gold - Wizxon Green - swordmas754 Green - swordmas754 
Send a message via MSN to kaswar
Working with Cursors

~Setting Cursor Position

Quote:
SetCursorPos(x,y);
~Getting Cursor Position

Quote:
var
MyPoint: TPoint; // our point to be recieving the X and Y's
X,Y: integer; //Convert so the code is less Messy
begin
GetCursorPos(MyPoint); //YUM!
X := MyPoint.X; //Coverting..
Y := MyPoint.Y; //Coverting..
Getting To Display your Cursor Position

(In a Timer)! MS: 50

Quote:
var
MyPoint: TPoint; // our point to be recieving the X and Y's
X,Y: integer; //Convert so the code is less Messy
begin
GetCursorPos(MyPoint); //YUM!
X := MyPoint.X; //Coverting..
Y := MyPoint.Y; //Coverting..
Edit1.Text := IntToStr(X);
Edit2.Text := IntToStr(Y);
~Cursor Clicks

PostMessage

Quote:
var
MyPoint: TPoint;
X,Y: integer;
begin
GetCursorPos(MyPoint); //YUM!
X := MyPoint.X; //Coverting..
Y := MyPoint.Y; //Coverting..
PostMessage(GetWindowDC(GetDesktopWindow),WM_LBUTT ONDBLCLK,MK_LBUTTON,MakeLong(X,Y));
sleep(100); //Like a Normal Mouse click
Mouse Event

Quote:
Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTDOWN, X, Y, 0, 0);
sleep(100);
Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTUP, X, Y, 0, 0);

Thats about all o.o
__________________


Quote:
Originally Posted by Nuclear Bomb, The Legend, xDiamond, GzNPrize, iPromise, Aduka
I mastered vb in 1 month
  #2  
Old 08-03-2008, 11:36 AM
Beast's Avatar
I love GzN!
 
Last Online: 09-09-2008 03:57 PM
Join Date: Jul 2007
Posts: 1,672
Blog Entries: 1
Thanks: 87
Thanked 119 Times in 84 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Downloads: 0
Uploads: 0
Latest Blog: Oh
Rep Power: 9
Beast is on a distinguished road
Points: 1,883.10
Bank: 135.15
Total Points: 2,018.25
Black - armoballer Dark Blue - hotboy 
Then you shouldn't be programming, and spamming in here. Also if you came here you would have noticed this is the DELPHI section.
__________________
I Love Gzn. www.iGzN.com
  #3  
Old 08-03-2008, 11:56 AM
marco1784's Avatar
Double Wood Axe
 
Last Online: 10-20-2008 08:13 AM
Join Date: Mar 2007
Posts: 27
Thanks: 7
Thanked 1 Time in 1 Post
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Downloads: 15
Uploads: 0
Latest Blog:
Rep Power: 0
marco1784 is on a distinguished road
Points: 3,669.90
Bank: 0.00
Total Points: 3,669.90
Quote:
Originally Posted by Beast View Post
Then you shouldn't be programming, and spamming in here. Also if you came here you would have noticed this is the DELPHI section.
i get a link from my orginel post to look here so i look and i ask if i dont ask i never know it its not spam its a question

Auto klikker

Last edited by marco1784; 08-03-2008 at 11:59 AM..
  #4  
Old 08-03-2008, 12:00 PM
wassssup34579's Avatar
blahh!
 
Last Online: 01-04-2009 10:38 PM
Join Date: Jan 2007
Location: California
Posts: 732
Blog Entries: 1
Thanks: 141
Thanked 95 Times in 50 Posts
Nominated 6 Times in 3 Posts
TOTW/F/M Award(s): 0
Downloads: 3
Uploads: 0
Latest Blog: blahh!!!
Rep Power: 6
wassssup34579 will become famous soon enough
Points: 833.70
Bank: 100,872.89
Total Points: 101,706.59
No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 
No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 
No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 
No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 
Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 
Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 
Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 
Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 
Send a message via AIM to wassssup34579 Send a message via MSN to wassssup34579
Quote:
Originally Posted by marco1784 View Post
i get a link from my orginel post to look here so i look and i ask if i dont ask i never know it its not spam its a question

Auto klikker
i gave you that link cause i thought you would be smart enough to convert it to C++ yourself.
__________________
Universal Adobe Keygen! works for Photoshop CS3!

- How to create .dll hacks! - GzN Notifier - API hooking - Hook Detector -
- Enhanced Pixel Scanning - Calculate lead-shots in FPS games! -



Even after GzN got hacked, i have even more bad news...
MY COMPUTER BROKE!!! i wont be able to go online regularly, and i cant update the Combat Arms multi-hack while im away. (i didnt have a backup on my flashdrive) it also had the program that i was gonna apply to GB UG with, so im really pissed off right now...
  #5  
Old 08-03-2008, 12:08 PM
marco1784's Avatar
Double Wood Axe
 
Last Online: 10-20-2008 08:13 AM
Join Date: Mar 2007
Posts: 27
Thanks: 7
Thanked 1 Time in 1 Post
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Downloads: 15
Uploads: 0
Latest Blog:
Rep Power: 0
marco1784 is on a distinguished road
Points: 3,669.90
Bank: 0.00
Total Points: 3,669.90
i dont have any idee what this all mean if some 1 explain to me simpel step by step maby i can make t i have never did a program befor im a noob whis code's :S
but im not lazy to let other people make it when i can learn it if some 1 explain it to me
i want only make my mouse klik on 3 space's every 2 min x908 y555
x435 y620 x502 y661 can u help me explain or make 1 for me both will help me greets from me
  #6  
Old 08-04-2008, 09:39 PM
Double Wood Axe
 
Last Online: Today 08:58 PM
Join Date: Aug 2008
Posts: 23
Thanks: 0
Thanked 1 Time in 1 Post
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Downloads: 0
Uploads: 0
Latest Blog:
Rep Power: 0
hah_rs is on a distinguished road
Points: 973.00
Bank: 0.00
Total Points: 973.00
You're assigning the same thing twice here:

Code:
var
MyPoint: TPoint; // our point to be recieving the X and Y's
X,Y: integer; //Convert so the code is less Messy
begin
GetCursorPos(MyPoint); //YUM!
X := MyPoint.X; //Coverting..
Y := MyPoint.Y; //Coverting..
Edit1.Text := IntToStr(X);
Edit2.Text := IntToStr(Y);
I know you said it was to keep the code less messy looking but reassigning like that is bad practice. I'm just pointing it out for somebody who might not know it.

Code:
var
  MyPoint: TPoint; // our point to be recieving the X and Y's
begin
  GetCursorPos(MyPoint); //YUM!
  Edit1.Text := IntToStr(MyPoint.X);
  Edit2.Text := IntToStr(MyPoint.Y);
  #7  
Old 08-22-2008, 01:18 PM
Immortal Beast
 
Last Online: 11-13-2008 04:06 PM
Join Date: Aug 2008
Location: Stalkers..
Posts: 349
Blog Entries: 1
Thanks: 125
Thanked 80 Times in 44 Posts
Nominated 1 Time in 1 Post
TOTW/F/M Award(s): 0
Downloads: 0
Uploads: 0
Latest Blog: Vacation to IRAQ, and Kuwait.
Rep Power: 0
The Legend is an unknown quantity at this point
Points: 1,352.60
Bank: 22,980.07
Total Points: 24,332.67
Lets Get Drunk!!! Wait Your Too Young - TheMangoKid So you don't starve - TheMangoKid 
Green - The Legend Lavender - The Legend Gold - The Legend Gold - The Legend Gold - The Legend 
Gold - The Legend Gold - The Legend Gold - The Legend Gold - The Legend Gold - The Legend 
Gold - The Legend Gold - The Legend Gold - The Legend Gold - The Legend Gold - The Legend 
Gold - The Legend 
Lol, nie thread... do ypou have a source?
  #8  
Old 08-22-2008, 01:19 PM
Double Wood Axe
 
Last Online: Today 08:58 PM
Join Date: Aug 2008
Posts: 23
Thanks: 0
Thanked 1 Time in 1 Post
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Downloads: 0
Uploads: 0
Latest Blog:
Rep Power: 0
hah_rs is on a distinguished road
Points: 973.00
Bank: 0.00
Total Points: 973.00
The source is in front of your face. Use it.
  #9  
Old 08-22-2008, 06:21 PM
kaswar's Avatar
All Hope is Gone!
 
Last Online: Today 06:53 PM
Join Date: Nov 2006
Location: Location:
Posts: 2,058
Thanks: 230
Thanked 221 Times in 145 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Downloads: 1
Uploads: 0
Latest Blog:
Rep Power: 11
kaswar will become famous soon enough
Points: 1,052.50
Bank: 112,046.35
Total Points: 113,098.85
Here ya go. Don't get drunk! O.O - joriannn Marked as kashin's property. (One of the four Mighty Titans led by sir SpaceCake) - kashin Merry christmas and seriously i couldnt find any other gift - ItsmYarD Merry Christmas N Happy New Years!!! - BiGbAnG to karwas. Bang - stormer320 
gotcha RPKMHFTAGUITALABPC - ROVE ure not drunk enough yet - swordmas754 
Gold - Wizxon Green - swordmas754 Green - swordmas754 
Send a message via MSN to kaswar
lol ok, meh. I like the way of assigning the x & y of the points to the Tpoints, makes it less messy for me in the. Your way also works, i guess people have opinons of there own when it comes to programming rofl
__________________


Quote:
Originally Posted by Nuclear Bomb, The Legend, xDiamond, GzNPrize, iPromise, Aduka
I mastered vb in 1 month
  #10  
Old 08-24-2008, 04:11 PM
kb3z0n's Avatar
Double Wood Axe
 
Last Online: 10-22-2008 10:37 AM
Join Date: Aug 2008
Posts: 29
Thanks: 0
Thanked 3 Times in 3 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Downloads: 0
Uploads: 0
Latest Blog:
Rep Power: 0
kb3z0n is on a distinguished road
Points: 495.30
Bank: 0.00
Total Points: 495.30
Thanks, i needed this alot.
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Advertisement
   


Main Navigation
Home
GzN Forums
GzN Games
GzN News
Top Games
GzN Cheats
GzN Articles
GzN Reviews
GzN Downloads
User Control Panel
Advertising
RSS Feed
2Moons
Adventure Quest
AirRivals
America's Army
Anarchy Online
Archlord
Audition
Battlefield Series
Cabal Online
Call Of Duty Series
Combat Arms
Conquer Online