I have a tool that I use almost daily to create lists, arrays, and objects.
With it you can just select the image and press ctrl+c to add it to an array, list or object and then paste it into your script.
Code: Select all
;Old pastes ;PasteBin Save: https://pastebin.com/4vJ9MhYT ;Version 1.2
;Version 1.4 Paste: https://pastebin.com/nD3JQ0G1 ;Nov 26th, 2017
#SingleInstance,Force
CoordMode,Mouse,Screen
Global Key_Input,Auto_Key_Amount:=5,Ax:=600,Ay:=200
Gui,1:+AlwaysOnTop +LastFound
Gui,1:Color,Teal,Black
Gui,1:Font,cBlack s8 Bold Q5,Segoe UI
Null_Var:="",Control_Types:= ["Edit","Groupbox","ListBox","Text","Edit","CheckBox","CheckBox","Groupbox","CheckBox","Text","Edit","CheckBox","Button","GroupBox","Text","Edit","Text","Edit"],Control_Text := [Output_String,"Settings / ETC","Object||Object w/Strings|Array|Array w/Strings|Pipe List","Name:",Null_Var,"Double Space Delimiter","Auto Clip Add",Null_Var,"Auto Keys","Amount:",Auto_Key_Amount,"Turn On Transparency","Clipboard","Input","Keys:",Null_Var,"Value:",Null_Var]
For, k, v in ["cBlack x10 y10 w1180 r3 ReadOnly vOutput_Edit","x10 y+5 w800 h100 Section","cWhite xs+10 ys+25 w120 r4 AltSubmit vOutType gDisplay_Output","cLime x+10 ys+25 w30","cWhite x+10 yp-2 w100 r1 vName gDisplay_Output","xs+140 y+10 vALT_Delimiter gDisplay_Output","xs+140 y+10 vAuto_Clip_Add gAuto_Clip","xs+300 ys+10 w125 h80 Section","xs+10 ys+20 vAuto_Keys gDisplay_Output","cLime xs+10 y+15","cRed x+10 yp-2 w50 r1 vAuto_Key_Amount gDisplay_Output","x+30 ys+10 vTimer gTurn_On_Off_Timer","xs+390 ys+60 w100 r1 -Theme gClip_All","x10 y+15 w1180 h130 Section","cLime xs+10 ys+20 w35","cWhite x+10 ys+18 w1120 r2 vKey_Input gDisplay_Output","cLime xs+10 y+10 w35","cWhite x+10 yp-2 w1120 r4 vValue_Input gDisplay_Output"]
Gui,1:Add,% Control_Types[A_Index],% v ,% Control_Text[A_Index]
Gui,1:Submit,NoHide
Gui,1:Show,w1200 h305, Auto Objects v1.4
return
Auto_Clip:
Gui,1:Submit,Nohide
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 Objects v1.4
if(x1>=x2&&x1<=x2+w2&&y1>=y2&&y1<=y2+h2)
Winset,Transparent,255,Auto Objects v1.4
else
winset,Transparent,20,Auto Objects v1.4
return
GuiClose:
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
Move_Tab:
PostMessage,0xA1,2
While(GetKeyState("LButton"))
Sleep, 10
WinGetPos,Ax,Ay,,,AUTO TAB v1.4
return
2GuiContextMenu:
Gui,2:Destroy
Gui,1:Show
return
GuiContextMenu:
Gui,1:Minimize
Gui,2:Destroy
Gui,2:+AlwaysOnTop -Caption +Border +Owner1
Gui,2:Color,Gray
Gui,2:Font,cWhite s7 Bold Q5,Segoe UI
Gui,2:Add,Text,x0 y5 w50 h20 Center gMove_Tab,AUTO OBJ
Gui,2:Show,x%Ax% y%Ay% w50 h20,AUTO TAB v1.4
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
}
}
Split_Array:=strsplit(Value_Input, Delimit)
if(Organ=0){
for,k,v in Split_Array
temp_Value[k]:=EQ v EQ
}
else {
for,k,v in Split_Array
temp_Value[k]:=v 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
}
~^C::
sleep,50
if(Auto_Clip_Add=1&&ALT_Delimiter=1){
Value_Input.= Clipboard " "
GuiControl,1:,Value_Input,% Value_Input
gosub,Display_Output
}
else if(Auto_Clip_Add=1&&ALT_Delimiter=0){
Value_Input.= Clipboard " "
GuiControl,1:,Value_Input,% Value_Input
gosub,Display_Output
}
return