Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在perl中选择列表项_Perl_Listview_Listitem - Fatal编程技术网

如何在perl中选择列表项

如何在perl中选择列表项,perl,listview,listitem,Perl,Listview,Listitem,我使用了下面的代码来选择窗口列表中的一行 @edit = FindWindowLike( $_, undef, "^SysListView32"); if( !@edit ) { die "Cannot find window handle for Edit control\n"; } else { printf( "Edit window handle is %x\n", $edit[ 0 ] ); } SelListViewItemText( $edit[ 0 ], "F

我使用了下面的代码来选择窗口列表中的一行

@edit = FindWindowLike( $_, undef, "^SysListView32");
if( !@edit )
{
     die "Cannot find window handle for Edit control\n";
}
else
{
  printf( "Edit window handle is %x\n", $edit[ 0 ] );
}   
SelListViewItemText( $edit[ 0 ], "Fax",1);
其输出如下所示:

我希望我的输出像:


请帮助我说明,为了获得第二个屏幕截图这样的输出,我必须在代码中做哪些更改。

在上述代码中,选择该选项以使项目具有灰色背景。I它必须是蓝色的,它应该是活动的(聚焦的),因此要做到这一点: 添加以下内容:

SetFocus($edit[ 0 ]);
在此之前:

SelListViewItemText( $edit[ 0 ], "Fax",1);

我不希望窗口处于活动状态。因为我的脚本应该在用户会话被锁定时运行@User3274006在锁定会话模式下,无法聚焦使窗口处于活动状态。根据我的说法,您需要的更改只能在活动会话中进行。