Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 7th, 2005, 2:58 PM   #1
xxinsainxx
Newbie
 
Join Date: Mar 2005
Posts: 5
Rep Power: 0 xxinsainxx is on a distinguished road
need help on code

i want to make a program that has 2 buttons one winner and 1 looser.

when the winner button is pressed the program just keeps hitting f8 and keeps hittinga certain pixel box location. ( is that even possible to have it click an area of say 100 *100 ? i cud find the exact location if i get help from someone

the looser button when pressed would simply keeping moving the left arrow key so that if u press left it wud move the cursor over left and to hit the same location

lastly both buttons need to hit the same location as the pixel area i said but im guessing 20 rows up

how would i go about coding that?
xxinsainxx is offline   Reply With Quote
Old Mar 8th, 2005, 6:55 PM   #2
xxinsainxx
Newbie
 
Join Date: Mar 2005
Posts: 5
Rep Power: 0 xxinsainxx is on a distinguished road
anyone please able to help me im a noob to programming and from the searching ive done here it doesnt seem complicated i jsut don't know how to do it so once again please help me on this
xxinsainxx is offline   Reply With Quote
Old Mar 8th, 2005, 7:12 PM   #3
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
you would start with a form with the button components on it... show us some code and ask specific questions, doing so will probably land you more detailed answers.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Mar 8th, 2005, 7:26 PM   #4
xxinsainxx
Newbie
 
Join Date: Mar 2005
Posts: 5
Rep Power: 0 xxinsainxx is on a distinguished road
lol sor the thing is i don't know how to code it thats why i asked here if someone could basicaly teach me how do to this
xxinsainxx is offline   Reply With Quote
Old Mar 9th, 2005, 8:51 AM   #5
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
http://msdn.microsoft.com/library/de...LROverview.asp
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!

Last edited by big_k105; Mar 9th, 2005 at 9:54 AM.
Pizentios is offline   Reply With Quote
Old Mar 10th, 2005, 2:21 PM   #6
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
If this is a humurous "joke" program, I have to have a copy.
Well, there is an API (a special type of function that links into the guts of windows) called SetCursorPos that would work (google for a beginner's guide), which takes the x and y coordinates of the new screen location (relative to the top left). However, a presume you want a cool annoying gradual move to the spot rather than an instantaneous jump - you'll need to call it several times with a time delay, incrementing the x coordinate for example using a timer.

Clicking a pixel can be done in the same way, additionally use the mouse_event API (using click mode) however you can't click an entire rectangle at once.

Hope this helps
Rory is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:07 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC