查看文章 |
今天和QQZ讨论Envi外挂的东西,小有收获。 细说:给Envi写外挂是最简单的Envi二次开发方式,怎么操作? 背景知识:http://hi.baidu.com/dyqwrp/blog/item/5b6c6ac45edbf6a18326ac7a.html Envi 帮助:ENVI_DEFINE_MENU_BUTTON, 看Example 如何运行Example? 直接把Example拷贝到IDLE,保存编译后Save,放到Save_Add,那是啥效果也没有的 怎么回事??Envi的帮助里,关于这个ENVI_DEFINE_MENU_BUTTON,在最前面有这么几句: Use this procedure to add menu items (buttons) to the ENVI menu system from a user-defined procedure in a .pro or .sav file within the save_add directory. The .pro or .sav file must contain a procedure named filename_define_buttons, where filename is the name of that file. For instance, if the file in the save_add directory is named my_process.pro, a procedure named my_process_define_buttons.pro should be in that file to allow you to add buttons to the ENVI menu system. The filename_define_buttons procedure has only one argument and no keywords, as shown in the following example code: 这几句详细讲了使用ENVI_DEFINE_MENU_BUTTON的规则。 总结:按钮定义Pro的命名最为关键:为,主程序名 + _define_buttons, buttonInfo 解释:主程序:程序的入口,与Pro文件名同名的程序。 |
