Jump to content

Recommended Posts

Posted

Hello everyone,

I often find myself writing short macros utilizing Send() and MouseClick() combined with Sleep() in between to automate some tedious office tasks. Sadly most of the things I am using don't have an API; most are in browser (I know there is headless chrome but it's a lot of effort to work with that just for a couple of clicks I do in my routers interface or similar). But sometimes I also have to edit excel files by hand in a way that search and replace is just not smart enough to. Or just remove that first space in every line without having to check what the regrex to search and replace would be. So I resort to just manually recreate the UI input with these functions and have it run on an endless loop or a certain amount of times.

I am now thinking about writing something like a generalized version of this which would be capable of recording my mouse and keyboard actions and replay them afterwards so I don't have to tweak my template with custom timings and changed buttons every time. I am wondering which functions I would use to accomplish that. I was thinking _IsPressed() but I doubt that having a switch/case for every single key code in existence is the way to go. For mouse movements I know there is functions to get the mouse buttons position but not to tell how it is pressed. Would love to get some pointers on how to achieve this.

Thanks in advance

  • Jos locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...