|Aug 20, 2004, 04:45 PM||#1|
someone who knows applescript.. very quick question
i want to create an apple script that will launch a certain application and after it laucnehd just send a KeyPress of "return" key..
trying to record it doesnt work...
i was able to come up with this just out of logic, and a my very small understanding of applescript. the program i want to use doesnt have a dictionary. ive seen examples where it says "KeyPress Command "c"" for example, i tried doing "KeyPress Return" but it didnt work. so if n e one has ne ideas and can help, very appreciated
tell application "Finder"
open application application
|Aug 21, 2004, 04:08 AM||#2|
This should do it, just put the application name as the applicationName property.
property applicationName : "" --Put the application name inside the speech marks tell application applicationName activate --Open and activate the application tell application "System Events" tell process applicationName try key code 36 --Type the return key on error theError display dialog ("Sorry, an error occured:" & theError) buttons "OK" default button "OK" with icon stop end try end tell end tell end tell
Universal Access->Enable access for assistive devices (at the bottom).
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Possible AppleScript question||Telp||Mac Basics and Help||2||Mar 28, 2014 10:04 PM|
|AppleScript Question||Mork||OS X Mavericks (10.9)||0||Feb 12, 2014 09:32 AM|
|General Applescript Question||X4OX0||Mac Programming||0||Jun 25, 2013 12:19 PM|
|Little question on Applescript||Colty||Mac Programming||3||Nov 22, 2012 05:24 PM|
All times are GMT -5. The time now is 11:48 AM.