?? getconfiginfo.m
字號:
function [UserStr_1,UserStr_2]=GetConfigInfo(FileName_Config)
%配置上次使用過的目錄
UserStr_1='';
UserStr_2='';
Fid_Cfg=fopen(FileName_Config,'r');
if Fid_Cfg~=-1
while feof(Fid_Cfg)~=1
CurrentStr=fgetl(Fid_Cfg);
Tag_UserStr_1=findstr(CurrentStr,'UserPath_Open=');
Tag_UserStr_2=findstr(CurrentStr,'UserFile=');
if length(Tag_UserStr_1)>0
UserStr_1=CurrentStr((Tag_UserStr_1+14):length(CurrentStr));
if strcmp(UserStr_1(length(UserStr_1)),'\')~=1
UserStr_1(length(UserStr_1)+1)='\';
end
elseif length(Tag_UserStr_2)>0
UserStr_2=CurrentStr((Tag_UserStr_2+9):length(CurrentStr));
end
end
fclose(Fid_Cfg);
else
msgbox(strcat('配置文件:',FileName_Config,'缺失!'));
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -