SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Sep 2001
    Posts
    153
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Skipping over non-enabled menus

    We have SilkTest function that goes through all menus of an application. Baically it cycles through and gets count and then gets children of menu. Problem happens when menu item is not enabled. In some cases we just want to skip over that menu item. But instead it errors out by saying something like "Window '[MenuItem]$43' is not enabled".

    How can we make logic to just skip over that? Is there something like a "check for not-enabled" or something like that? I look in help library but I don't see anything immediately useful. Just curious if someone's got something basic that I'm missing.

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

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Skipping over non-enabled menus

    The IsEnabled() method will support that determination:

    if menuitem.IsEnabled()
    menuitem.Pick()
    else
    LogWarning("Menu item '{menuitem}' is not enabled")

    John


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

  3. #3
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Skipping over non-enabled menus

    Setting the following Agent.SetOption (OPT_VERIFY_ENABLED, FALSE); will make it so that it wont error. Doing something with the .IsEnabled() method can have it skip over it.

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

 

 

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 02:19 PM.

Copyright BetaSoft Inc.