|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Simple way to automatically press a few keys, and loop?
I have a game where I want to press, "3, 2, 1, left click" and keep looping that. How would I go about doing that? Thanks.
Last edited by yeeehaw; Oct 11, 2012 at 02:42 AM. |
|
|
|
0
|
|
|
#2 |
|
You could probably use Automator to create a script for what you want to do.
__________________
![]() |
|
|
|
0
|
|
|
#3 |
|
By using a program called Automator.
It comes pre-installed with your Mac, so check in your Launchpad/Applications folder. You can easily search the forums/Google for tutorials on how to use Automator to complete tasks which require a loop. |
|
|
|
0
|
|
|
#4 | |
|
Quote:
tell application "Torchlight" repeat keystroke "3" keystroke "2" keystroke "1" end repeat end tell but it gave me an error and didn't work. Also, I don't know how to tell it to left click. |
||
|
|
0
|
|
|
#5 | |
|
Try this :
Code:
GUI() --do stuff with UI scripting -- Activate the application you'd like to target tell application "Torchlight" to activate tell application "System Events" -- Send your keystroke tell process "Torchlight" repeat keystroke "3" keystroke "2" keystroke "1" click end repeat end tell end tell on GUI() tell application "System Events" if UI elements enabled then else repeat until UI elements enabled is true beep tell application "System Preferences" activate set current pane to pane "com.apple.preference.universalaccess" end tell tell application "Finder" activate display dialog "UI element scripting is not enabled. Please check \"Enable access for assistive devices\" Then click \"ok\"" end tell end repeat end if end tell end GUI Quote:
__________________
Space Corps Directive 34124 Last edited by kryten2; Oct 11, 2012 at 08:30 AM. |
||
|
|
2
|
|
|
#6 |
|
Hello,
So what can I do to make it loop every 0.1 seconds for just 7 minutes? And how exactly can I make it stop? Thank you! Last edited by dumlovesyou; Nov 22, 2012 at 04:40 AM. |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 05:39 AM.








Linear Mode
