Hi all, i would like a nudge in the correct direction here, I am wanting to make my own macro program (dont ask why, lol i am a nerd and if somthing interests me i want to make my own lol)

so far this is how its going to be, im going to start simple and only do the keyboard.

1) User enters data (either into a txt file or in a text box) thats the easy part.

2) Program reads data, another easy part.

3) set an execution multiplier for the macro, we will call the variable X, also easy

4) program emulates the data, and does it... i.e. i type 123 into the programs text box, open notepad and hit the start key it types 123 into notepad X ammount of times

step 4 is the one im a bit confused on since ive never tried anything like this.

how will my program know the start key was pressed if its not the active window? and how can i make it emulate a keystroke to acttually type in the data? and how will it automatically send the keystroke to the active window?


like any program, as this one matures ill make it better, maybe logging the mouse (no clue how i could do this without a giant log file of the x,y pos of the mouse lol) or recording the time of the macro so that it executes it the exact same as the user did... i.e [1]-2.1seconds-[2]-3.2seconds-[3]

also any suggestions of neat stuff to add is welcomed