Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Simple help/question with Applescript...

Simple help/question with Applescript...
Thread Tools
Forum Regular
Join Date: Sep 2004
Status: Offline
Reply With Quote
Apr 2, 2005, 10:51 AM
 
I hope I'm posting this in the right forum, but I've just started using Desktop Sweeper to hide my icons. The only problem is that it doesn't work when the machine boots--I have to press Command-Enter (the standard hotkey) to initially hide the icons.

Can a basic Applescript run as a startup item solve this for me by simulating a Cmd-Enter keystroke? If so, would anyone be willing to post it, as I have no idea about where to start with that stuff .
     
Mac Elite
Join Date: Dec 2001
Location: Chicago
Status: Offline
Reply With Quote
Apr 2, 2005, 11:10 AM
 
System Preferences - Accounts - Startup Items.

Add the script to your startup items.
     
Forum Regular
Join Date: Sep 2004
Status: Offline
Reply With Quote
Apr 2, 2005, 11:34 AM
 
Maybe I wasn't clear--I know how to add items to startup, but I have no idea how to write up the Applescript. That's why I said help w/Applescript in the title.
     
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
Apr 2, 2005, 11:53 AM
 
Before you try to emulate keystrokes with AppleScript you should first look whether the app you are trying to script is scriptable. In AppleScript Editor open the dictionary of the app and search for the command you want to use. Let's assume the program has a command that is called "hidemyicons" you would write an AppleScript like this:

tell application "Desktop Sweeper" to hidemyicons

Save that as application and add to your startup items.
     
Forum Regular
Join Date: Sep 2004
Status: Offline
Reply With Quote
Apr 2, 2005, 01:09 PM
 
Thanks for the tip, but Desktop Sweeper doesn't show up in the dictionary, maybe because it's an APE module, not an actual application. Any pointers on emulating keystrokes?
     
   
Thread Tools
Forum Links
Forum 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 On
Top
Privacy Policy
All times are GMT -5. The time now is 11:17 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2