SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Feb 2001
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    looping through menu items

    I've been trying to check that an [F1] help function works when menuitems are highlighted but I'm having a problem passing the variables to the script.
    I'm doing something like this:
    [-] testcase menubarplay() appstate none
    [ ] List of String MenubarItems
    [ ] string MenubarItem
    [ ] MenubarItems = Application.MenuBar.GetContents()
    [ ] Print(MenubarItems)
    [-] for each MenubarItem in MenubarItems
    [ ] Application.SetActive()
    [ ] Agent.DisplayMessage("",MenubarItem)
    [ ] Application.MenubarItem.GetItemCount()

    The DisplayMessage returns each individual item in the menu but the last line of this code chokes cause MenubarItem is not defined in my declarations. How do I go about passing the variable MenubarItem to the script?

    ------------------

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: looping through menu items

    To be able to refer to any kind of window by name at runtime in this way, you will need to specify the window type and the tag in the line as you refer to it. I think the code you need is as follows:
    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:45 PM.

Copyright BetaSoft Inc.