starpc Posted October 18, 2007 Share Posted October 18, 2007 (edited) I'm working on a tool to restart the printer spooler on any of my companies network printers, however when i put all of our print servers into a single combo box some the entries get cut off. The last entry which show up in the combo box is rvspps01, even though the last printer server is wcheps01. Any thoughts on how to fix this? expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $spooler = GUICreate("Printer Spooler Fixer", 290, 78, -1, -1) $printer = GUICtrlCreateCombo("", 16, 8, 257, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "ALBPSS01|ATLFPS01|BALFPS01|BIRMGHAMPCFPS01|CHARFPS01|CHIFPS01|CMSFPS01|CMSFPS02|CONPSS01|CRAFPS0 1|DALFPS01|DETFPS01|HOUFPS01|INDFPS01|KANFPS01|LONFPS01|LVSPSS01|MEMFPS01|MIAFPS01|MINFPS01|NASFPS01 |NEWFPS01|NOWFPS01|OCOPSS01|OKLFPS01|ORLFPS01|PDXPSS02|PHXPSS01|POMFPS01|RVSPSS01|SACPSS01|SCLPSS01| SEAFPS01|SLCPSS01|SNAFPS01A|SNDPSS01|STLFPS01|tamfps01|tamfps01_old|TELCOFPS01|TOPFPS01|TOPFPS01|TUC FPS01|vispss01|VNYFPS01|VNYPSS01|WCHFPS01|WCHEPS01") $Stop = GUICtrlCreateButton("Stop", 24, 40, 89, 25, 0) GUICtrlSetOnEvent(-1, "StopClick") $Start = GUICtrlCreateButton("Start", 168, 40, 89, 25, 0) GUICtrlSetOnEvent(-1, "StartClick") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func StartClick() EndFunc Func StopClick() EndFunc Edited October 18, 2007 by starpc Link to comment Share on other sites More sharing options...
GaryFrost Posted October 18, 2007 Share Posted October 18, 2007 Using beta: #include <GUIConstants.au3> #include <GuiComboBox.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $spooler = GUICreate("Printer Spooler Fixer", 290, 78, -1, -1) $printer = GUICtrlCreateCombo("", 16, 8, 257, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "ALBPSS01|ATLFPS01|BALFPS01|BIRMGHAMPCFPS01|CHARFPS01|CHIFPS01|CMSFPS01|CMSFPS02|CONPSS01|CRAFPS01" & _ "|DALFPS01|DETFPS01|HOUFPS01|INDFPS01|KANFPS01|LONFPS01|LVSPSS01|MEMFPS01|MIAFPS01|MINFPS01|NASFPS01|NEWFPS01|NOWFPS01" & _ "|OCOPSS01|OKLFPS01|ORLFPS01|PDXPSS02|PHXPSS01|POMFPS01|RVSPSS01|SACPSS01|SCLPSS01|SEAFPS01|SLCPSS01|SNAFPS01A|SNDPSS01" & _ "|STLFPS01|tamfps01|tamfps01_old|TELCOFPS01|TOPFPS01|TOPFPS01|TUCFPS01|vispss01|VNYFPS01|VNYPSS01|WCHFPS01|WCHEPS01") ;******************************************** ; Set Min Visible _GUICtrlComboBox_SetMinVisible ($printer, 50) ;******************************************** $Stop = GUICtrlCreateButton("Stop", 24, 40, 89, 25, 0) GUICtrlSetOnEvent(-1, "StopClick") $Start = GUICtrlCreateButton("Start", 168, 40, 89, 25, 0) GUICtrlSetOnEvent(-1, "StartClick") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func StartClick() EndFunc ;==>StartClick Func StopClick() EndFunc ;==>StopClick 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...
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