args hwnd, Panel if(not Panel) do Panel = tc.active(hwnd) elseif(Panel == 1) Panel = "left" elseif(Panel == 2) Panel = "right" endif local List = win.childhandlelist(hwnd, "c=TMyPanel") local TMTC = win.childhandlelist(hwnd, "c=TMyTabControl") local Num = word(TMTC, 0) local TMP if(Num == 0) do quit(0) elseif(Num == 1) do local TPP = win.childhandlelist(hwnd, "c=TPathPanel") local LPath = win.gettext(word(TPP, 1)) local RPath = win.gettext(word(TPP, 2)) for each word Hand in List Num = childwin.handle(Hand, "TPathPanel") if(Num) do Num = win.gettext(Num) if(Num == LPath && Panel == "right") do TMP = Hand break endif if(Num == RPath && Panel == "left") do TMP = Hand break endif endif endfor if(not TMP) quit(0) for each word Hand in List Num = childwin.handle(Hand, "TMyComboBox") if(Num) do if(childwin.gettext(Num) && Hand != TMP) do TMP = Hand break endif endif endfor else for each word Hand in List Num = childwin.handle(Hand, "TMyTabControl") if(Num) do TMP = Hand if(Panel == "left") break endif endfor endif TMTC = childwin.handle(TMP, "TMyTabControl") if(not TMTC) quit(0) quit(TMTC)