Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 7, 2011, 06:41 PM   #1
rebello95
macrumors member
 
Join Date: Jun 2011
Location: USA
Using Click in AppleScript

tell application "System Events"
tell process "Minecraft"
click at {896, 157}
end tell
end tell
end
end

for some reason it's not working, even when I try it with Safari. Ideas?
rebello95 is offline   0 Reply With Quote
Old Nov 7, 2011, 07:49 PM   #2
Partron22
macrumors 6502
 
Join Date: Apr 2011
"click at" command not working...
Quote:
Originally Posted by StefanK
click at doesn't work.
Use something like cliclick
Partron22 is offline   0 Reply With Quote
Old Nov 7, 2011, 09:31 PM   #3
rebello95
Thread Starter
macrumors member
 
Join Date: Jun 2011
Location: USA
I got click at to work for Safari, but not minecraft. I saw cliclick but I don't want people to have to install that. This procedure is being used in an application I'm making, so I need actual code.
rebello95 is offline   0 Reply With Quote
Old Nov 8, 2011, 06:09 AM   #4
Partron22
macrumors 6502
 
Join Date: Apr 2011
Quote:
Originally Posted by rebello95 View Post
used in an application I'm making, so I need actual code.
This has most of what you want:
Move and click the mouse via code
But CGPostMouseEvent() is deprecated, so mod the code accordingly:
CGPostMouseEvent replacement on Snow Leopard

Install the resulting shell command in your App's bundle, and call it with a 'do shell script' or an Objective C launchedTaskWithLaunchPath:arguments:.
Partron22 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Tags
click applescript, lion, minecraft, osx, snow leopard

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Keystroke Control + Key in Applescript OpenLaszlo Mac Programming 4 Nov 6, 2012 03:38 PM
Use backslash in Applescript running a Bash Shell Script rebello95 Mac Programming 12 Nov 3, 2011 01:56 PM
Right Clicking in Simple Finder dodge this Mac Basics and Help 0 Aug 6, 2011 06:28 PM
Send Mail Using Stationery in Automator/AppleScript raiderchic7 Mac Programming 8 Jan 19, 2011 01:58 AM
Applescript help automatic clicking in email IloJeM Mac Programming 0 May 24, 2009 05:32 AM


All times are GMT -5. The time now is 04:47 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC