PDA

Показать полную графическую версию : SysTabControl32. как узнать текст текущей вкладки?


Romanka
04-07-2011, 16:52
в SysTabControl32. как узнать текущую вкладку я разобрался, а вот как получить текст текущей вкладки нет

madmasles
04-07-2011, 18:40
Romanka,
#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <GuiTab.au3>

$sTitle = 'AutoIt Help'
Run (http://www.autoitscript.com/autoit3/docs/functions/Run.htm)('hh.exe "' & @ProgramFilesDir (http://www.autoitscript.com/autoit3/docs/macros.htm#@programfilesdir) & '\AutoIt3\AutoIt3.chm"')

$hWin = WinWait (http://www.autoitscript.com/autoit3/docs/functions/WinWait.htm)($sTitle, '', 5)
$hTab = ControlGetHandle (http://www.autoitscript.com/autoit3/docs/functions/ControlGetHandle.htm)($hWin, '', '[CLASS:SysTabControl32; INSTANCE:1]')
$i_CountTab = _GUICtrlTab_GetItemCount (http://dundats.mvps.org/help/html/libfunctions/_guictrltab_getitemcount.htm)($hTab)
For (http://www.autoitscript.com/autoit3/docs/keywords.htm#For) $i = 0 To (http://www.autoitscript.com/autoit3/docs/keywords.htm#To) $i_CountTab - 1
MsgBox (http://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm)(64, 'All: ' & $i_CountTab, 'Index: ' & $i & @LF (http://www.autoitscript.com/autoit3/docs/macros.htm#@lf) & _GUICtrlTab_GetItemText (http://dundats.mvps.org/help/html/libfunctions/_guictrltab_getitemtext.htm)($hTab, $i))
Next (http://www.autoitscript.com/autoit3/docs/keywords.htm#Next)




© OSzone.net 2001-2012