Great, OK 
Text control can only display one line
2.for example, if I select disk 1 partition 1, and press the Enter
3. Finally, copy the test.txt file on the desktop to the partition 2 3 4 5
Macro Macro2

Text control can only display one line

2.for example, if I select disk 1 partition 1, and press the Enter
3. Finally, copy the test.txt file on the desktop to the partition 2 3 4 5
Macro Macro2
_s.expandpath("$desktop$\diskpartinfo.txt")
str s cl=F"cmd.exe /C diskpart /s ''{_s}''"
RunConsole2 cl s
s.trim
;out s
int i t tt ttt tttt tset
str ss disklist partitionlist1 partitionlist2
ARRAY(str) a=s
for(i a.len-1 -1 -1)
,if a[i].len = 0
,,a.remove(i)
for i 0 a.len
,a[i].trim
,ss=a[i]
,;out i
,;out ss
,if(findrx(a[i] "Disk(?=\s\d*\s+Online)" 0 0) >=0)
,,if ttt=0
,,,disklist+ a[i]
,,,ttt+1
,,else
,,,disklist+"[]"
,,,disklist+ a[i]
,,,ttt+1
,if(a[i]="Disk 0 is now the selected disk." )
,,tset=!tset
,if(a[i]="Disk 1 is now the selected disk." )
,,tset=!tset
,if tset
,,if(findrx(a[i] "Partition(?=\s\d+)" 0 0)>=0)
,,,if tt=0
,,,,partitionlist1+ a[i]
,,,,tt+1
,,,else
,,,,partitionlist1 + "[]"
,,,,partitionlist1 +a[i]
,,,,tt+1
,else
,,if(findrx(a[i] "Partition(?=\s\d+)" 0 0)>=0)
,,,if tttt=0
,,,,partitionlist2+ a[i]
,,,,tttt+1
,,,else
,,,,partitionlist2 + "[]"
,,,,partitionlist2 +a[i]
,,,,tttt+1
;out disklist
int disknum= numlines(disklist)
int part1num= numlines(partitionlist1)
int part2num= numlines(partitionlist2)
str s1=
F
;You currently have {disknum} hard drives
;The first hard drive has {part1num} partitions
;The second hard drive has {part2num} partitions
mes s1
str dd=
F
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Static 0x54000000 0x0 12 12 198 82 "{s1}"
;4 Edit 0x54030080 0x200 161 100 38 14 ""
;5 Static 0x54000000 0x0 104 101 52 13 "excluded part:"
;6 Static 0x54000000 0x4 12 101 38 14 "select HD:"
;7 Edit 0x54030080 0x204 54 100 38 14 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""
str controls = "4 7"
str e4 e7
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1