LoginSignup
0
0

More than 3 years have passed since last update.

サクラエディタのマクロ Visual Studio unsafe対応 by VinceHeart

Posted at

サクラエディタのマクロ Visual Studio unsafe対応

addDot.js
// クリップボードのテキストを取得
var ClipboardText = GetClipboard();
// 選択範囲のテキストを取得
var text = Editor.GetSelectedString(0);
// 変換後のテキストを出力
if ( text !== '' ) {
text = text + ', sizeof( ' + text + ' )';
Editor.InsText(text);
}

replace.js
// 選択範囲のテキストを取得
var text = Editor.GetSelectedString(0);
// 変換後のテキストを出力
if ( text !== '' ) {
if ( ( text === 'strtok' ) ||
( text === 'swprint' ) ||
( text === 'wsprint' ) ) {
text = text + '_s';
} else {
text = 'sizeof( ' + text + ' )';
}
Editor.InsText(text);
}

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0