Right clicking

I am using ScanSnap software and I have the Scansnap Icon in my dock. I want to be able to right click and select "duplex’ or "simplex’.

Ive tried using the mouse position etc, but if I add more programs or removed programs from my dock I imagine this will alter the macro since the position of the icon would be moved. Besides, I can’t imagine this is the best way to do this.

Suggestions on writing a macro to "Right click’ an application and select a specific menu item in the menu?

This AppleScript should do the trick.
Developed/Tested for ScanSnap Manager 6.3.70 (1001) on macOS 10.12.6.

Let us know if you have any problems or questions.


MACRO:   ScanSnap Scan Options


#### DOWNLOAD:
<a class="attachment" href="/uploads/default/original/3X/4/e/4ec0a7b5f88752b93bdbeb28569fcd0f18149a83.kmmacros">ScanSnap Scan Options.kmmacros</a> (4.3 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**

---



![image|580x1040](upload://qI4zUh3rcUi5rStMpauSuoq9yo1.png)

Michel this is very helpful! Thank you. I tried this and it consistently defaults to “Duplex” and Im not certain if this is by design.

Would I need two Scripts? Meaning one script for duplex and one script for Simplex? Totally new to scripting. If it is 2 scripts, would it be a case of duplication this script and changing duplex to simplex?

No, you just need ONE macro and one script.

Instead of the Set Variable action that I used to set the "Scan Type", use a Prompt for User Input action (KM Wiki) to let the user select the Scan Type.

Ok, I think I understand. Again very helpful, thank you!

In this case, I actually want 2 separate and specific scripts I think. My thought on why is this:

I have several ScanSnap profiles I utilize and figured out (with a lot of help) how to setup Macros for those profiles. To actually scan AFTER the profiles are set, I need to run one of two Scripts ( I think). Certain profiles require a duplex scan and others a simplex scan.

So, My thinking is combining the scripts so the profiles that need duplex scanning gets the script for duplex automatically and the profiles that need the simplex get the other script.

Basically, in the end, hitting one macro which changes the profile and then scans in the appropriate method (simplex or duplex). Not sure if I explained well.