Macros on a Mac

User avatar
SammyB
StarLounger
Posts: 93
Joined: 04 Mar 2010, 16:32

Macros on a Mac

Post by SammyB »

I am thinking of using a Mac for my personal stuff. Is there a reference that explains the differences between macros on Mac vs. Windows.

Specifically, I use a lot of calls to winapi's. Obviously, they are not available on a mac. Are there similar calls to IOS that you can make?

My biggest need is to move and click the cursor. I currently use mouse_event, GetCursorPos & SetCursorPos from user32.

Thanks!

User avatar
SammyB
StarLounger
Posts: 93
Joined: 04 Mar 2010, 16:32

Re: Macros on a Mac

Post by SammyB »

Doing some googling, it looks like you can easily use applescript in vba to move the cursor to a given point and click, but getting the current cursor position could be difficult, but there is a Cocoa api for macOS.

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Macros on a Mac

Post by HansV »

I haven't had a Mac for 25 years now, so I don't know anything about VBA on a Mac. MVP Ron de Bruin has a website dedicated to this: Mac Excel automation.
Best wishes,
Hans

User avatar
SammyB
StarLounger
Posts: 93
Joined: 04 Mar 2010, 16:32

Re: Macros on a Mac

Post by SammyB »

Thanks, Hans! I hadn't seen Ron's site, & he is a genius. It's also been 25 years or more for me, but I loved that old Mac Classic. We will see what I think of a MacBook Air. We only have i3's & i5's lying around, but one of them should keep me entertained. Thanks, again!