static void menu_cb_addToDynamicMenu (EDITOR_ARGS) { EDITOR_IAM (ScriptEditor); EDITOR_FORM (U"Add to dynamic menu", U"Add to dynamic menu...") WORD (U"Class 1", U"Sound") INTEGER (U"Number 1", U"0") WORD (U"Class 2", U"") INTEGER (U"Number 2", U"0") WORD (U"Class 3", U"") INTEGER (U"Number 3", U"0") SENTENCE (U"Command", U"Do it...") SENTENCE (U"After command", U"") INTEGER (U"Depth", U"0") LABEL (U"", U"Script file:") TEXTFIELD (U"Script", U"") EDITOR_OK if (my name [0]) SET_STRING (U"Script", my name) else SET_STRING (U"Script", U"(please save your script first)") EDITOR_DO praat_addActionScript (GET_STRING (U"Class 1"), GET_INTEGER (U"Number 1"), GET_STRING (U"Class 2"), GET_INTEGER (U"Number 2"), GET_STRING (U"Class 3"), GET_INTEGER (U"Number 3"), GET_STRING (U"Command"), GET_STRING (U"After command"), GET_INTEGER (U"Depth"), GET_STRING (U"Script")); praat_show (); EDITOR_END }
static void menu_cb_addToMenu (EDITOR_ARGS) { EDITOR_IAM (ScriptEditor); EDITOR_FORM (U"Add to menu", U"Add to fixed menu...") WORD (U"Window", U"?") SENTENCE (U"Menu", U"File") SENTENCE (U"Command", U"Do it...") SENTENCE (U"After command", U"") INTEGER (U"Depth", U"0") LABEL (U"", U"Script file:") TEXTFIELD (U"Script", U"") EDITOR_OK if (my editorClass) SET_STRING (U"Window", my editorClass -> className) if (my name [0]) SET_STRING (U"Script", my name) else SET_STRING (U"Script", U"(please save your script first)") EDITOR_DO praat_addMenuCommandScript (GET_STRING (U"Window"), GET_STRING (U"Menu"), GET_STRING (U"Command"), GET_STRING (U"After command"), GET_INTEGER (U"Depth"), GET_STRING (U"Script")); praat_show (); EDITOR_END }
static void menu_cb_addToFixedMenu (ScriptEditor me, EDITOR_ARGS_FORM) { EDITOR_FORM (U"Add to fixed menu", U"Add to fixed menu..."); RADIO (U"Window", 1) RADIOBUTTON (U"Objects") RADIOBUTTON (U"Picture") SENTENCE (U"Menu", U"New") SENTENCE (U"Command", U"Do it...") SENTENCE (U"After command", U"") INTEGER (U"Depth", U"0") LABEL (U"", U"Script file:") TEXTFIELD (U"Script", U"") EDITOR_OK if (my name [0]) SET_STRING (U"Script", my name) else SET_STRING (U"Script", U"(please save your script first)") EDITOR_DO praat_addMenuCommandScript (GET_STRING (U"Window"), GET_STRING (U"Menu"), GET_STRING (U"Command"), GET_STRING (U"After command"), GET_INTEGER (U"Depth"), GET_STRING (U"Script")); praat_show (); EDITOR_END }