【问题标题】:AUTOIT: How to expand a treeview in an existing application?AUTOIT:如何在现有应用程序中扩展树视图?
【发布时间】:2013-06-05 16:28:15
【问题描述】:

例如是我的电脑。如何自动扩展“计算机”树?

#include <GuiTreeView.au3>
Run("C:")
WinWaitActive("My Computer")
$hTreeView = "SysTreeView32"
_GUICtrlTreeView_Expand($hTreeView)

【问题讨论】:

  • 在您的代码中$hTreeView 不是句柄,它只是一个字符串。您应该使用 ControlGetHandle 来检索 TreeView 的句柄:$hTreeView = ControlGetHandle('[CLASS:CabinetWClass]', '', 'SysTreeView321')

标签: autoit


【解决方案1】:

更新:

您可以运行 shell:MyComputerFolder 命令,该命令会将您带到我的电脑: http://winaero.com/blog/the-full-list-of-shell-commands-in-windows-8/

最后,您可以运行 explorer.exe /e,::{20D04FE0-3AEA-1069-A2D8-08002B30309D},这将带您直接进入 MyComputer:http://www.msfn.org/board/topic/51661-make-explorer-start-with-my-computer/


当您打开 C:\ 时,您可以发送 ALT+Up 将您带到我的电脑。

也请参阅:How do I programmatically open the "Libraries" folder in Windows Explorer in Windows 7?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-03-17
    • 1970-01-01
    • 1970-01-01
    • 2018-02-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多