; Define spacing and positioning for a 3-column layout column1_x := 10 column2_x := 250 column3_x := 500 y_offset := 30 initial_y := 10 button_width := 60 ; Column 1: Modems and Router Gui, Add, Text, % "x" column1_x " y" initial_y, Phone Modem: Gui, Add, Edit, % "x" column1_x " y" (initial_y + y_offset) " vPhoneModem w160", ; Edit box for Phone Modem Gui, Add, Button, % "x" (column2_x - button_width - 10) " y" (initial_y + y_offset) " w" button_width " gCopyPhoneModem", Copy ; Copy button for Phone Modem Gui, Add, Text, % "x" column1_x " y" (initial_y + 2 * y_offset), Second Phone Modem: Gui, Add, Edit, % "x" column1_x " y" (initial_y + 3 * y_offset) " vSecondPhoneModem w160", ; Edit box for Second Phone Modem Gui, Add, Button, % "x" (column2_x - button_width - 10) " y" (initial_y + 3 * y_offset) " w" button_width " gCopySecondPhoneModem", Copy ; Copy button for Second Phone Modem Gui, Add, Text, % "x" column1_x " y" (initial_y + 4 * y_offset), Internet Modem: Gui, Add, Edit, % "x" column1_x " y" (initial_y + 5 * y_offset) " vInternetModem w160", ; Edit box for Internet Modem Gui, Add, Button, % "x" (column2_x - button_width - 10) " y" (initial_y + 5 * y_offset) " w" button_width " gCopyInternetModem", Copy ; Copy button for Internet Modem Gui, Add, Text, % "x" column1_x " y" (initial_y + 6 * y_offset), Second Internet Modem: Gui, Add, Edit, % "x" column1_x " y" (initial_y + 7 * y_offset) " vSecondInternetModem w160", ; Edit box for Second Internet Modem Gui, Add, Button, % "x" (column2_x - button_width - 10) " y" (initial_y + 7 * y_offset) " w" button_width " gCopySecondInternetModem", Copy ; Copy button for Second Internet Modem Gui, Add, Text, % "x" column1_x " y" (initial_y + 8 * y_offset), Router: Gui, Add, Edit, % "x" column1_x " y" (initial_y + 9 * y_offset) " vRouter w160", ; Edit box for Router Gui, Add, Button, % "x" (column2_x - button_width - 10) " y" (initial_y + 9 * y_offset) " w" button_width " gCopyRouter", Copy ; Copy button for Router ; Column 2: Cable Boxes 1-5 Loop, 5 { Gui, Add, Text, % "x" column2_x " y" (initial_y + (A_Index - 1) * 2 * y_offset), % "Cable Box #" A_Index ":" Gui, Add, Edit, % "x" column2_x " y" (initial_y + (A_Index * 2 - 1) * y_offset) " vCableBox" A_Index " w160", ; Edit box for each Cable Box Gui, Add, Button, % "x" (column3_x - button_width - 10) " y" (initial_y + (A_Index * 2 - 1) * y_offset) " w" button_width " gCopyCableBox" A_Index, Copy ; Copy button for each Cable Box } ; Column 3: Cable Boxes 6-10 Loop, 5 { BoxNumber := A_Index + 5 Gui, Add, Text, % "x" column3_x " y" (initial_y + (A_Index - 1) * 2 * y_offset), % "Cable Box #" BoxNumber ":" Gui, Add, Edit, % "x" column3_x " y" (initial_y + (A_Index * 2 - 1) * y_offset) " vCableBox" BoxNumber " w160", ; Edit box for each Cable Box Gui, Add, Button, % "x" (column3_x + 210) " y" (initial_y + (A_Index * 2 - 1) * y_offset) " w" button_width " gCopyCableBox" BoxNumber, Copy ; Copy button for each Cable Box } ; Submit and Reset Buttons at the bottom Gui, Add, Button, % "x" column1_x " y" (initial_y + 10 * y_offset) " gResetAll", Reset All ; Reset All button Gui, Show,, New Equipment List ; Show the GUI return ; Define the Copy actions for each field CopyPhoneModem: GuiControlGet, PhoneModem Clipboard := PhoneModem return CopySecondPhoneModem: GuiControlGet, SecondPhoneModem Clipboard := SecondPhoneModem return CopyInternetModem: GuiControlGet, InternetModem Clipboard := InternetModem return CopySecondInternetModem: GuiControlGet, SecondInternetModem Clipboard := SecondInternetModem return CopyRouter: GuiControlGet, Router Clipboard := Router return ; Copy actions for the Cable Boxes 1-10 CopyCableBox1: CopyCableBox2: CopyCableBox3: CopyCableBox4: CopyCableBox5: CopyCableBox6: CopyCableBox7: CopyCableBox8: CopyCableBox9: CopyCableBox10: StringTrimLeft, BoxNum, A_ThisLabel, 11 GuiControlGet, CableBoxContent, , CableBox%BoxNum% Clipboard := CableBoxContent return ; Reset All fields ResetAll: GuiControl,, PhoneModem ; Clear Phone Modem GuiControl,, SecondPhoneModem ; Clear Second Phone Modem GuiControl,, InternetModem ; Clear Internet Modem GuiControl,, SecondInternetModem ; Clear Second Internet Modem GuiControl,, Router ; Clear Router ; Clear all 10 Cable Boxes Loop, 10 { GuiControl,, CableBox%A_Index% ; Clear each Cable Box } return GuiClose: ExitApp