Marcus Sthlm Posted March 28, 2006 Share Posted March 28, 2006 Hi Allow me to present my problem altough I'm so very stupid when it comes to programing... I've got a script called map_printers.vbs which map some printers when launched. When I paste this snippet into AutoIT (Scitex) I get an error. This is the code: Set objNetwork = CreateObject("WScript.Network") objNetwork.AddWindowsPrinterConnection "\\server\prt1" objNetwork.AddWindowsPrinterConnection "\\server\prt2" objNetwork.AddWindowsPrinterConnection "\\server\prt3" Errormessage: (1,5) : ERROR: syntax error Set objNetwork If anyone could help me get kickstarted I would really like it! Roll on & thanks! /Marcus Link to comment Share on other sites More sharing options...
Developers Jos Posted March 28, 2006 Developers Share Posted March 28, 2006 This is still vbs code ... not autoit3... Should be something like this: (Untested) $objNetwork = ObjCreate("WScript.Network") $objNetwork.AddWindowsPrinterConnection ("\\server\prt1") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Marcus Sthlm Posted March 28, 2006 Author Share Posted March 28, 2006 This is still vbs code ... not autoit3... Should be something like this: (Untested) $objNetwork = ObjCreate("WScript.Network") $objNetwork.AddWindowsPrinterConnection ("\\server\prt1") Dude, that was a fast answer!!! SWEET! Your example didn't work, by the way. (1) : ==> Unknown function name.: Cheers! Link to comment Share on other sites More sharing options...
Developers Jos Posted March 28, 2006 Developers Share Posted March 28, 2006 Dude, that was a fast answer!!! SWEET!Your example didn't work, by the way. Cheers!You need to use the Beta version of AutoIt3 ....... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Marcus Sthlm Posted March 28, 2006 Author Share Posted March 28, 2006 You need to use the Beta version of AutoIt3 .......Wohoo! Your example works now! I guess it did all the time, but it works for me. After installing beta. Am I annoying? Naw, just happy. Thanks mate! Carry on! =) 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