Sign in to follow this  
Followers 0
Armand

List View - doesn't call up functions ?!

4 posts in this topic

Why does the script bellow fails to call the function: "SearchListClick" when i click the listview ?!?!

please help !

$SearchList = GUICtrlCreateListView("#|A|B|C|D|E|F", 214, $SearchGroupY + 45, $SearchW - 5, $SearchH - 65, -1, $LVS_EX_GRIDLINES + $LVS_EX_HEADERDRAGDROP + $LVS_EX_FULLROWSELECT)
_GUICtrlListViewSetColumnWidth($SearchList, 0, 25)
_GUICtrlListViewSetColumnWidth($SearchList, 1, 280)
_GUICtrlListViewSetColumnWidth($SearchList, 2, 140)
_GUICtrlListViewSetColumnWidth($SearchList, 3, 70)
_GUICtrlListViewSetColumnWidth($SearchList, 4, 105)
_GUICtrlListViewSetColumnWidth($SearchList, 5, 67)
_GUICtrlListViewSetColumnWidth($SearchList, 6, 75)
Dim $B_DESCENDING[_GUICtrlListViewGetSubItemsCount($SearchList) ]
GUICtrlSetData(-1, "")
GUICtrlSetOnEvent(-1, "SearchListClick")

Any help will be appreciate - THANKS !


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

Why does the script bellow fails to call the function: "SearchListClick" when i click the listview ?!?!

please help !

$SearchList = GUICtrlCreateListView("#|A|B|C|D|E|F", 214, $SearchGroupY + 45, $SearchW - 5, $SearchH - 65, -1, $LVS_EX_GRIDLINES + $LVS_EX_HEADERDRAGDROP + $LVS_EX_FULLROWSELECT)
_GUICtrlListViewSetColumnWidth($SearchList, 0, 25)
_GUICtrlListViewSetColumnWidth($SearchList, 1, 280)
_GUICtrlListViewSetColumnWidth($SearchList, 2, 140)
_GUICtrlListViewSetColumnWidth($SearchList, 3, 70)
_GUICtrlListViewSetColumnWidth($SearchList, 4, 105)
_GUICtrlListViewSetColumnWidth($SearchList, 5, 67)
_GUICtrlListViewSetColumnWidth($SearchList, 6, 75)
Dim $B_DESCENDING[_GUICtrlListViewGetSubItemsCount($SearchList) ]
GUICtrlSetData(-1, "")
GUICtrlSetOnEvent(-1, "SearchListClick")oÝ÷ Ø    òéiÂ)em橦·«^Lp
)-÷þ«¨µæ(¹Øm¦º/×~éeué¨nëm+0¢¹,~æy«­¢+Ø¥¹±Õ±ÐíÕ¥½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±ÐíÕ¥1¥ÍÑY¥Ü¹ÔÌÐì()=ÁÐ ÅÕ½ÐíÕ¥=¹Ù¹Ñ5½ÅÕ½Ðì°Ä¤((ÀÌØí¡U$ôU%
ÉÑ ÅÕ½Ðí1¥ÍÑY¥ÜQÍÐÅÕ½Ðì°àÀÀ°ØÀÀ¤)U%MÑ=¹Ù¹Ð ÀÌØíU%}Y9Q}
1=M°ÅÕ½Ðí}EÕ¥ÐÅÕ½Ðì¤((ÀÌØíMÉ¡1¥ÍÐôU%
Ñɱ
ÉÑ1¥ÍÑY¥Ü ÅÕ½Ðìññ ñ
ñññÅÕ½Ðì°ÄÀ°ÄÀ°ÜàÀ°ÔÐÀ°´Ä°ÀÌØí1YM}a}I%1%9L¬ÀÌØí1YM}a}!III=@¬ÀÌØí1YM}a}U11I=]M1
P¤)}U%
Ñɱ1¥ÍÑY¥ÝMÑ
½±Õµ¹]¥Ñ  ÀÌØíMÉ¡1¥ÍаÀ°ÈÔ¤)}U%
Ñɱ1¥ÍÑY¥ÝMÑ
½±Õµ¹]¥Ñ  ÀÌØíMÉ¡1¥ÍаİÈàÀ¤)}U%
Ñɱ1¥ÍÑY¥ÝMÑ
½±Õµ¹]¥Ñ  ÀÌØíMÉ¡1¥ÍаȰÄÐÀ¤)}U%
Ñɱ1¥ÍÑY¥ÝMÑ
½±Õµ¹]¥Ñ  ÀÌØíMÉ¡1¥Íа̰ÜÀ¤)}U%
Ñɱ1¥ÍÑY¥ÝMÑ
½±Õµ¹]¥Ñ  ÀÌØíMÉ¡1¥ÍааÄÀÔ¤)}U%
Ñɱ1¥ÍÑY¥ÝMÑ
½±Õµ¹]¥Ñ  ÀÌØíMÉ¡1¥Íа԰Øܤ)}U%
Ñɱ1¥ÍÑY¥ÝMÑ
½±Õµ¹]¥Ñ  ÀÌØíMÉ¡1¥ÍаذÜÔ¤)¥´ÀÌØí  }M
9%9m}U%
Ñɱ1¥ÍÑY¥ÝÑMÕ%ѵÍ
½Õ¹Ð ÀÌØíMÉ¡1¥ÍФt)U%
ÑɱMÑÑ ´Ä°ÅÕ½ÐìÅÕ½Ðì¤)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½ÐíMÉ¡1¥ÍÑ
±¥¬ÅÕ½Ðì¤)U%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½ÐíA½ÁÕ±Ñ1¥ÍÑY¥ÜÅÕ½Ðì°ÌÔÀ°ÔØÀ°ÄÀÀ°ÌÀ¤)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí}A½ÁÕ±Ñ1¥ÍÑY¥ÜÅÕ½Ðì¤)U%MÑMÑÑ ¤()]¡¥±Ä(%M±À ÈÀ¤)]¹()Õ¹MÉ¡1¥ÍÑ
±¥¬ ¤(%1½°ÀÌØí¡1Xô
½¹Ñɽ±Ñ!¹± ÀÌØí¡U$°ÅÕ½ÐìÅÕ½Ðì°ÀÌØíMÉ¡1¥ÍФ($(%5Í   ½à ØаÅÕ½ÐíMÉ¡1¥ÍÑ
±¥¬ ¤ÅÕ½Ðì°ÅÕ½ÐíÙ¹ÐÑѽ¸
½¹Ñɽ±%èÅÕ½ÐìµÀìU%}
Ñɱ%µÀì
I1µÀì|($$$ÅÕ½Ðí9յȽɽÝÌôÅÕ½ÐìµÀì}U%
Ñɱ1¥ÍÑY¥ÝÑ%ѵ
½Õ¹Ð ÀÌØí¡1X¤µÀì
I1µÀì|($$$ÅÕ½Ðí9յȽ½±ÕµÌôÅÕ½ÐìµÀì}U%
Ñɱ1¥ÍÑY¥ÝÑMÕ%ѵÍ
½Õ¹Ð ÀÌØí¡1X¤µÀì
I1µÀì|($$$ÅÕ½Ðí9յȽͱѥѵÌôÅÕ½ÐìµÀì}U%
Ñɱ1¥ÍÑY¥ÝÑM±Ñ
½Õ¹Ð ÀÌØí¡1X¤µÀì
I1µÀì|($$$ÅÕ½ÐíM±Ñ¥¹¥¥ÌôÅÕ½ÐìµÀì}U%
Ñɱ1¥ÍÑY¥ÝÑM±Ñ%¹¥Ì ÀÌØí¡1X°À¤¤)¹Õ¹ìôôÐíMÉ¡1¥ÍÑ
±¥¬()Õ¹}A½ÁÕ±Ñ1¥ÍÑY¥Ü ¤(%1½°ÀÌØíÑ°ÀÌØí¡1Xô
½¹Ñɽ±Ñ!¹± ÀÌØí¡U$°ÅÕ½ÐìÅÕ½Ðì°ÀÌØíMÉ¡1¥ÍФ(%1½°ÀÌØíI½ÝÌô}U%
Ñɱ1¥ÍÑY¥ÝÑ%ѵ
½Õ¹Ð ÀÌØí¡1X¤°ÀÌØí
½±Ìô}U%
Ñɱ1¥ÍÑY¥ÝÑMÕ%ѵÍ
½Õ¹Ð ÀÌØí¡1X¤(%½ÈÀÌØíÈôÀÌØíI½ÝÌQ¼ÀÌØíI½Ý̬ä($$ÀÌØíÑôÀÌØíȵÀìÅÕ½ÐíðÅÕ½Ðì($%½ÈÀÌØíôÄQ¼ÀÌØí
½±Ì´Ä($$$ÀÌØíѵÀìô ÀÌØíȨÀÌØí¤µÀìÅÕ½ÐíðÅÕ½Ðì($%9áÐ($%U%
Ñɱ
ÉÑ1¥ÍÑY¥Ý%Ñ´ ÀÌØíÑ°ÀÌØíMÉ¡1¥ÍФ($%U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½ÐíMÉ¡1¥ÍÑ
±¥¬ÅÕ½Ðì¤(%9áÐ)¹Õ¹ìôôÐí}A½ÁÕ±Ñ1¥ÍÑY¥Ü()Õ¹}EեР¤(%á¥Ð)¹Õ¹ìôôÐí}EÕ¥

Note that there is no event unless you click on the header or an actual ListViewItem. Clicking on the empty space of the ListView does not generate any event.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

and i wrote that instead:

GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, "ByMouseClickPrimary")
Func ByMouseClickPrimary()
    If WinActive($ULEMainGui) = 0 Then Return
    If ControlGetHandle("", "", ControlGetFocus("")) <> $LastClickHandle Or $LastClickHandle2 <> $LastClickHandle Then
        $LastClickHandle = ControlGetHandle("", "", ControlGetFocus(""))
        $LastClickHandle2 = $LastClickHandle
        Switch $LastClickHandle
            Case ControlGetHandle("", "", $SearchList)
                $index = _GUICtrlListViewGetCurSel($SearchList)
                $LastClickHandle2 = $index
                If IsArray($CurrentSearchResults) = 0 Or $index = -1 Or $index > UBound($CurrentSearchResults,2)-1 Then ContinueCase
                ReadExtendedInfo($index)
            Case else
                
        EndSwitch
    EndIf
EndFunc   ;==>ByMouseClick

of course yours looks better (:


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

Just Tried yOurs:

GUICtrlSetOnEvent($SearchList, "SearchListClick")

Func SearchListClick()
MsgBox(0,"","asdasd")
$SearchListH = ControlGetHandle($ULEMainGui, "", $SearchList)
$index = _GUICtrlListViewGetSelectedIndices($SearchListH,0)
If $index <> $LV_ERR Then
$LastClickHandle2 = $index
If IsArray($CurrentSearchResults) <> 0 Or $index <> -1 Or $index <= UBound($CurrentSearchResults,2)-1 Then ReadExtendedInfo($index)
EndIf
_GUICtrlListViewSort($SearchListH, $B_DESCENDING, GUICtrlGetState($SearchList))
EndFunc

that seems to still not work :)


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

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