+ Post New Thread
Results 1 to 3 of 3
Scripts Thread, Printer script - help in Coding and Web Development; I have the printer script below that works a treat in my school....I want to use it else where but ...
  1. #1

    Join Date
    May 2008
    Posts
    22
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Printer script - help

    I have the printer script below that works a treat in my school....I want to use it else where but theres one bit that I dont understand...What do the parts (1,1,9) (10,1,15) (16,1,33) etc do?

    Thanks

    FOR /L %%a IN (1,1,9) DO IF "%COMPUTERNAME%"=="SLT0%%a" GOTO ICTPrinter02
    FOR /L %%a IN (10,1,15) DO IF "%COMPUTERNAME%"=="SLT%%a" GOTO ICTPrinter02
    FOR /L %%a IN (16,1,33) DO IF "%COMPUTERNAME%"=="SLT%%a" GOTO ICTPrinter02

    FOR /L %%a IN (1,1,9) DO IF "%COMPUTERNAME%"=="GPRM0%%a" GOTO ICTPrinter02
    FOR /L %%a IN (10,1,15) DO IF "%COMPUTERNAME%"=="GPRM%%a" GOTO ICTPrinter02
    FOR /L %%a IN (16,1,33) DO IF "%COMPUTERNAME%"=="GPRM%%a" GOTO ICTPrinter02

    :ICTPrinter02

    cscript %systemroot%\system32\prnmngr.vbs -x
    rem cscript %systemroot%\system32\prnmngr.vbs -ac -p "\\%GPSSVR%\ICT01_Black"
    cscript %systemroot%\system32\prnmngr.vbs -ac -p "\\%GPSSVR%\ICT02_Colour"
    cscript %systemroot%\system32\prnmngr.vbs -t -p "\\%GPSSVR%\ICT02_Colour"

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,656
    Thank Post
    324
    Thanked 506 Times in 474 Posts
    Rep Power
    177
    Normal loop type,

    Start, Step, End.

    Aka, Start at 1, Increase in 1, End at 9 etc

    Example - (5,-1,0) = 5, 4, 3, 2, 1, 0 etc
    (10,5,50) = 10, 15, 20.... 45, 50

    If that made sense :P

    Steve
    Last edited by Steve21; 16th May 2011 at 03:45 PM.

  3. #3

    Join Date
    May 2008
    Posts
    22
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Thank you, makes perfect sense now

SHARE:
+ Post New Thread

Similar Threads

  1. A Printer Script
    By Ric_ in forum Scripts
    Replies: 164
    Last Post: 1st October 2010, 10:11 AM
  2. printer script again (sorry)
    By chrbb in forum Scripts
    Replies: 1
    Last Post: 11th July 2008, 12:27 PM
  3. Replies: 13
    Last Post: 20th February 2008, 04:29 PM
  4. Printer Script
    By faza in forum Scripts
    Replies: 9
    Last Post: 14th September 2007, 08:30 AM
  5. Logon script & Printer script question.
    By Galway in forum Windows
    Replies: 3
    Last Post: 29th August 2007, 11:00 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •