grunewald6 Posted November 5, 2008 Share Posted November 5, 2008 Hey, I'm pretty new to this autoit stuff, andf I apologize if this has been answered before, but I searched and couldn't find anything specifially on it. I am writing a script to remotely install a printer to a batch of computers. We have several drivers stored on a server and I want to make the combobox list the printers based on an ini file that is also stored on that server. here is a short bit of the ini file (we'll call it printers.ini):[Lexmark T640]Model="Lexmark T640"DriverName="Lexmark T640"DriverINF="LMAAT2DA.INF"DriverPack="lxt640.7z"[Lexmark T642]Model="Lexmark T642"DriverName="Lexmark T642"DriverINF="LMAAT2DA.INF"DriverPack="lxt640.7z"[Lexmark T630]Model="Lexmark T630"DriverName="Lexmark T630"DriverINF="LMAAG2DA.INF"DriverPack="lxt630.7z"[Lexmark T632]Model="Lexmark T632"DriverName="Lexmark T632"DriverINF="LMAAG2DA.INF"DriverPack="lxt630.7z"This is what I had before for the combo, but I want to pull it from an ini so I don't have to update the script every time we add another printer (and driver) to the server. CODE$PrinterList = GUICtrlCreateCombo("Choose Printer", 10, 58, 145, 25)GUICtrlSetData(-1, "Brother 5250dn|HP 1300n|Lexmark E352dn|Lexmark T630|Lexmark T632|Lexmark T640|Lexmark T642")Can anyone get me down the right path here? Thanks in advance, Link to comment Share on other sites More sharing options...
Zedna Posted November 5, 2008 Share Posted November 5, 2008 Look at my mstsc in my sig and herehttp://www.autoitscript.com/forum/index.ph...st&p=125329 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
dillonlim Posted November 5, 2008 Share Posted November 5, 2008 You could try something like this #include <GUIConstants.au3> Local $combo $file = "printers.ini" $printers = IniReadSectionNames($file) For $i = 1 to $printers[0] $combo = $printers[$i] & "|" & $combo Next GUICreate("Test", 300, 50) GUICtrlCreateCombo("", 10, 10, 100) GUICtrlSetData(-1, $combo) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Link to comment Share on other sites More sharing options...
Bert Posted November 5, 2008 Share Posted November 5, 2008 I think Lexmark has a universal driver that would allow you to install using just one driver. It would make your job easier. I know the HP universal driver may work too. (been told this, need to confirm though) The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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