Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use my script below for accessing the context menu, you'll need both MouseLocation, and cliclick that you'll find via Google.</p> <p>You may want to edit it a little (and adjust the hardcoded paths to both MouseLocation, and cliclick), but it should really be no problem, I think you can use System Events and key code commands to navigate the context menu.</p> <pre><code>set mouseLoc to (do shell script "/usr/local/opt/MouseLocation") set {astid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ","} tell mouseLoc to set {mouseX, mouseY} to {it's text item 1, it's text item 2} set {mouseX, mouseY} to {(mouseX as integer), 1200 - (mouseY as integer)} tell application "System Events" set frontProcessName to name of every process whose frontmost is true -- tell a to set aa to (get its name) set wnCount to count of windows of process named frontProcessName if wnCount &gt; 0 then tell window 1 of process named frontProcessName set wnPos to its position set wnsize to its size end tell set {wnX, wnY, wnWidth, wnHeight} to {item 1 of wnPos, item 2 of wnPos, item 1 of wnsize, item 2 of wnsize} set {leftBound, RightBound, upperBound, lowerBound} to {wnX + 1, (wnX + wnWidth - 21), wnY + 50, (wnY + wnHeight - 51)} if mouseX ≥ leftBound and mouseX ≤ RightBound then else if mouseX &lt; leftBound then set mouseX to leftBound log "a" else set mouseX to RightBound log "b" end if if mouseY ≥ upperBound and mouseY ≤ lowerBound then else if mouseY &lt; upperBound then set mouseY to upperBound log "c" else set mouseY to lowerBound log "d" end if end if end tell set mouseLoc to "c" &amp; mouseX &amp; " " &amp; mouseY do shell script "/usr/local/opt/cliclick " &amp; mouseLoc set AppleScript's text item delimiters to astid </code></pre> <p>Edit:</p> <p>I didn't know that you couldn't find MouseLocation via Google anymore, I am sorry about that If you have problems compiling the code found in post # 3 in this thread (<a href="http://www.macscripter.net/viewtopic.php?id=33468" rel="nofollow">http://www.macscripter.net/viewtopic.php?id=33468</a>), then I recommend you use the MouseTool found here :(<a href="http://www.hamsoftengineering.com/codeSharing/MouseTools/MouseTools.html" rel="nofollow">http://www.hamsoftengineering.com/codeSharing/MouseTools/MouseTools.html</a>) instead, you would then need to change the first four lines of the script to something like:</p> <pre><code>set mouseLoc to (do shell script "MouseTools -location") set {astid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return} tell mouseLoc to set {mouseX, mouseY} to {it's text item 1, it's text item 2} set {mouseX, mouseY} to {(mouseX as integer),(mouseY as integer)} </code></pre> <p>(You'll have to adjust the path to MouseTools as well as to cliclick.)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload