cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1551
Views
0
Helpful
2
Replies

Embedded menu manager AutoExit

PD09
Level 1
Level 1

hi I have built a menu with 6 options, number 6 being the default to exit, however what i want to happen is when the user chooses option 1 for instance it runs the embedded tcl but instead of returning to the menu again after i want it to automatically exit back to the router prompt. how can i go about achieving this.?

 

the menu and scripts all work fine i just want it to auto exit after executing selection

 

 

1 Accepted Solution

Accepted Solutions

PD09
Level 1
Level 1

have now resolved this myself

View solution in original post

2 Replies 2

PD09
Level 1
Level 1

using the cisco version as an example how would i get it to exit after completing an option rather than returning to the menu once again to then select option 4 to exit

 

I have tried with embededTCL and entering end / exit and tclquit but this just runs it but then returns to the menu once complete.

 

I have set the continue prompt to false so it will just run without prompt, i just need it to be able to exit the menu structure automatically once done and go back to the router prompt.

 

 

<?xml version="1.0" encoding="UTF-8"?>
<Menu Standalone="true" TitleJustification="CENTER" Main="true"
MenuName="Test" schemaVersion="1.1">
<MenuTitle>
<EmbTCLValue>
<TCLCommand>return [concat "Simple Example Menu for" [hostname]]
</TCLCommand>
</EmbTCLValue>
</MenuTitle>
<Item ContinuePrompt="true" ItemJustification="LEFT">
<ItemTitle>
<Constant String="Show Cisco IOS version" />
</ItemTitle>
<HelpString>
<Constant String="This will run the exec command 'show ver'"/>
</HelpString>
<IOSExecCommand>"show ver"</IOSExecCommand>
</Item>
<Item ContinuePrompt="false" ItemJustification="LEFT">
<ItemTitle>
<EmbTCLValue>
<TCLCommand>return "Change hostname"</TCLCommand>
</EmbTCLValue>
</ItemTitle>
<HelpString>
<Constant String="Selecting this will change the router
hostname."/>
</HelpString>
<Wizard>
<QueryPrompt>
<Constant String="Please enter new hostname"/>
</QueryPrompt>
<FreeForm MaxResponse="30" />
</Wizard>
<IOSConfigCommand>"hostname $r(1)"</IOSConfigCommand>
</Item>
<Item ContinuePrompt="false" ItemJustification="LEFT">
<ItemTitle>
<Constant String="Change enable password" />
</ItemTitle>
<HelpString>
<Constant String="Selecting this will run enable password 0 'new_password'"/>
</HelpString>
<Wizard>
<QueryPrompt>
<Constant String="Please enter new password"/>
</QueryPrompt>
<FreeForm InputMask="TRUE" />
</Wizard>
<IOSConfigCommand>"enable password 0 $r(1)"</IOSConfigCommand>
</Item>
<Item ContinuePrompt="true" ItemJustification="LEFT">
<ItemTitle>
<Constant String="Exit" />
</ItemTitle>
</Item>
<DefaultSelection>
<Constant String="4" />
</DefaultSelection>
</Menu>

PD09
Level 1
Level 1

have now resolved this myself