Jump to content


Photo

Menus Structure And Syntax


  • Please log in to reply
4 replies to this topic

#1 pitkon

pitkon

    Administrator

  • Head Administrator
  • 1,333 posts
  • LocationAthens & Nafplio, Greece

Posted 12 August 2014 - 09:22 AM

This is how Blackbox menus are structured and what commands you can use to tweak them to your liking.

Most of BB resources and tutorials were lost when lostinthebox went down, so thanks to Pico_No_Blackbox for finding this on Pastebin.

 

Menu Structure

 

[begin] (label) indicates the begin of the menu, label is optional.

[end]                                                                 indicates the end of the menu or submenu, required.

[submenu] (label)                                             inserts a submenu into the menu, must be closed by [end]

[include] {filename}                                          This will continue reading items from the indicated file.

[nop] (label)                                                      inserts an inactive item with an optional label

[sep]                                                                 inserts a separator (same as [nop] with no label)

 

Inserting Submenus

 

[path] (label) {folder}                                        inserts an submenu with a folder from your computer as specified

[path] (label) {folder1|folder2}                          merges two folders into a single menu

[insertpath] {folder}                                          inserts items from a folder into the current menu

[stylesmenu] (label) {folder}                             insert a submenu with stylefiles from a folder

[stylesdir] {folder}                                             insert style files from a folder into the current menu

[config] (label)     inserts the configuration menu

[workspaces] (label)                                         insert the workspaces menu

[tasks] (label)                                                   insert a menu with the current tasks

[icons] (label)                                                   insert a menu with the currently minimized tasks

 

In addition to normal paths like {c:/program files/...}, a number of items may be used to indicate a special shellfolder. See shellfolders.rc for examples.

 

Blackbox Commands

 

[style] (label) {filename}                                    insert an item to apply a new style.

[toggleplugins] (label)                                       show/hide plugins

[aboutplugins] (label)                                       display 'about plugins' info

[aboutstyle] (label)                                           display 'about style' info

[gather] (label)   gather windows in current workspace

[reconfig] (label)                                               re-read the configuration files

[restart] (label)   reload plugins

[exit] (label)                                                      exit blackbox

 

Edit Commands

 

[edit] (label) {file}                                             edit the specified 'file'

[editstyle] (label)                                              edit the current style

[editmenu] (label)                                            edit menu.rc

[editlugins] (label)                                            edit plugins.rc

[editextensions] (label)                                    edit extension.rc

[editblackbox] (label)                                       edit blackbox.rc

 

The 'edit' commands use the 'blackbox.editor', which is specified in extensions.rc. For example:

blackbox.editor: bbnote.exe

 

Shutdown Commands

 

[logoff] (label)   logoff (*)

[suspend] (label)                                              suspend the computer (*)

[hibernate] (label)                                             hibernate (*)

[reboot] (label)   reboot the computer (*)

[shutdown] (label)                                            shutdown the computer (*)

[lockworkstation] (label)                                   lock workstation

[switchuser] (label)                                           fast user switch

[exitwindows] (label)                                        display standard shutdown dialog

 

(*) You can add -q(uiet) for no confirmation. For example

[logoff -q] (Log Out)

 

External Commands

 

[run] (label)                                                      show the windows 'run' dialog

[exec] (label) {command}                                 run a program (*) or execute a broam.



#2 Pico_No_Blackbox

Pico_No_Blackbox

    AHK Scripter

  • Members
  • PipPipPip
  • 53 posts

Posted 13 August 2014 - 08:29 AM

In addition to normal paths like {c:/program files/...}, a number of items may be used to indicate a special shellfolder. See shellfolders.rc for examples.

 

Just Expanding on that here.

 

# shellfolders.rc - examples for accessing the various system folders
 
[submenu] (All Shellfolders)
  [path] (admintools)         {ADMINTOOLS}
  [path] (altstartup)         {ALTSTARTUP}
  [path] (appdata)            {APPDATA}
  [path] (bitbucket)          {BITBUCKET}
  [path] (common_admintools)  {COMMON_ADMINTOOLS}
  [path] (common_altstartup)  {COMMON_ALTSTARTUP}
  [path] (common_appdata)     {COMMON_APPDATA}
  [path] (common_desktopdirectory) {COMMON_DESKTOPDIRECTORY}
  [path] (common_documents)   {COMMON_DOCUMENTS}
  [path] (common_favorites)   {COMMON_FAVORITES}
  [path] (common_programs)    {COMMON_PROGRAMS}
  [path] (common_startmenu)   {COMMON_STARTMENU}
  [path] (common_startup)     {COMMON_STARTUP}
  [path] (common_templates)   {COMMON_TEMPLATES}
  [path] (connections)        {CONNECTIONS}
  [path] (controls)           {CONTROLS}
  [path] (cookies)            {COOKIES}
  [path] (desktop)            {DESKTOP}
  [path] (desktopdirectory)   {DESKTOPDIRECTORY}
  [path] (drives)             {DRIVES}
  [path] (favorites)          {FAVORITES}
  [path] (fonts)              {FONTS}
  [path] (history)            {HISTORY}
  [path] (internet)           {INTERNET}
  [path] (internet_cache)     {INTERNET_CACHE}
  [path] (local_appdata)      {LOCAL_APPDATA}
  [path] (mypictures)         {MYPICTURES}
  [path] (nethood)            {NETHOOD}
  [path] (network)            {NETWORK}
  [path] (personal)           {PERSONAL}
  [path] (printers)           {PRINTERS}
  [path] (printhood)          {PRINTHOOD}
  [path] (profile)            {PROFILE}
  [path] (program_files)      {PROGRAM_FILES}
  [path] (program_files_common)   {PROGRAM_FILES_COMMON}
  [path] (program_files_commonx86)  {PROGRAM_FILES_COMMONX86}
  [path] (program_filesx86)     {PROGRAM_FILESX86}
  [path] (programs)           {PROGRAMS}
  [path] (recent)             {RECENT}
  [path] (sendto)             {SENDTO}
  [path] (startmenu)          {STARTMENU}
  [path] (startup)            {STARTUP}
  [path] (system)             {SYSTEM}
  [path] (systemx86)            {SYSTEMX86}
  [path] (templates)          {TEMPLATES}
  [path] (windows)            {WINDOWS}
[end]

 

 

 
Ex: [path] (Start) {STARTMENU|COMMON_STARTMENU}
This is a default path in your menu.rc that uses 2 of the above so that it works with everyones system instead of just your specific version of windows.

  • pitkon likes this

#3 pitkon

pitkon

    Administrator

  • Head Administrator
  • 1,333 posts
  • LocationAthens & Nafplio, Greece

Posted 13 August 2014 - 08:33 AM

Excellent addition :)



#4 Pico_No_Blackbox

Pico_No_Blackbox

    AHK Scripter

  • Members
  • PipPipPip
  • 53 posts

Posted 13 August 2014 - 08:39 AM

Did i ever tell you; getting praise from you feels like Sean Connery handing me a beer? XD



#5 pitkon

pitkon

    Administrator

  • Head Administrator
  • 1,333 posts
  • LocationAthens & Nafplio, Greece

Posted 13 August 2014 - 08:47 AM

You honor me, but truth is I don't have the time I would need to make so many researches I wanted to make, so having people like you finding treasures like this is worth a pack of beers.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users