09-15-2021, 07:01 PM
since all windows have different names can just use win
try these
Function M3__Wins
Function CloseWindows2
try these
Function M3__Wins
ARRAY(str) winNames.create(7)
ARRAY(int) winHandles.create(7)
winNames[0]="C:\M03 Wins\dir1";; -575 30 501 419
winNames[1]="C:\M03 Wins\dir2";; -1089 454 501 419
winNames[2]="C:\M03 Wins\dir3" ;; -1091 31 501 419
winNames[3]="C:\M03 Wins\dir4" ;; -1602 477 501 426
winNames[4]="C:\M03 Wins\dir5" ;; -1601 13 501 464
winNames[5]="C:\M03 Wins";; -573 460 501 420
winNames[6]="C:\Temp" ;; 167 6 980 476
for int'i 0 winNames.len
,run winNames[i] "" "" "" 0x100|0x800|0x10000 win(winNames[i] "CabinetWClass") winHandles[i]
,outw winHandles[i]
,sel i
,,case 0
,,mov+ -575 30 501 419 winHandles[i]
,,case 1
,,mov+ -1089 454 501 419 winHandles[i]
,,case 2
,,mov+ -1091 31 501 419 winHandles[i]
,,case 3
,,mov+ -1602 477 501 426 winHandles[i]
,,case 4
,,mov+ -1601 13 501 464 winHandles[i]
,,case 5
,,mov+ -573 460 501 420 winHandles[i]
,,case 6
,,mov+ 167 6 980 476 winHandles[i]
Function CloseWindows2
ARRAY(str) winNames.create(7)
winNames[0]="C:\M03 Wins\dir1";; -575 30 501 419
winNames[1]="C:\M03 Wins\dir2";; -1089 454 501 419
winNames[2]="C:\M03 Wins\dir3" ;; -1091 31 501 419
winNames[3]="C:\M03 Wins\dir4" ;; -1602 477 501 426
winNames[4]="C:\M03 Wins\dir5" ;; -1601 13 501 464
winNames[5]="C:\M03 Wins";; -573 460 501 420
winNames[6]="C:\Temp" ;; 167 6 980 476
ARRAY(int) a
opt hidden 1
win("" "CabinetWClass" "" 0 0 0 a)
opt hidden 0
int i
for i 0 a.len
,str txt.getwintext(a[i])
,for int'j 0 winNames.len
,,if(txt =winNames[j])
,,,clo a[i]