flag:=0 show_x:=A_ScreenWidth-400 Gui Font, s16 c0D0D0D Loop,10 { Gui add,edit, v_Input%A_Index% g_Input x10 y10 h550 w200 -VScroll Gui add,edit,v_Output%A_Index% h64 w200 -VScroll } gosub hideall Gui Add, Tab, x230 y10 w50 vmytab gmytab Wrap Buttons , 1|2|3|4|5|6|7|8|9|10 Gui +AlwaysOnTop -Disabled +border Gui show,x%show_x% y0 h660,简单累加器 guiControl show ,_Input1 guiControl show ,_Output1 Return _Input: If flag=0 { ctrl_in = _Input1 ctrl_out= _output1 } Else { ctrl_in = _Input%mytab% ctrl_out= _output%mytab% } temp=0 GuiControlGet, %ctrl_in% Loop ,parse, %ctrl_in%,`n { EnvAdd, temp, A_LoopField } GuiControl text,%ctrl_out%,%temp% GuiControl text,%ctrl_out%,%temp% Return GuiClose: Gui destroy ExitApp mytab: Gui Submit, NoHide Gosub hideall GuiControl Show ,_Input%mytab% GuiControl Show ,_output%mytab% flag:=1 Return hideall: Loop,10 { GuiControl hide ,_Input%A_index% GuiControl hide ,_output%A_index% } Return