Skip to content

Instantly share code, notes, and snippets.

@kumatti1
Created February 1, 2012 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kumatti1/1714772 to your computer and use it in GitHub Desktop.
Save kumatti1/1714772 to your computer and use it in GitHub Desktop.
VBA用idl変換
var FilePath = 'test2.txtへのパス';
var s = new ActiveXObject("Scripting.FileSystemObject").OpenTextFile(FilePath).ReadAll();
//WScript.Echo(s);
// carriage returnの削除
s = s.replace(/\r/g,'');
// WScript.Echo(s);
// 引数の属性
s = s.replace(/\[.*\]/g,'[in]');
// 引数の型と名前
s = s.replace(/\].*\b(\*+)?(\w+)(,?)/g,'] long $2$3');
// 結果
WScript.Echo(s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment