Indigo Rose Software
  #1  
Old 10-03-2005
Desmond's Avatar
Desmond Desmond is offline
Indigo Rose Staff Member
 
Join Date: Jul 2003
Posts: 628
EXAMPLE: Basic Menu Functionality

Hello,

This example illustrates how to perform basic tasks with the menu bar in any AutoPlay Media Studio 6.0 application.

Skills Used: Enable and Disable items, Menu Bar, Functions, On Menu event, Menu ID's, Tables.
Attached Files
File Type: apz Menu Bar Example 6.0.0.0.apz (39.6 KB, 1245 views)
__________________
Setup Factory 8.0 comes with over 250 actions so you can create smaller, faster and more intelligent software installers than ever before.

WebHelp Guides: AMS | MSIFACT | SUF | TU | VP
Reply With Quote
  #2  
Old 10-03-2005
AXXESS's Avatar
AXXESS AXXESS is offline
Forum Member
 
Join Date: Nov 2001
Posts: 498
Great example, Desmond!

A couple questions:

What syntax should be used for sub-sub menus?

Is there an efficient way to change the state of a given menu item with an OnMenu event and populating the menu bar through the Project>Menu Bar dialog?
Reply With Quote
  #3  
Old 10-04-2005
Desmond's Avatar
Desmond Desmond is offline
Indigo Rose Staff Member
 
Join Date: Jul 2003
Posts: 628
Thanks!

For sub-sub menu's, just expand the table logic:

Code:
-- Initialize sub sub item tables
tMenu[1].SubMenu[1].SubMenu = {}

-- Create sub sub menu
tMenu[1].SubMenu[1].SubMenu[1] = {ID = 1011, Text = "Sub Sub Item 1", Enabled = true, Checked = false};
As for your second question . . . there's no *quick* way that I know of. But the steps would be:
  1. Use Application.GetMenu to retrieve the current menu structure
  2. Loop through the table (either recursiively or not) looking for the ID you want to enable/disable
  3. Enable/Disable it
  4. Use Application.SetMenu to write out the modified table

Hope that helps!

Does anyone else have any different menu-interaction techniques that'd be of interest?
__________________
Setup Factory 8.0 comes with over 250 actions so you can create smaller, faster and more intelligent software installers than ever before.

WebHelp Guides: AMS | MSIFACT | SUF | TU | VP
Reply With Quote
  #4  
Old 10-04-2005
Desmond's Avatar
Desmond Desmond is offline
Indigo Rose Staff Member
 
Join Date: Jul 2003
Posts: 628
Hello,

I've just posted an example function to this forum:
http://www.indigorose.com/forums/showthread.php?t=13244

That should allow you to change the properties of an item you create through the Project > Menu Bar dialog, using just it's ID.
__________________
Setup Factory 8.0 comes with over 250 actions so you can create smaller, faster and more intelligent software installers than ever before.

WebHelp Guides: AMS | MSIFACT | SUF | TU | VP
Reply With Quote
  #5  
Old 11-10-2005
Rhett's Avatar
Rhett Rhett is offline
Forum Member
 
Join Date: Nov 2005
Location: Shanghai
Posts: 1
Huh? Many Thanks!

I'm a chinese AMS user, and for recent days I'm have been puzzled by the menu item state with the built-in function--"g_OnUpdateMenuEnabled (number CommandID, table ItemInfo)".
Thanks to your guilding example, I think I can handle it smoothly later on, but what the function above is used for?

Last edited by Rhett; 11-10-2005 at 01:28 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dependency Module: Visual Basic 6.0 (SP6) Darryl Setup Factory 8.0 Examples 0 09-02-2004 12:48 PM
INFO: Visual Basic 6.0 (SP5) Runtime Notes Desmond Setup Factory 6.0 Knowledge Base 0 11-28-2003 11:30 AM
INFO: Visual Basic 5.0 (SP3) Runtime Notes Desmond Setup Factory 6.0 Knowledge Base 0 11-28-2003 11:29 AM
TUTORIAL: Showing and Hiding Objects in AutoPlay Menu Studio 3.0 Support AutoPlay Menu Studio 3.0 0 10-10-2002 03:39 PM
FAQ: AutoPlay Menu Studio 3.0 Frequently Asked Questions Support AutoPlay Menu Studio 3.0 0 10-10-2002 02:15 PM


All times are GMT -6. The time now is 09:51 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software