Click here after x-minutes

-- hubionmac.com 01.03.2011

-- remembers mouse position and clicks it after a given time

-- this script uses cliclick by Carsten Blüm (http://www.bluem.net/en/mac/cliclick/)

-- binary should be located in your application folder


say "will copy mouse position in"

say 3

say 2

say 1

say "now"

set mouse_XY to do shell script "afplay /System/Library/Sounds/Tink.aiff; /Applications/cliclick -q"

set AppleScript's text item delimiters to ","

set x to text item 1 of mouse_XY

set y to text item 2 of mouse_XY

set AppleScript's text item delimiters to ""


set waitfor to (text returned of (display dialog "Wieviel Minuten soll ich warten?" default answer 1) as integer) * 60


with timeout of (waitfor + 10) seconds

delay waitfor

do shell script "/Applications/cliclick " & x & " " & y

end timeout

This entry was posted in Useful Snippets and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA:


4 + seven =

Subscribe without commenting

  • Seite übersetzen:


    Paypal for Pizza:




  • Kategorien


  • Letzte Kommentare

    • Niklas: Vielen Vielen Dank! So klappt es!
    • hubi: Servus Niklas, ich habe mir den Quellcode noch einmal angesehen und habe nun unter 10.7.3 einen Weg gefunden...
    • Niklas: Klingt super das Script. Leider bekomm ich immer folgende Fehlermeldung: error “„Mail“ hat einen Fehler...
    • Jürgen: Hallo Hubi, beim Abfragen von Kennworten gibt es noch eine böse Falle: Das Format, in dem security antwortet,...
    • hubi: Am einfachsten Du öffnest im AppleScript-Editor mal das Funktionsverzeichnis (unter Ablage) von iTunes. Ein...