gseller Posted January 21, 2008 Share Posted January 21, 2008 (edited) 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.. expandcollapse popupFunc 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 January 21, 2008 by gesller Link to comment Share on other sites More sharing options...
GaryFrost Posted January 21, 2008 Share Posted January 21, 2008 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 More sharing options...
gseller Posted January 21, 2008 Author Share Posted January 21, 2008 Gary That works Great! Can't tell you how grateful I am. I have Been pulling my hair out over this and I think I finally have it converter from the new syntax. Thanks Again.. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 21, 2008 Share Posted January 21, 2008 Func execute() ummmmm I may be mistaken but I thought you could not use current command names as functions ? Link to comment Share on other sites More sharing options...
gseller Posted January 21, 2008 Author Share Posted January 21, 2008 My apologies.. Just a fictitious name as the other contained proprietary info for my job.. LOL Good eye tho! Thanks again all.. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 21, 2008 Share Posted January 21, 2008 My apologies.. Just a fictitious name as the other contained proprietary info for my job.. LOL Good eye tho!Thanks again all.. gotcha just making sure you don't run into any problems. Good luck with your program. Link to comment Share on other sites More sharing options...
gseller Posted January 21, 2008 Author Share Posted January 21, 2008 Sweet, nice to have all the help here when one hits a snag. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now