百度空间 | 百度首页 
 
查看文章
 
Envi外挂写法
2009-07-27 15:44

今天和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:
PRO my_process_define_buttons, buttonInfo
;
; Define Buttons with ENVI_DEFINE_MENU_BUTTON
;
END

这几句详细讲了使用ENVI_DEFINE_MENU_BUTTON的规则。

总结:按钮定义Pro的命名最为关键:为,主程序名 + _define_buttons, buttonInfo

           解释:主程序:程序的入口,与Pro文件名同名的程序。


类别:idl实用大全 | 添加到搜藏 | 浏览() | 评论 (2)
 
最近读者:
 
网友评论:
1
2009-07-27 21:13 | 回复
你又转回来写外挂了?哈哈,这个是正统吧!
 
2
2009-08-13 09:33 | 回复
外挂好,好用,又官方。
 
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu