zoukankan      html  css  js  c++  java
  • 创建菜单读取脚本

    (      
     files = getFiles "X:\脚本工具\整理放服务器脚本\*.ms"
     sort files
     ------------------ deleting previous menu
     if ((menuMan.findMenu "scriptTools") != undefined) then
     (
      menuMan.unRegisterMenu (menuMan.findMenu "scriptTools")
      menuMan.updateMenuBar()
     )
     --------------------creating menu
     mainMenuBar = menuMan.getMainMenuBar()
     subMenu = menuMan.createMenu "scriptTools"
     -------------------- creating run-maroscripts and populating menu
     z = 0
     for i in files do
     (
      z = z + 1
      str = "macroscript smartmenu" + (z as string) + " category:\"smartmenu\" buttontext:\"" + (getFilenameFile i) + "\" (execute (openFile \"" + i + "\"))"
      execute str 

      testItem = menuMan.createActionItem ("smartmenu" + (z as string)) "smartmenu"
      subMenu.addItem testItem -1 
     )
     -----------------------updating menu
     subMenuItem = menuMan.createSubMenuItem "Test Menu" subMenu
     subMenuIndex = mainMenuBar.numItems() - 1
     mainMenuBar.addItem subMenuItem subMenuIndex
     menuMan.updateMenuBar()
    )

  • 相关阅读:
    centos添加图形桌面
    centos 复制并重命名文件
    山东省第八届ACM程序设计大赛总结
    RMQ
    图的深度优先搜索
    ACM知识点清单
    优先队列(priority_queue)
    Contest Print Server
    k8s之证书签发(二)
    k8s环境之bind 9 (一)
  • 原文地址:https://www.cnblogs.com/softimagewht/p/2299542.html
Copyright © 2011-2022 走看看