Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Auto Object Script
- ;By Hellbent aka CivReborn https://www.youtube.com/user/CivReborn
- ;Written Nov 24th,2017
- #SingleInstance,Force
- CoordMode,Mouse,Screen
- Global Key_Input,Auto_Key_Amount:=5
- Gui,1:+AlwaysOnTop +LastFound
- Gui,1:Color,Teal,Black
- Gui,1:Font,cBlack s8 Bold Q5,Segoe UI
- Gui,1:Add,Edit,cBlack x10 y10 w800 r3 ReadOnly vOutput_Edit ,% Output_String
- Gui,1:Add,Groupbox,x10 y+5 w800 h100 Section ,Settings / ETC
- Gui,1:Add,ListBox,cWhite xs+10 ys+25 w120 r4 AltSubmit vOutType gDisplay_Output,Object||Object w/Strings|Array|Array w/Strings|Pipe List
- Gui,1:Add,Text,cLime x+10 ys+25 w30 ,Name:
- Gui,1:Add,Edit,cWhite x+10 yp-2 w100 r1 vName gDisplay_Output,
- Gui,1:Add,CheckBox,xs+140 y+20 vALT_Delimiter gDisplay_Output,| Delimiter
- Gui,1:Add,Groupbox,xs+300 ys+10 w125 h80 Section
- Gui,1:Add,CheckBox,xs+10 ys+20 vAuto_Keys gDisplay_Output,Auto Keys
- Gui,1:Add,Text,cLime xs+10 y+15,Amount:
- Gui,1:Add,Edit,cRed x+10 yp-2 w50 r1 vAuto_Key_Amount gDisplay_Output,% Auto_Key_Amount
- Gui,1:Add,CheckBox,x+30 ys+10 vTimer gTurn_On_Off_Timer,Turn On Transparency
- Gui,1:Add,Button,xs+390 ys+60 w100 r1 -Theme gClip_All,Clipboard
- Gui,1:Add,GroupBox,x10 y+15 w800 h80 Section ,Input
- Gui,1:Add,Text,cLime xs+10 ys+20 w35 ,Keys:
- Gui,1:Add,Edit,cWhite x+10 ys+18 w740 r1 vKey_Input gDisplay_Output
- Gui,1:Add,Text,cLime xs+10 y+10 w35 ,Value:
- Gui,1:Add,Edit,cWhite x+10 yp-2 w740 r1 vValue_Input gDisplay_Output
- Gui,1:Submit,NoHide
- Gui,1:Show,x540 y0 w820 h265, Auto Object 1
- return
- Turn_On_Off_Timer:
- Timer:=!Timer
- if(Timer)
- SetTimer,I_Want_To_See,100
- else {
- SetTimer,I_Want_To_See,-1
- }
- return
- I_Want_To_See:
- mouseGetPos,x1,y1
- WinGetPos,x2,y2,w2,h2,Auto Object 1
- if(x1>=x2&&x1<=x2+w2&&y1>=y2&&y1<=y2+h2)
- Winset,Transparent,255,Auto Object 1
- else
- winset,Transparent,20,Auto Object 1
- return
- GuiClose:
- GuiEscape:
- ExitApp
- Display_Output:
- Gui,1:Submit,NoHide
- GuiControl,1:Enable,Key_Input
- (ALT_Delimiter)?(Delimit:="|"):(Delimit:=" ")
- Quote = `"
- temp_Key:="",temp_Key:=[],temp_Value:="",temp_Value:=[]
- (OutType=1)?(S1:=Name ":= {",S2:=":",S3:=",",S4:=":",S5:="}" Run_Output(S1,S2,S3,S4,S5,"","1","0","0"))
- :(OutType=2)?(S1:=Name ":= {",S2:=":",S3:=",",S4:=":",S5:="}" Run_Output(S1,S2,S3,S4,S5,Quote,"1","0","0"))
- :(OutType=3)?(S1:=Name ":= [",S2:=",",S3:="]",S4:="",S5:="" Run_Output(S1,S2,S3,S4,S5,"","0","1","0"))
- :(OutType=4)?(S1:=Name ":= [",S2:=",",S3:="]",S4:="",S5:="" Run_Output(S1,S2,S3,S4,S5,Quote,"0","1","0"))
- :(OutType=5)?(S1:=Name ":= " Quote,S2:="|",S3:=Quote,S4:="",S5:="" Run_Output(S1,S2,S3,S4,S5,Quote,"0","1","1"))
- return
- Clip_All:
- sleep,20
- Clipboard:=Output_Edit
- return
- GuiContextMenu:
- Gui,1:Minimize
- return
- Run_Output(S1,S2,S3,S4,S5,EQ,FULL,DisableIt,Organ){
- global
- Output_Edit:=""
- if(DisableIt=1)
- GuiControl,1:Disable,Key_Input
- if(Full=1){
- if(Auto_Keys=0){
- Loop,Parse,Key_Input,% Delimit
- temp_Key[A_Index]:=A_LoopField
- }else {
- GuiControl,1:Disable,Key_Input
- Loop,% Auto_Key_Amount
- temp_Key[A_Index]:= A_Index
- }
- }
- Loop,Parse,Value_Input,% Delimit
- {
- if(Organ=0)
- temp_Value[A_Index]:=EQ A_LoopField EQ
- else
- temp_Value[A_Index]:= A_LoopField S2
- }
- Output_Edit.= S1
- (temp_Value.MaxIndex()>temp_Key.MaxIndex())?(Loop_Amount:=temp_Value.MaxIndex()):(Loop_Amount:=temp_Key.MaxIndex())
- Loop % Loop_Amount {
- if(Full=1){
- if(A_Index!=temp_Value.MaxIndex())
- Output_Edit.=temp_Key[A_Index] S2 temp_Value[A_Index] S3
- else
- Output_Edit.=temp_Key[A_Index] S4 temp_Value[A_Index] S5
- }else {
- if(Organ=0){
- if(A_Index!=temp_Value.MaxIndex())
- Output_Edit.=temp_Value[A_Index] S2
- else
- Output_Edit.= temp_Value[A_Index] S3
- }else {
- if(A_Index!=temp_Value.MaxIndex())
- Output_Edit.=temp_Value[A_Index]
- else
- Output_Edit.= temp_Value[A_Index] S3
- }
- }
- }
- GuiControl,1:,Output_Edit,% Output_Edit
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement