Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save milligramme/ce8d8ea46e10d5d61228 to your computer and use it in GitHub Desktop.

Select an option

Save milligramme/ce8d8ea46e10d5d61228 to your computer and use it in GitHub Desktop.
// app.menus.item("文字のコンテキストメニュー").menuItems.add(app.menuActions.item("分割禁止"));
// https://twitter.com/chalcedony/status/676968834058870784
$.writeln(app.findKeyStrings("文字のコンテキストメニュー"));
$.writeln(app.findKeyStrings("分割禁止"));
//=> $ID/RtMouseText
//=> $ID/no break,$ID/No Breaks Word/Rtf,$ID/No Breaks,$ID/Apply no break
try {
app.menus.item("$ID/RtMouseText").menuItems.add(app.menuActions.item("$ID/no break"));
app.menus.item("$ID/RtMouseText").menuItems.add(app.menuActions.item("$ID/No Breaks Word/Rtf"));
app.menus.item("$ID/RtMouseText").menuItems.add(app.menuActions.item("$ID/No Breaks"));
app.menus.item("$ID/RtMouseText").menuItems.add(app.menuActions.item("$ID/Apply no break"));
}
catch(x_x){
$.writeln([
x_x.message,
x_x.line,
$.stack,
].join("\n"));
}
app.menus.item("$ID/RtMouseText").menuItems[-1].remove();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment