Giter Club home page Giter Club logo

ezmenu's Introduction

ezMenu

 

parameters

ezMenu("menu_name", menu_text [, modify_func])

menu_name

the name of the menu that all items will be added to.  if there is no label/subroutine stated in the menu text then the menu name will become the default label that will run when a menu item is clicked

menu_text

a string containing menu text or the path of a file that contains menu text.
the file types that menu text can be read from are: .txt, .menu and .menu.ahk

modify_func

the name of the function that will run just before the menu text is parsed.  this is used for changing the menu text in some way such as replacing the names of variables with their actual contents

run the file example.ahk to see some examples of the above parameters in use

 

syntax

sub-menu

level 1.1
    level 2.1 sub-menu
    level 2.2
level 1.2
level 1.3

any text that is indented by 1 tab or 4 spaces will become a sub-menu.

separator

lines that contain only 3 dashes --- will become menu separators

labels / subroutines

putting an exclamation mark on either side of a label name will set that as the default label for the current item and every item below it:

item text !default_label_name!

this can also be used on a line on its own so its not tied to any item:

!default_label_name!

to change the label for the current item only then put one exclamation on the left:

item text !another_label_name

in both cases, if the label exists then ! + label name text will be removed

note: if no label names are stated in the menu text then the menu name used in parameter 1 will become the default label

disable an item

.item text

start the line with a full stop to have the item disabled (greyed out)

default item

*item text

start the line with an asterick to set the item as the default (bold text)

comments

lines with a semi-colon at the start will be ignored.
(at the moment its not possible to comment out a parent menu item and have all its sub items ignored)

item text ; comment explaining the item

if you want to have comments after an item then use the item_mod() function in example.ahk to strip them out once the item is clicked

ezmenu's People

Contributors

davebrny avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.