The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Coders Corner

Reply
 
Thread Tools Display Modes
Old 02-07-2008, 11:42 AM   #1
MySQL Error
Sonicxtacy02's CarPC Specs
 
Sonicxtacy02's Avatar
 
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,685
My Photos: (129)
how to do autoit's "ControlClick" in vb6

I'm determined to get this working in vb6 instead of writing a seperate app in autoit and i cant find any info on the net so i need you guys help. I'm trying to send mouse clicks to a external apps control in vb6. i do not want to physically move the mouse. In this case i have the window handle and the names for the controls, i simply need the function to send the clicks. Thanks
__________________
03 Acura RSX Coupe
a K.I.S.S Flash, VB, and Autoit Programmer
HARDWARE PROGRESS: 90%[/////////-]
SKIN PROGRESS: 90%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail and More!!! :)
Sonicxtacy02 is offline   Reply With Quote
Sponsored Links
Old 02-07-2008, 03:06 PM   #2
Variable Bitrate
 
Arrow's Avatar
 
Join Date: Feb 2006
Location: West Lafayette, IN
Vehicle: 2001 Ford Focus
Posts: 257
My Photos: (3)
You can use AutoIt's com object
Arrow is offline   Reply With Quote
Old 02-07-2008, 03:15 PM   #3
MySQL Error
Sonicxtacy02's CarPC Specs
 
Sonicxtacy02's Avatar
 
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,685
My Photos: (129)
Quote: Originally Posted by Arrow View Post
You can use AutoIt's com object

i never even knew autoit hadda com object. Cheap and dirty way to do it.. i like!
__________________
03 Acura RSX Coupe
a K.I.S.S Flash, VB, and Autoit Programmer
HARDWARE PROGRESS: 90%[/////////-]
SKIN PROGRESS: 90%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail and More!!! :)
Sonicxtacy02 is offline   Reply With Quote
Old 02-07-2008, 06:07 PM   #4
Variable Bitrate
 
Arrow's Avatar
 
Join Date: Feb 2006
Location: West Lafayette, IN
Vehicle: 2001 Ford Focus
Posts: 257
My Photos: (3)
Yeah, check it out. It's included with the AutoIt download. It includes just about all the functionality of autoit.
Arrow is offline   Reply With Quote
Old 02-07-2008, 06:32 PM   #5
Variable Bitrate
 
Arrow's Avatar
 
Join Date: Feb 2006
Location: West Lafayette, IN
Vehicle: 2001 Ford Focus
Posts: 257
My Photos: (3)
I just posted the question on experts-exchange. Maybe someone will have a more direct way of doing this, as I am also curious. I've used the AutoIt COM object before, but if that extra dll can be eliminated, that would help make a smaller easier to handle package.
Arrow is offline   Reply With Quote
Old 02-07-2008, 06:57 PM   #6
Confusion Master
Enforcer's CarPC Specs
 
Enforcer's Avatar
 
Join Date: Sep 2003
Location: If you go down to the woods today, You're sure of
Vehicle: 1997 BMW E36 328I
Posts: 9,727
My Photos: (1)
Have a look here

http://www.vbforums.com/showthread.p...ouse+click+app
Enforcer is offline   Reply With Quote
Old 02-08-2008, 07:47 PM   #7
Variable Bitrate
 
Arrow's Avatar
 
Join Date: Feb 2006
Location: West Lafayette, IN
Vehicle: 2001 Ford Focus
Posts: 257
My Photos: (3)
See this helps
Arrow is offline   Reply With Quote
Old 02-22-2008, 04:37 AM   #8
Newbie
 
Join Date: Feb 2008
Posts: 1
My Photos: (0)
PowerShell AutoItX

Hi! I am trying to do almost the same using PowerShell via AutoItX COM interface.

Does anybody know how to do ControlClick ?

pjo

-----------
PS
How do I find ControlID of a button of a window application ?

Last edited by pjofx : 02-22-2008 at 05:10 AM.
pjofx is offline   Reply With Quote
Old 07-18-2008, 12:47 PM   #9
Newbie
ClockWorK's CarPC Specs
 
ClockWorK's Avatar
 
Join Date: Oct 2003
Location: Michigan
Vehicle: 2004 Pontiac Grand Prix GTP CompG
Posts: 25
My Photos: (79)
Here's how I click on a control in another app through code. All you need is the handle.

Code:
''''''' Private Declare Function SendMessage_Long Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef LParam As Long) As Long Private Const WM_LBUTTONDOWN As Long = &H201 Private Const WM_LBUTTONUP As Long = &H202 Private Const WM_KEYUP As Long = &H101 Private Const WM_KEYDOWN As Long = &H100 Private Const VK_SPACE As Long = &H20 '''''''' Public Sub WindowAPI_Click(ByVal hwnd As Long) Dim retVal As Long retVal = SendMessage_Long(hwnd, WM_LBUTTONDOWN, 0&, ByVal 0&) retVal = SendMessage_Long(hwnd, WM_LBUTTONDOWN, 0&, ByVal 0&) retVal = SendMessage_Long(hwnd, WM_KEYUP, VK_SPACE, ByVal 0&) retVal = SendMessage_Long(hwnd, WM_LBUTTONUP, 0&, ByVal 0&) End Sub

ClockWorK is offline   Reply With Quote
Sponsored Links
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
VB6 FileSystemObject woes inh Coders Corner 6 02-05-2008 05:08 AM
Questions about Destinator 3 SDK and VB6 gsova Coders Corner 4 01-17-2007 06:36 AM
VB6 vs VB 2005 Express alimh Road Runner 4 11-14-2006 05:36 AM
VB6: Does anyone have experience with adding moudlarity to their apps? Mrbmw99 Coders Corner 2 10-15-2006 06:19 PM
Screwy docked toolbox in VB6!! deadweasel Software & Software Development 5 02-12-2004 02:06 AM


All times are GMT -5. The time now is 08:43 AM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics