New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Launching an application while executing an applescript?


Post Reply New Thread Subscribe

 
Thread Tools
Commander_FarkU

 
Member Since: Jun 13, 2010
Posts: 1
Commander_FarkU is on a distinguished road

Commander_FarkU is offline
I'm very new to applescript, first day of trying to do anything.

What I am trying to do is, when a game starts up I want it to run a script that will change my function keys to standard function keys. I have a script for it,
------------------------------------------------
tell application "System Events"
if not UI elements enabled then
set UI elements enabled to true
end if
end tell

--Enable/Disable "Use all F1, F2, etc. keys as standard function keys" option in Keyboard & Mouse Preference pane and close System Preferences
tell application "System Events"
tell application "System Preferences"
reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
end tell
click checkbox "Use all F1, F2, etc. keys as standard function keys" of tab group 1 of window "Keyboard & Mouse" of application process "System Preferences"
end tell
if application "System Preferences" is running then
tell application "System Preferences" to quit
end if

------------------------------------------------
but I can't figure out how to get it to run when the application starts. Is this even possible? I would appreciate any help.
QUOTE Thanks

Post Reply New Thread Subscribe


« Where is the allocation file? | XCode/C++ Help »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Launching an applescript FROM firefox (URL bar?) Snipeye OS X - Apps and Games 2 05-30-2011 10:09 PM
Protect Content of Applescript Application BS0D OS X - Development and Darwin 2 12-21-2008 11:34 AM
Launching an application via script Haravikk OS X - Development and Darwin 3 03-25-2008 06:48 PM
Launching an application more than once in Spaces bpaskin OS X - Apps and Games 1 03-25-2008 05:49 PM
AppleScript Application with Keyboard activation DCPomeroy OS X - Operating System 0 03-18-2008 01:29 AM

All times are GMT -4. The time now is 11:33 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?