Formatting objects/arrays
Posted: 14 Feb 2024, 21:43
Hi I'm hoping someone can help me out with a formatting tool I'd like to have.
The purpose of the tool is to swap between a long format and a short format for objects / arrays
Something like this but with the ability to deal with nested objects and arrays as well as simple ones.
. .
My goal is to be able to paste in the code for an object into an edit control and switch its formatting in another edit control ready to copy and paste.
I'm pretty sure that I could work through any problem that needs to be solved to get this to work but I don't have experience in this sort of thing so I don't know what problems I would even face so I thought I ask here to see if someone has some code already or knows what to do to get this outcome off the top of their head.
Anyways, thanks in advance and here is the basic design for the ui.
The purpose of the tool is to swap between a long format and a short format for objects / arrays
Something like this but with the ability to deal with nested objects and arrays as well as simple ones.
. .
My goal is to be able to paste in the code for an object into an edit control and switch its formatting in another edit control ready to copy and paste.
I'm pretty sure that I could work through any problem that needs to be solved to get this to work but I don't have experience in this sort of thing so I don't know what problems I would even face so I thought I ask here to see if someone has some code already or knows what to do to get this outcome off the top of their head.
Anyways, thanks in advance and here is the basic design for the ui.
Code: Select all
#SingleInstance Force
Gui, New, +AlwaysOnTop
Gui, Margin, 10 , 10
Gui, Add, Text, xm ym w700 r3 Border Center 0x200 , Input
Gui, Add, Edit, xm y+m wp r7 -Wrap WantTab
Gui, Add, Text, xm y+m w700 r3 Border Center 0x200 , Output
Gui, Add, Radio, xm y+m w60 section checked Group vRadioGroup , Output 1
Gui, Add, Radio, xm y+m wp , Output 2
;~ Gui, Add, Radio, xm y+m wp , Output 3
Gui, Show, Hide
Gui, -Caption +LastFound
SetTitleMatchMode, 2
WinGetPos,,, w , h
Gui, Add, Edit, % "ys w" w - 60 - 30 " r7 -Wrap wanttab"
Gui, +Caption
Gui, Show, AutoSize
return
GuiClose:
GuiContextMenu:
*ESC::ExitApp