「テーマの自動変更」の版間の差分
| 79行目: | 79行目: | ||
// Mery.ini を探す | // Mery.ini を探す | ||
var iniPath = editor.FullName.replace(/\.exe$/i, ".ini"); | var iniPath = editor.FullName.replace(/\.exe$/i, ".ini"); | ||
if (! (new ActiveXObject("Scripting.FileSystemObject")).FileExists(iniPath)){ | if(! (new ActiveXObject("Scripting.FileSystemObject")).FileExists(iniPath)){ | ||
var iniName = /\\([^\\]+)\.exe$/.exec(editor.FullName)[1]; | var iniName = /\\([^\\]+)\.exe$/.exec(editor.FullName)[1]; | ||
iniPath = (new ActiveXObject( "WScript.Shell" )).SpecialFolders("APPDATA") + "\\Mery\\" + iniName + ".ini"; | iniPath = (new ActiveXObject("WScript.Shell")).SpecialFolders("APPDATA") + "\\Mery\\" + iniName + ".ini"; | ||
} | } | ||
// Mery.ini を読みこむ | // Mery.ini を読みこむ | ||
| 92行目: | 92行目: | ||
adodb.Close(); | adodb.Close(); | ||
var start = iniText.search(new RegExp( "^\\[" + sectionName.replace(/\W/g, "\\$&") + "\\]$", "m" )); | var start = iniText.search(new RegExp("^\\[" + sectionName.replace(/\W/g, "\\$&") + "\\]$", "m")); | ||
if(start >= 0){ | if(start >= 0){ | ||
start = start + sectionName.length + 4; | start = start + sectionName.length + 4; | ||
スポンサーリンク