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.
|
02-07-2008, 11:42 AM
|
#1
|
|
MySQL Error
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,837
|
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%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail, & CentraFusion
|
|
|
02-07-2008, 03:06 PM
|
#2
|
|
Variable Bitrate
Join Date: Feb 2006
Location: West Lafayette, IN
Vehicle: 2001 Ford Focus
Posts: 265
|
You can use AutoIt's com object
|
|
|
02-07-2008, 03:15 PM
|
#3
|
|
MySQL Error
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,837
|
Quote: Originally Posted by Arrow 
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%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail, & CentraFusion
|
|
|
02-07-2008, 06:07 PM
|
#4
|
|
Variable Bitrate
Join Date: Feb 2006
Location: West Lafayette, IN
Vehicle: 2001 Ford Focus
Posts: 265
|
Yeah, check it out. It's included with the AutoIt download. It includes just about all the functionality of autoit.
|
|
|
02-07-2008, 06:32 PM
|
#5
|
|
Variable Bitrate
Join Date: Feb 2006
Location: West Lafayette, IN
Vehicle: 2001 Ford Focus
Posts: 265
|
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.
|
|
|
02-07-2008, 06:57 PM
|
#6
|
|
Confusion Master
Join Date: Sep 2003
Location: If you go down to the woods today, You're sure of
Vehicle: 1997 BMW E36 328I
Posts: 9,948
|
|
|
|
02-08-2008, 07:47 PM
|
#7
|
|
Variable Bitrate
Join Date: Feb 2006
Location: West Lafayette, IN
Vehicle: 2001 Ford Focus
Posts: 265
|
|
|
|
02-22-2008, 04:37 AM
|
#8
|
|
Newbie
Join Date: Feb 2008
Posts: 1
|
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.
|
|
|
07-18-2008, 12:47 PM
|
#9
|
|
Newbie
Join Date: Oct 2003
Location: Michigan
Vehicle: 2004 Pontiac Grand Prix GTP CompG
Posts: 38
|
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
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:35 AM.
|
|