image
image

|


Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
Thread Tools
  #1  
Old June 25th, 2003, 10:39 PM
phatcactus's Avatar
The Ugly Organist
 
Join Date: Aug 2002
Location: Chicago
Posts: 330
Thanks: 0
Thanked 0 Times in 0 Posts
phatcactus is on a distinguished road
Simple Applescript Studio question...

I have really no AppleScript experience, so I figure I should ask for some help before my head explodes. I'm trying to change the title of a menu item when a drawer opens.

Code:
on opened theObject
	if name of theObject = "theDrawer" then
		tell window "mainWindow" to set title of button "drawerButton" to "Hide Drawer"
		tell menu "mainMenu" to set title of menu item "drawerMenuItem" to "Hide Drawer"
	end if
end opened
The button changes just fine, but the menu item is giving me all kinds of problems. Could someone help me out with the right syntax? drawerMenuItem is in a menu called viewMenu, if that helps at all...
Reply With Quote
  #2  
Old July 1st, 2003, 02:23 PM
brianleahy's Avatar
Colonel Panic
 
Join Date: Sep 2000
Location: Northern Ohio
Posts: 1,579
Thanks: 0
Thanked 0 Times in 0 Posts
brianleahy is on a distinguished road
I've done some scripting, no Applescript studio though.

Still, taking a wild guess ...

If the menu is called "viewMenu" shouldn't the statement say:

tell menu "viewMenu" to set title of menu item "drawerMenuItem" to "Hide Drawer"

Just a thought. Like I say, haven't tried AS-Studio.
__________________
OS X 10.4
G5 Dual 2GHZ / 160GB / 1GB RAM / Superdrive
Apple 20" Cinema Display
SmartDrive 120GB Firewire HD
Maxtor 250GB SATA


Visit my wife's eBay store !!

http://stores.ebay.com/Catchy-Creations-by-brendaonline

Now pining for a MacBook Pro...
Reply With Quote
Reply

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple AppleScript question... Trip Software Programming & Web Scripting 2 January 16th, 2003 06:50 AM
Simple (?) Applescript Question Durbrow Mac OS X System & Mac Software 1 November 27th, 2002 10:30 PM
Applescript Studio Application chief Software Programming & Web Scripting 2 November 25th, 2002 04:42 PM
HELP! I _DESPERATELY_ need AppleScript Studio help! simX Apple News, Rumors & Discussion 3 February 22nd, 2002 07:09 PM
AppleScript Studio? Is this our new HyperCard? rharder Apple News, Rumors & Discussion 5 September 27th, 2001 11:44 AM


All times are GMT -5. The time now is 09:50 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.