title: Script to open right-click menu and choose menu item
body: <p>In a specific program, I want to assign a hotkey to the action of right clicking at the cursor's current position, then moving the cursor to choose an item on that menu, then moving the cursor again to choose an item on the sub-menu. I've gotten as far as the first two commands. When I get to the mousemove, no matter what coordinates I put in, the cursor shoots to the upper left corner of the screen, when what I would like it to do is first move 100 pixels to the right and 60 pixels up, then 100 pixels to the right, zero pixels on the y-axis. Clearly I am misunderstanding something. Please advise.</p>
  
  <p>Thanks,
  Ellen</p>
  
  <pre><code>   s::
  
  MouseGetPos
  
  Click right
  
  sleep, 100
  
  MouseMove, 60, -60, 5, R
  
  Sleep, 100
  
  MouseMove, 200, 0, 5, R
  
  MouseClick, L
  
  return
  </code></pre>