$bname » History » Version 1
Per Amundsen, 08/11/2015 05:30 AM
| 1 | 1 | Per Amundsen | _Added in 1.9.6_ |
|---|---|---|---|
| 2 | |||
| 3 | *$bname* |
||
| 4 | |||
| 5 | Returns the [[/toolbar|Toolbar]] button name during a [[Scripting_Menus|menu event]]. |
||
| 6 | |||
| 7 | *Example* |
||
| 8 | |||
| 9 | <pre> |
||
| 10 | ; Open a custom window. |
||
| 11 | /window @Example |
||
| 12 | |||
| 13 | ; Add a toolbar button named Example and associate it with the custom window @Example. |
||
| 14 | //toolbar -a Example "Hello World!" $qt($adiircexe) @Example |
||
| 15 | |||
| 16 | ; Add a menu for @Example to remove the Toolbar item based on $bname. |
||
| 17 | menu @Example { |
||
| 18 | $iif($bname,Remove):toolbar -d $bname |
||
| 19 | } |
||
| 20 | </pre> |