#7 SelTreeViewItemPath gets stuck in endless loop

closed
nobody
None
5
2007-10-23
2006-07-19
Tim Mitchell
No

#!perl -w

#####################################################################
##
# EndlessLoopBug.pl Tim Mitchell July 13 2006
#
# Win32-GuiTest script attempting to reproduce a bug in
SelectTargetTreeItem,
# This script opens Windows Explorer
#####################################################################
##
use Win32::GuiTest qw(:ALL);
system("start C:\\WINDOWS\\explorer.exe");
sleep 1; #Wait for Windows\Explorer to get started
# Explorer opens by default on My Documents folder
# with "My Documents" in the title bar.
#Finding the handle of the TreeView
my @ExplorerWindow = FindWindowLike(undef, "My Documents");
my @OuterFrame = FindWindowLike($ExplorerWindow
[0], "", "BaseBar");
my @InnerFrame = FindWindowLike($OuterFrame[0], "",
"BaseBar");
my @TreeWindow = FindWindowLike($InnerFrame
[0], "", "SysTreeView32");
# Watch eplorer while this runs. It starts on My Documents
sleep 3;
SelTreeViewItemPath($TreeWindow[0], "My Documents|My
Pictures");
# Nothing changed. My Pictures was NOT selected
sleep 3;
SelTreeViewItemPath($TreeWindow[0], "Desktop");
# Desktop was selected but not highlighted in the tree
sleep 3;
SelTreeViewItemPath($TreeWindow[0], "Desktop|My
Documents|My Pictures");
# Desktop is still selected but not highlighted
sleep 3;
SelTreeViewItemPath($TreeWindow[0], "Desktop|My
Documents|My Pictures (dgdf )");
# The script is now stuck in an endless loop

Discussion

  • Piotr Kaluski
    Piotr Kaluski
    2007-10-23

    Logged In: YES
    user_id=1074699
    Originator: NO

    Fixed. Endless loop was happening when a path given as parameter contained not existing part.

     
  • Piotr Kaluski
    Piotr Kaluski
    2007-10-23

    • status: open --> closed