Sign in to follow this  
Followers 0
ajit

Sort items in a listview of an external program

3 posts in this topic

Hi

I want to sort items in a listview of an external program.

Could someone give me a clue. I tried the help file but somehow could not get it to work.

Thanks

Ajit

Share this post


Link to post
Share on other sites



Hi

I want to sort items in a listview of an external program.

Could someone give me a clue. I tried the help file but somehow could not get it to work.

Thanks

Ajit

#Include <GUIListView.au3>

Global $Descending, $sTitle, $hList

$sTitle = StringRegExpReplace(@ProgramFilesDir, '^.*\\', '')
ShellExecute(@ProgramFilesDir)
If Not WinWait($sTitle, '', 3) Then
    Exit
EndIf
$hList = ControlGetHandle($sTitle, '', '[CLASS:SysListView32;INSTANCE:1]')
If $hList = '' Then
    Exit
EndIf
MsgBox(0, '', 'Press OK to sort descending.')
$Descending = 1
_GUICtrlListView_SimpleSort($hList, $Descending, 0)
MsgBox(0, '', 'Press OK to sort ascending.')
$Descending = 0
_GUICtrlListView_SimpleSort($hList, $Descending, 0)

Share this post


Link to post
Share on other sites

#Include <GUIListView.au3>

Global $Descending, $sTitle, $hList

$sTitle = StringRegExpReplace(@ProgramFilesDir, '^.*\\', '')
ShellExecute(@ProgramFilesDir)
If Not WinWait($sTitle, '', 3) Then
    Exit
EndIf
$hList = ControlGetHandle($sTitle, '', '[CLASS:SysListView32;INSTANCE:1]')
If $hList = '' Then
    Exit
EndIf
MsgBox(0, '', 'Press OK to sort descending.')
$Descending = 1
_GUICtrlListView_SimpleSort($hList, $Descending, 0)
MsgBox(0, '', 'Press OK to sort ascending.')
$Descending = 0
_GUICtrlListView_SimpleSort($hList, $Descending, 0)

@Yashied

It works perfect. Thanks so much. That was more than what I had asked.

Thanks again.

Ajit

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0