Hi there i one of my programing buddies said it would be good practice to make a macro program.So i was wondering how would i go about that.Im a vb6 noob.
The program needs to be able to do the following.

Record Macro Sessions,and be able to pause the play or stop it all together.
Save Macro Sessions for further use,or Delete them.
Pause,Play and Stop at any time.
Replay macros x amout of times.

If you can help me with this project can you pm me or post here?

I just wanna make this question more clear for me.. Are you saying you want a program that repeats keystrokes, mouse clicks and mouse movements?? Like you want to be able to press the record button, do what you want with the mouse.. then press the play button and itll do it again??

I just wanna make this question more clear for me.. Are you saying you want a program that repeats keystrokes, mouse clicks and mouse movements?? Like you want to be able to press the record button, do what you want with the mouse.. then press the play button and itll do it again??

Exactly

Hmm.. thats tough.. But possible.. Heres some code that can put you in to the correct direction.. I dunno where I got this from but props to who ever wrote this stuff.. I put a timer and in the timer put this code.

Dim set1x As Double
        Dim set1y As Double

        set1x = MousePosition.X
        set1y = MousePosition.Y
        Label1.Text = set1x & ":" & set1y

That gives you the coordinates of the mouse.
To do a mouse click I used.

Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
    Private Const MOUSEEVENTF_ABSOLUTE = &H8000 ' absolute move
    Private Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
    Private Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
    Private Const MOUSEEVENTF_MOVE = &H1 ' mouse move
    Private Const MOUSEEVENTF_MIDDLEDOWN = &H20
    Private Const MOUSEEVENTF_MIDDLEUP = &H40
    Private Const MOUSEEVENTF_RIGHTDOWN = &H8
    Private Const MOUSEEVENTF_RIGHTUP = &H10

And refer to it use
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 1)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 1)

Or

mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 1)
mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 1)..
I hope that somewhat helps

Exactly

hello i was wondering if that mouse/ key stroke macro ended up working for u. or if there was anything els u did to make it better. if so can u please message me. ive been having troubles getting mine to work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.