Advertisement
CivReborn

Auto Gui Control

Nov 2nd, 2017
950
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #SingleInstance,Force
  2. Control_List:=["Text","Edit","UpDown","Picture","Button","Checkbox"
  3. ,"Radio","DropDownList","ComboBox","ListBox","ListView","TreeView","Link"
  4. ,"Hotkey","DateTime","MonthCal","Slider","Progress","GroupBox","Tab3","StatusBar","ActiveX"]
  5. X_Pos:=10,Y_Pos:=10,Clip_Lock:=0,Row_Counter:=0,Control_Counter:=0
  6. Gui,1:+AlwaysOnTop
  7. Gui,1:Color,555555,Black
  8. Gui,1:Font,cWhite s10 Bold Q5, Segoe UI Black
  9. Gui,1:Add,GroupBox,x10 y5 w270 h60  Center Section ,Control Types
  10. k:=0,temp_list:=""
  11. for,i,j in Control_List
  12.     {
  13.         if(i=1)
  14.             temp_list.= j "||"
  15.         else
  16.             temp_list.= j "|"
  17.     }
  18. Gui,1:Add,DDl,xs+25 ys+25 w220 r15 AltSubmit vDDL_Item gSubmit_All,% temp_List
  19. Gui,1:Add,GroupBox,x10 y70 w270 h60  Center Section ,Options
  20. Gui,1:Add,Edit,xs+10 ys+25 w250 r1 vOptions gSubmit_All
  21. Gui,1:Add,GroupBox,x10 y135 w270 h90  Center Section ,Amount
  22. Gui,1:Add,Radio,xs+10 ys+25 w70 Checked Group vAdd_Amount gSubmit_All,Add 1
  23. Gui,1:Add,Radio,x+10  w70  gSubmit_All,Add 5
  24. Gui,1:Add,Radio,x+10  w70  gSubmit_All,Add 10
  25. Gui,1:Add,Radio,xs+50 yp+30 w70  gSubmit_All,Add ->
  26. Gui,1:Add,Edit,x+10 yp-2 w50 readonly
  27. Gui,1:Add,UpDown, vVar_Amount gSubmit_All Range1-25,2
  28. Gui,1:Add,Groupbox,x10 y230 w270 h100 Center Section ,Text && Position
  29. Gui,1:Add,Text,xs+10 ys+25 w250 h70 BackgroundTrans center,This is the "Light" Version of the auto insert Gui Tool To get Position and size options get the other version.
  30. Gui,1:Add,GroupBox,x10 y330 w270 h90  Center Section ,Output
  31. Gui,1:Add,CheckBox,xs+20 ys+25 vClip_Lock gUnlock_Clip,Unlock Clip
  32. Gui,1:Add,Text,xs+10 yp+25,Name:
  33. Gui,1:Add,Edit,x+10 w60 r1 vGui_Name gSubmit_All ,1
  34. Gui,1:Add,Button,xs+140 ys+30 w110 h40 Disabled vClipBoard_Button gAdd_Controls_To_Clipboard,Clipboard
  35. Gui,1:Show,,Hellbent's Auto Control
  36. Gui,1:Submit,NoHide
  37. return
  38. GuiClose:
  39.     ExitApp
  40. Submit_All:
  41.     Gui,1:Submit,NoHide
  42.     return
  43. Unlock_Clip:
  44.     Gui,1:Submit,NoHide
  45.     GuiControl,1:Enable,ClipBoard_Button
  46.     return
  47. Add_Controls_To_Clipboard:
  48.     Gui,1:Submit,NoHide
  49.     GuiControl,1:Disable,ClipBoard_Button
  50.     GuiControl,1:,Clip_Lock,0
  51.     Final_Output:=""
  52.     if(Add_Amount=1)
  53.         loop_count:=1
  54.     else if(Add_Amount=2)
  55.         loop_count:=5
  56.     else if(Add_Amount=3)
  57.         loop_count:=10
  58.     else if(Add_Amount=4)
  59.         loop_count:=Var_Amount
  60.     Loop % loop_count
  61.         {
  62.             Control_Counter++
  63.             Final_Output.= "Gui," GUI_Name ":Add," Control_List[DDL_Item] ",x" X_Pos " y" Y_Pos " w40 h40 " Options " v"Control_List[DDL_Item] "_" Control_Counter  " ,`n"
  64.             x_pos+=60
  65.             Row_Counter++
  66.             if(Row_Counter=10)
  67.                 Row_Counter:=0,x_Pos:=10,y_Pos+=60
  68.         }
  69.     Clipboard:= % Final_Output
  70.     return
  71. *^ESC::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement