Jump to content

Need help validating _GUICtrlListView_?


gseller
 Share

Recommended Posts

Can someone help me? I am afraid I am not doing very well with the new 3.2.10.0 syntax when it comes to the new _GUICtrlListView_?? I have this function working all except it will not work right on the "if then" validating if a selection is made from the listview before sending on to the ShellExecute and so on. Any help would be much apreciated.. Below are several failed attempts to validate...

Thank You in advance..

Func execute()
 $CurIndex = _GUICtrlListView_GetSelectedIndices($ListViewID,true)
 If $CurIndex = 0 Then
  MsgBox(0, "Error", "You must select a session from the list" )
  Return
 EndIf
 ShellExecute("HOSTEX32.EXE", " " & _GUICtrlListView_GetItemText($ListViewID, $CurIndex[1], 1), @ProgramFilesDir & "\Hummingbird\Connectivity\10.00\HostExplorer", "")
 SplashTextOn( "Please Stand by", "Launching: "  & @CRLF & _GUICtrlListView_GetItemText($ListViewID, $CurIndex[1], 0), 300, 75, -1, -1,17 )
 Sleep(1000)
 SplashOff()
EndIfoÝ÷ Ù«­¢+ÙÕ¹áÕÑ ¤(ÀÌØí
ÕÉ%¹àô}U%
Ñɱ1¥ÍÑY¥Ý}ÑM±Ñ%¹¥Ì ÀÌØí1¥ÍÑY¥Ý%±ÑÉÕ¤)%}U%
Ñɱ1¥ÍÑY¥Ý}Ñ%ѵQáÐ ÀÌØí1¥ÍÑY¥Ý%°ÀÌØí
ÕÉ%¹álÁt°Ä¤ôÀQ¡¸(5Í    ½à ÐÀäØ°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðíe½ÔµÕÍÐͱÐÍÍÍ¥½¸É½´Ñ¡±¥ÍÐÅÕ½Ðì¤)±Í(M¡±±áÕÑ ÅÕ½Ðí!=MQ`ÌȹaÅÕ½Ðì°ÅÕ½ÐìÅÕ½ÐìµÀì}U%
Ñɱ1¥ÍÑY¥Ý}Ñ%ѵQáÐ ÀÌØí1¥ÍÑY¥Ý%°ÀÌØí
ÕÉ%¹álÅt°Ä¤°Aɽɵ¥±Í¥ÈµÀìÅÕ½ÐìÀäÈí!Õµµ¥¹¥ÉÀäÈí
½¹¹Ñ¥Ù¥ÑäÀäÈìÄÀ¸ÀÀÀäÈí!½ÍÑáÁ±½ÉÈÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(MÁ±Í¡QáÑ=¸ ÅÕ½ÐíA±ÍMѹäÅÕ½Ðì°ÅÕ½Ðí1Õ¹¡¥¹èÅÕ½ÐìµÀì
I1µÀì}U%
Ñɱ1¥ÍÑY¥Ý}Ñ%ѵQáÐ ÀÌØí1¥ÍÑY¥Ý%°ÀÌØí
ÕÉ%¹álÅt°À¤°ÌÀÀ°ÜÔ°´Ä°´Ä°Äܤ(M±À ÄÀÀÀ¤(MÁ±Í¡= ¤)¹%oÝ÷ Ù«­¢+ÙÕ¹áÕÑ ¤(%ÀÌØí
ÕÉ%¹àô}U%
Ñɱ1¥ÍÑY¥Ý}ÑM±Ñ%¹¥Ì ÀÌØí1¥ÍÑY¥Ý%±ÑÉÕ¤ôÀQ¡¸(5Í  ½à ÐÀäØ°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðíe½ÔµÕÍÐͱÐÍÍÍ¥½¸É½´Ñ¡±¥ÍÐÅÕ½Ðì¤)±Í(M¡±±áÕÑ ÅÕ½Ðí!=MQ`ÌȹaÅÕ½Ðì°ÅÕ½ÐìÅÕ½ÐìµÀì}U%
Ñɱ1¥ÍÑY¥Ý}Ñ%ѵQáÐ ÀÌØí1¥ÍÑY¥Ý%°ÀÌØí
ÕÉ%¹álÅt°Ä¤°Aɽɵ¥±Í¥ÈµÀìÅÕ½ÐìÀäÈí!Õµµ¥¹¥ÉÀäÈí
½¹¹Ñ¥Ù¥ÑäÀäÈìÄÀ¸ÀÀÀäÈí!½ÍÑáÁ±½ÉÈÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(MÁ±Í¡QáÑ=¸ ÅÕ½ÐíA±ÍMѹäÅÕ½Ðì°ÅÕ½Ðí1Õ¹¡¥¹èÅÕ½ÐìµÀì
I1µÀì}U%
Ñɱ1¥ÍÑY¥Ý}Ñ%ѵQáÐ ÀÌØí1¥ÍÑY¥Ý%°ÀÌØí
ÕÉ%¹álÅt°À¤°ÌÀÀ°ÜÔ°´Ä°´Ä°Äܤ(M±À ÄÀÀÀ¤(MÁ±Í¡= ¤)¹%oÝ÷ Ù«­¢+ÙÕ¹áÕÑ ¤(%ÀÌØí
ÕÉ%¹àô}U%
Ñɱ1¥ÍÑY¥Ý}ÑM±Ñ%¹¥Ì ÀÌØí1¥ÍÑY¥Ý%±ÑÉÕ¤ôÀQ¡¸(5Í  ½à ÐÀäØ°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðíe½ÔµÕÍÐͱÐÍÍÍ¥½¸É½´Ñ¡±¥ÍÐÅÕ½Ðì¤)±Í(M¡±±áÕÑ ÅÕ½Ðí!=MQ`ÌȹaÅÕ½Ðì°ÅÕ½ÐìÅÕ½ÐìµÀì}U%
Ñɱ1¥ÍÑY¥Ý}Ñ%ѵQáÐ ÀÌØí1¥ÍÑY¥Ý%°ÀÌØí
ÕÉ%¹álÅt°Ä¤°Aɽɵ¥±Í¥ÈµÀìÅÕ½ÐìÀäÈí!Õµµ¥¹¥ÉÀäÈí
½¹¹Ñ¥Ù¥ÑäÀäÈìÄÀ¸ÀÀÀäÈí!½ÍÑáÁ±½ÉÈÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(MÁ±Í¡QáÑ=¸ ÅÕ½ÐíA±ÍMѹäÅÕ½Ðì°ÅÕ½Ðí1Õ¹¡¥¹èÅÕ½ÐìµÀì
I1µÀì}U%
Ñɱ1¥ÍÑY¥Ý}Ñ%ѵQáÐ ÀÌØí1¥ÍÑY¥Ý%°ÀÌØí
ÕÉ%¹álÅt°À¤°ÌÀÀ°ÜÔ°´Ä°´Ä°Äܤ(M±À ÄÀÀÀ¤(MÁ±Í¡= ¤)¹%
Edited by gesller
Link to comment
Share on other sites

Try:

Func execute()
 $CurIndex = _GUICtrlListView_GetSelectedIndices($ListViewID,true)
 If $CurIndex[0] = 0 Then
  MsgBox(0, "Error", "You must select a session from the list" )
  Return
 EndIf
 ShellExecute("HOSTEX32.EXE", " " & _GUICtrlListView_GetItemText($ListViewID, $CurIndex[1], 1), @ProgramFilesDir & "\Hummingbird\Connectivity\10.00\HostExplorer", "")
 SplashTextOn( "Please Stand by", "Launching: "  & @CRLF & _GUICtrlListView_GetItemText($ListViewID, $CurIndex[1], 0), 300, 75, -1, -1,17 )
 Sleep(1000)
 SplashOff()
EndIf

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...