############################################################## # Toolbar buttons ############################################################## [TButton].onload add_tooltip TButton1 "(not implemented) Configure Launcher-specific parameters" #FF0000 #FFFFFF add_tooltip TButton2 "Edit .ini file $i" #FFFF00 #0000ff get_directory "$(script_fullpath)" dir_name get_filebody "$(script_fullpath)" filebody join_path log_path "$(dir_name)" "$(filebody)-out.txt" add_tooltip TButton3 "Edit log file $(log_path)" #FFFF00 #0000ff add_tooltip TButton4 "Restart the current Launcher.py" #FFFF00 #0000ff add_tooltip TButton5 "Other Launhcer booting options" #FFFF00 #0000ff #create_menu hmenu "title=aaa"\ # "label=abc" "command=echo abc"\ # "label=def" "command=echo def"\ # "label=leave menu" "command=End" #add_context_menu hmenu 0 End [TButton1] Caption=Setup details copy_config2scars new_dialog #==================== # Font size #==================== add_dialog message\ dummy\ "relief=raised"\ fg=blue\ bg=white\ width=500\ "text=Font sizes" add_dialog frame dummy "relief=groove" add_dialog entry \ config.default_font_size\ "label_head=default_font_size:"\ width=3\ "def_val=14"\ "label_tail=" add_dialog entry \ config.font_size\ "label_head=font_size:"\ width=3\ "def_val=10"\ "label_tail=" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog entry \ config.path_frame_font_size\ "label_head=path_frame_font_size:"\ width=3\ "def_val=8"\ "label_tail=" add_dialog pack_frame dummy #==================== # Number of buttons #==================== add_dialog message\ dummy\ "relief=raised"\ fg=blue\ bg=white\ width=500\ "text=Number of buttons" add_dialog frame dummy "relief=groove" add_dialog entry \ config.n_tbutton\ "label_head=Toolbar buttons:"\ width=10\ "def_val="\ "label_tail=" add_dialog pack_frame dummy #==================== # Right buttons #==================== add_dialog message\ dummy\ "relief=raised"\ fg=blue\ bg=white\ width=500\ "text=Right buttons" add_dialog frame dummy "relief=groove" add_dialog entry \ config.width_rbutton\ "label_head=width:"\ width=3\ "def_val=10"\ "label_tail=" add_dialog entry \ config.n_rbutton\ "label_head=Number of rbuttons:"\ width=3\ "def_val=7"\ "label_tail=" add_dialog pack_frame dummy #==================== # Listbox #==================== add_dialog message\ dummy\ "relief=raised"\ fg=blue\ bg=white\ width=500\ "text=Listbox geometry" add_dialog frame dummy "relief=groove" add_dialog entry \ config.width_listbox\ "label_head=width:"\ width=3\ "def_val=10"\ "label_tail=" add_dialog entry \ config.height_listbox\ "label_head=height:"\ width=3\ "def_val=15"\ "label_tail=" add_dialog pack_frame dummy #==================== # Submenu buttons #==================== add_dialog message\ dummy\ "relief=raised"\ fg=blue\ bg=white\ width=500\ "text=Submenu buttons" add_dialog frame dummy "relief=groove" add_dialog entry \ config.width_submenu_button\ "label_head=width:"\ width=3\ "def_val=18"\ "label_tail=" add_dialog entry \ config.nx_button\ "label_head=nx:"\ width=3\ "def_val=3"\ "label_tail=" add_dialog entry \ config.ny_button\ "label_head=ny:"\ width=3\ "def_val=7"\ "label_tail=" add_dialog pack_frame dummy #==================== # Help button #==================== add_dialog message\ dummy\ "relief=raised"\ fg=blue\ bg=white\ width=500\ "text=Help button" add_dialog frame dummy "relief=groove" add_dialog entry \ config.width_help_button\ "label_head=width:"\ width=3\ "def_val=3"\ "label_tail=" add_dialog entry \ config.height_help_button\ "label_head=height:"\ width=3\ "def_val=1"\ "label_tail=" add_dialog entry \ config.help_button_font_size\ "label_head=font size:"\ width=3\ "def_val=8"\ "label_tail=" add_dialog pack_frame dummy add_dialog frame dummy "bg=blue" "relief=groove" add_dialog button dummy "text=Setup(general)" "command=setup" add_dialog pack_frame dummy add_dialog message\ dummy\ "relief=raised"\ fg=red\ bg=white\ width=500\ size=18\ weight=bold\ "text=Changes will be applied upon reboot" custom_dialog "Setup (detailed)" okcancel eval config.n_buttons "$(config.nx_button) * $(config.ny_button)" echo $(config.n_buttons) = $(config.nx_button) * $(config.ny_button) copy_svars2config End [TButton2] Caption=Edit ini file save_config $(start) "$(editor_path)" "$i" End [TButton3] Caption=log get_directory "$(script_fullpath)" dir_name get_filebody "$(script_fullpath)" filebody join_path log_path "$(dir_name)" "$(filebody)-out.txt" $(start) "$(editor_path)" "$(log_path)" End [TButton4] Caption=Restart Call [TButton_reboot_C] End [TButton_reboot_C] save_config $(start_cmd_C) $(python_path) $(script_fullpath) -s=$(script_list_name) Bye End [TButton_reboot_K] save_config $(start_cmd_K) $(python_path) $(script_fullpath) -s=$(script_list_name) Bye End [TButton_Launcher_Main] $(start) "$(python_path)" "$(script_fullpath)" End [TButton_Launcher_All] $(start) "$(python_path)" "$(script_fullpath)" -s=All End [TButton_Launcher_Electrical] Caption=Electrical/Launcher.py join_path app_path "$(tkprog_X_path)" electrical check_exist $(app_path) "[$(app_path)] が見つかりません。インストールしてください" join_path list_path "$(tkprog_X_path)" Launcher scripts Electrical.list check_exist $(list_path) "[$(list_path)] が見つかりません。インストールしてください" $(start) "$(python_path)" "$(script_fullpath)" -s=Electrical End TButton_Launcher_VASP] join_path app_path "$(tkprog_X_path)" VASP check_exist $(app_path) "[$(app_path)] が見つかりません。インストールしてください" join_path list_path "$(tkprog_X_path)" Launcher scripts VASP.list check_exist $(list_path) "[$(list_path)] が見つかりません。インストールしてください" $(start) "$(python_path)" "$(script_fullpath)" -s=VASP End [TButton_Launcher_CMS] join_path app_path "$(tkprog_X_path)" Launcher check_exist $(app_path) "[$(app_path)] が見つかりません。インストールしてください" join_path list_path "$(tkprog_X_path)" Launcher scripts CMS2023.list check_exist $(list_path) "[$(list_path)] が見つかりません。インストールしてください" $(start) "$(python_path)" "$(script_fullpath)" -s=CMS2023 End [TButton_Launcher_Tutorial2022] join_path app_path "$(tkprog_X_path)" Launcher check_exist $(app_path) "[$(app_path)] が見つかりません。インストールしてください" join_path list_path "$(tkprog_X_path)" Launcher scripts tutorial2022.list check_exist $(list_path) "[$(list_path)] が見つかりません。インストールしてください" $(start) "$(python_path)" "$(script_fullpath)" -s=tutorial2022 End [TButton_Launcher_exe] join_path app_path "$(tkprog_path)" Launcher.exe check_exist $(app_path) "[$(app_path)] が見つかりません。インストールしてください" join_path app_path "$(tkprog_path) "Launcher.exe $(start) "$(app_path)" End [TButton_Launcher_pl] join_path launcher_dir "$(tkprog_path)" Perl Launcher chdir $(launcher_dir) join_path app_path "$(launcher_dir)" Launcher.pl check_exist $(app_path) "[$(app_path)] が見つかりません。インストールしてください" use_os_path_sep perl_path join_path app_path "$(tkprog_path)" Perl Launcher Launcher.pl $(start_cmd) "$(perl_path)" "$(app_path)" End [TButton_TkPlotLauncher_pl] join_path app_path $(tkprog_X_path) TkPlot TkPlotLauncher.pl check_exist $(app_path) "[$(app_path)] が見つかりません。インストールしてください" $(start_cmd) $(perl_path) $(app_path) End [TButton_Reload] load_menu End [TButton5] Caption=Boot new_dialog add_dialog frame dummy "relief=groove" add_dialog button dummy "label_head=Restart:" "text=Restart" "command=call [TButton_reboot_C]" add_dialog button dummy "text=Restart(/K)" "command=call [TButton_reboot_K]" add_dialog button dummy "text=Reload" "command=call [TButton_Reload]" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog button dummy "label_head=Launcher:" "text=Main/Launcher.py" "command=call [TButton_Launcher_Main]" add_dialog button dummy "text=All/Launcher.py" "command=call [TButton_Launcher_All]" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog button dummy "label_head=Launcher:" "text=Electrical" "command=call [TButton_Launcher_Electrical]" add_dialog button dummy "text=VASP" "command=call [TButton_Launcher_VASP]" #add_dialog button dummy "text=CMS" "command=call [TButton_Launcher_CMS]" add_dialog button dummy "text=Tutorial2022" "command=call [TButton_Launcher_Tutorial2022]" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog button dummy "label_head=Old Launcher:" "text=Launcher.exe" "command=call [TButton_Launcher_exe]" add_dialog button dummy "text=Launcher.pl" "command=call [TButton_Launcher_pl]" add_dialog button dummy "text=TkPlotLauncher.pl" "command=call [TButton_TkPlotLauncher_pl]" add_dialog pack_frame dummy add_dialog message\ dummy\ "relief=raised"\ width=1000\ fg=red\ "text=Launcher制御" add_dialog frame dummy "relief=groove" add_dialog button dummy "text=debug mode" "command=call [RButton_debug_mode]" add_dialog button dummy "text=confirm mode" "command=call [RButton_help_confirm_mode]" add_dialog button dummy "text=TopMost mode" "command=call [RButton_help_topmost_mode]" add_dialog pack_frame dummy custom_dialog "Help" close ############################################################## [RButton].onload add_tooltip RButton1 "Run terminal app $(shell_path)" #FFFF00 #0000ff add_tooltip RButton2 "Run filer app $(filer_path)" #FFFF00 #0000ff add_tooltip RButton3 "Run editor $(editor_path)" #FFFF00 #0000ff add_tooltip RButton4 "Edit the selected script file" #FFFF00 #0000ff add_tooltip RButton5 "Edit system files" #FFFF00 #0000ff add_tooltip RButton6 "Not assigned" #FFFF00 #0000ff add_tooltip RButton7 "Show help URLs/files" #FFFF00 #0000ff End [RButton1] Caption=cmd.exe chdir "$(section_root_dir)" $(start) "$(shell_path)" End [RButton2] Caption=Explorer chdir "$(section_root_dir)" get_cur_dir cur_dir $(start) "$(filer_path)" $(cur_dir) End [RButton3] Caption=Editor chdir "$(section_root_dir)" $(start) "$(editor_path)" End [RButton4] Caption=Edit script call [RButton_edit_script] End [RButton_Edit_System_Files] new_dialog add_dialog frame dummy "relief=groove" add_dialog button dummy "label_head=edit script:" "text=current script" "command=call [RButton_edit_script]" add_dialog button dummy "text=script list" "command=call [RButton_edit_script_list]" add_dialog button dummy "text=Boot.ini" "command=call [RButton_edit_Boot]" add_dialog button dummy "text=RButton.ini" "command=call [RButton_edit_RButton]" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog button dummy "label_head=edit source:" "text=Launcher.py" "command=call [RButton_edit_Launcher_py]" add_dialog button dummy "text=tkLauncherApp.py" "command=call [RButton_edit_tkLauncherApp_py]" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog button dummy "label_head=edit iniedit.py:" "text=" "command=" add_dialog button dummy "text=iniedit.py" "command=call [RButton_edit_iniedit_py]" add_dialog button dummy "text=text.ini" "command=call [RButton_edit_iniedit_text_ini]" add_dialog button dummy "text=color.ini" "command=call [RButton_edit_iniedit_color_ini]" add_dialog pack_frame dummy join_path dir_path $(tkProg_Root) tklib python tklib get_file_list files_tklib $(dir_path) *.py set file_path_tklib=tkapplication.py add_dialog combobox\ file_path_tklib\ label_head=tklib:\ width=30\ height=15\ init_val=$(file_path_tklib)\ values=$(files_tklib)##tkgui/tkapplication_gui.py##tkgui/tktkinter.py\ button1_text=edit\ "button1_command=call [edit_tklib]"\ label_tail= add_dialog frame dummy "relief=groove" add_dialog button dummy "label_head=edit resource:" "text=ja" "command=call [RButton_edit_resource_ja]" add_dialog button dummy "text=en" "command=call [RButton_edit_resource_en]" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog button dummy "label_head=edit system:" "text=ini file" "command=call [RButton_edit_ini_file]" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog button dummy "label_head=explorer:" "text=tklib" "command=call [RButton_explorer_tklib]" add_dialog button dummy "text=tkgui" "command=call [RButton_explorer_tkgui]" add_dialog button dummy "text=tkgraphic" "command=call [RButton_explorer_tkgraphic]" add_dialog button dummy "text=tksci" "command=call [RButton_explorer_tksci]" add_dialog button dummy "text=tkcrystal" "command=call [RButton_explorer_tkcrystal]" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog button dummy "label_head=explorer:" "text=Launcher" "command=call [RButton_explorer_launcher]" add_dialog button dummy "text=scripts" "command=call [RButton_explorer_scripts]" add_dialog button dummy "text=resource" "command=call [RButton_explorer_resource]" add_dialog pack_frame dummy custom_dialog "Edit system files" close End [edit_tklib] join_path file_path $(tkProg_Root) tklib python tklib $(file_path_tklib) $(start) "$(editor_path)" "$(file_path)" End [RButton_edit_iniedit_py] join_path file_path $(tkprog_X_path) editor iniedit.py $(start) "$(editor_path)" "$(file_path)" End [RButton_edit_iniedit_text_ini] join_path file_path $(tkprog_X_path) editor text.ini $(start) "$(editor_path)" "$(file_path)" End [RButton_edit_iniedit_color_ini] join_path file_path $(tkprog_X_path) editor color.ini $(start) "$(editor_path)" "$(file_path)" End [RButton_edit_Launcher_py] join_path file_path $(tkprog_X_path) Launcher Launcher.py $(start) "$(editor_path)" "$(file_path)" End [RButton_edit_tkLauncherApp_py] join_path file_path $(tkprog_X_path) Launcher tkLauncherApp.py $(start) "$(editor_path)" "$(file_path)" End [RButton_explorer_launcher] join_path dir_path $(tkprog_X_path) Launcher $(start) "$(filer_path)" "$(dir_path)" End [RButton_explorer_scripts] join_path dir_path $(tkprog_X_path) Launcher scripts $(start) "$(filer_path)" "$(dir_path)" End [RButton_explorer_resource] join_path dir_path $(tkprog_X_path) Launcher resource $(start) "$(filer_path)" "$(dir_path)" End [RButton_explorer_tklib] join_path dir_path $(pythonlib_path) tklib $(start) "$(filer_path)" "$(dir_path)" End [RButton_explorer_tkgui] join_path dir_path $(pythonlib_path) tklib tkgui $(start) "$(filer_path)" "$(dir_path)" End [RButton_explorer_tkgraphic] join_path dir_path $(pythonlib_path) tklib tkgraphic $(start) "$(filer_path)" "$(dir_path)" End [RButton_explorer_tksci] join_path dir_path $(pythonlib_path) tklib tksci $(start) "$(filer_path)" "$(dir_path)" End [RButton_explorer_tkcrystal] join_path dir_path $(pythonlib_path) tklib tkcrystal $(start) "$(filer_path)" "$(dir_path)" End [RButton_edit_ini_file] $(start) "$(editor_path)" "$i" End [RButton_edit_Boot] join_path file_path $(tkprog_X_path) Launcher scripts 3-000-Boot.ini $(start) "$(editor_path)" "$(file_path)" End [RButton_edit_RButton] join_path file_path $(tkprog_X_path) Launcher scripts 3-001-RButton.ini $(start) "$(editor_path)" "$(file_path)" End [RButton_edit_script] get_cur_menu_file menu_file #$(start) "$(editor_path)" "$(menu_file)" $(start) $(inifile_editor) "$(menu_file)" End [RButton_edit_script_list] $(start) "$(editor_path)" "$(script_list_path)" End [RButton_edit_resource_ja] join_path file_path $(tkprog_X_path) Launcher resource resource_ja.resource $(start) "$(editor_path)" "$(file_path)" End [RButton_edit_resource_en] join_path file_path $(tkprog_X_path) Launcher resource resource_en.resource $(start) "$(editor_path)" "$(file_path)" End [RButton5] Caption=Edit system files call [RButton_Edit_System_Files] End [RButton_Help] Caption=Help new_dialog add_dialog message\ dummy\ "relief=raised"\ width=1000\ fg=red\ "text=Manual" add_dialog frame dummy "relief=groove" add_dialog button dummy "text=web video" "command=$(start) http://d2mate.mdxes.iir.isct.ac.jp/D2MatE/tkProg/tkProg.html" add_dialog button dummy "text=Launcher manual(web)" "command=call [RButton_edit_help_manual_web]" add_dialog button dummy "text=Manual(pptx)" "command=call [RButton_help_manual_pptx]" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog button dummy "text=Manual(txt)" "command=call [RButton_help_manual_txt]" add_dialog button dummy "text=Syntax(.xlsx)" "command=call [RButton_help_syntax_xlsx]" add_dialog button dummy "text=programming(web)" "command=call [RButton_help_launcher_programming_web]" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog button dummy "text=Install(web)" "command=call [RButton_help_install_web]" add_dialog button dummy "text=Update Inf" "command=call [RButton_help_update_inf]" add_dialog pack_frame dummy add_dialog frame dummy "relief=groove" add_dialog button dummy "text=User ini" "command=call [RButton_help_user_ini]" add_dialog button dummy "text=How to report bugs" "command=call [RButton_help_report_bugs]" add_dialog pack_frame dummy add_dialog message\ dummy\ "relief=raised"\ width=1000\ fg=red\ "text=Launcher制御" add_dialog frame dummy "relief=groove" add_dialog button dummy "text=debug mode" "command=call [RButton_debug_mode]" add_dialog button dummy "text=confirm mode" "command=call [RButton_help_confirm_mode]" add_dialog button dummy "text=TopMost mode" "command=call [RButton_help_topmost_mode]" add_dialog pack_frame dummy custom_dialog "Help" close End [RButton7] Caption=Help call [RButton_Help] End [RButton_help_user_ini] show_window NoTopMost set ini_path=$(tkProg_Root)\ini use_os_path_sep ini_path message_dialog python GUIプログラムでユーザ別設定ファイルを使用する場合は$n\ $(ini_path) ディレクトリィを作成した後、プログラムを起動してください。$n\ $(ini_path) いかに、ログインアカウント名を含めた.iniファイルが作成されます End [RButton_help_report_bugs] join_path file_path $(tkprog_X_path) docs 30-03-Tutorial-HowToReportProblems.pptx $(start) $(file_path) End [RButton_debug_mode] new_dialog add_dialog message\ dummy\ "relief=raised"\ width=700\ "text=Deubg on にすると、スクリプト実行時にコンソールに詳細な情報を表示します" add_dialog frame dummy "bg=blue" "relief=groove" add_dialog button dummy "text=debug on" "command=call [Debug_on]" add_dialog button dummy "text=debug off" "command=call [Debug_off]" add_dialog pack_frame dummy add_dialog message\ dummy\ "relief=raised"\ width=1000\ fg=red\ "text=OKを押すと、何もせずにLauncher画面に戻ります" custom_dialog Debug mode End [Debug_on] debug on End [Debug_off] debug off End [RButton_help_launcher_programming_web] $(start) $(web_root)/Launcher/Launcher-programming.html End [RButton_help_install_web] $(start) http://conf.msl.titech.ac.jp/D2MatE/D2MatE_programs.html End [RButton_edit_help_manual_web] $(start) http://conf.msl.titech.ac.jp/D2MatE/Launcher/Launcher-manual.html End [RButton_help_manual_txt] join_path file_path $(tkprog_X_path) Launcher docs launcher.txt $(start) "$(editor_path)" "$(file_path)" End [RButton_help_manual_pptx] join_path pptx_path $(tkprog_X_path) docs 10-20-Launcher.pptx $(start) "$(pptx_path)" End [RButton_help_syntax_xlsx] join_path file_path $(tkprog_X_path) Launcher docs Launcher-syntax.xlsx $(start) "$(file_path)" End [RButton_help_update_inf] show_window NoTopMost $(start) "$(editor_path)" "$(tkprog_x_path)/UpdateInformation.txt" End [RButton_help_confirm_mode] new_dialog add_dialog message\ dummy\ "relief=raised"\ width=700\ "text=Confirm on にすると、外部プログラム実行時に確認ダイアログを表示します" add_dialog frame dummy "bg=blue" "relief=groove" add_dialog button dummy "text=debug on" "command=call [Confirm_on]" add_dialog button dummy "text=debug off" "command=call [Confirm_off]" add_dialog pack_frame dummy add_dialog message\ dummy\ "relief=raised"\ width=1000\ fg=red\ "text=OKを押すと、何もせずにLauncher画面に戻ります" custom_dialog Confirm mode End [Confirm_on] confirm on End [Confirm_off] confirm off End [RButton_help_topmost_mode] new_dialog add_dialog message\ dummy\ "relief=raised"\ width=700\ "text=Always top on にすると、Launcherを常に前面に表示します" add_dialog frame dummy "bg=blue" "relief=groove" add_dialog button dummy "text=debug on" "command=call [Always_top_on]" add_dialog button dummy "text=debug off" "command=call [Always_top_off]" add_dialog pack_frame dummy add_dialog message\ dummy\ "relief=raised"\ width=1000\ fg=red\ "text=OKを押すと、何もせずにLauncher画面に戻ります" custom_dialog TopMost mode End [Always_top_on] show_window TopMost End [Always_top_off] show_window NoTopMost End