Gardner, Paul G. wrote:
>> > win.childtextbyindex(=totalcmd,14)
>
>> 14 returns the content of TC's left pane filter, 21 the right pane
>> filter,
> 9 the current folder of the selected
>> pane (left or right). At least with my TC configuration.
>
> Not sure what you mean by 'content of TC's left pane filter', but on
> my config it's the path of the left pane (edit box just above the
> actual directory contents).
on mine it's the path followed by \*.* (or *.exe if, for instance, I'm
filtering .exe files).
There doesn't seem to be a good way to
> reliably identify the various parts of TC's interface, and the indexes
> change as various GUI elements are turned on and off, so they're going
> to be different for most people.
I agree. One possible workaround is to test 8 and if blank test 9 (see below)
> 9 returns blank for me ( I would
> guess that you have the cmd box visible, and that's index 9 for you ).
Actually, I do have the cmd box visible but 8 is still my index! Sometimes it's
8, sometimes it's 9 and I
don't know what makes it change. So I end up testing for 8 then for 9.
CmdPrompt-hacked.powerpro in the file download section uses this code to detect
Explorer or TC
current folder (watch for folded line)
local folder
local explorer_version=word(file.version(env("windir")++?"\explorer.exe"),1)
local
ADDRESS_INDEX=ifelse(explorer_version==6,3,ifelse(explorer_version==5,7,0))
local TC_ADDRESS_INDEX_LIST = "8 9"
if (activeWindow(?"c=CabinetWClass,c=ExploreWClass"))
folder = Win.childTextByIndex(?"active", ADDRESS_INDEX)
if (activeWindow(?"c=ProgMan"))
folder = env(?"userProfile") ++ ?"\Desktop"
if (activeWindow(?"=totalcmd")) do
local i
for(i=1; i<=word(TC_ADDRESS_INDEX_LIST,0); i=i+1)
folder = remove(Win.childTextByIndex(?"active",
word(TC_ADDRESS_INDEX_LIST,i)),-1)
if( validpath(folder) )
break
endfor
endif
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/JV_rlB/TM
--------------------------------------------------------------------~->
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/