Poll: Was this script helpful?

Be advised that this is a public poll: other users can see the choice(s) you selected.

+ Post New Thread
Page 8 of 11 FirstFirst ... 4567891011 LastLast
Results 106 to 120 of 165
Scripts Thread, A Printer Script in Coding and Web Development; Just a note on the split, you can also use it to look at the characters after the hyphen ( ...
  1. #106

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,812
    Thank Post
    3,330
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    Re: A Printer Script

    Just a note on the split, you can also use it to look at the characters after the hyphen ( which is the split character we are using because it is the common denomenator )

    Which you do by altering the index value of x from x(0) to x(1).

    Basically the split goes through the whole string and trys to find any of the characters that we told it to find, in this case the hyphen and it will store any values in between or after the hyphen into an array.

    So if the string we were splitting was RM-01-Computer then

    x(0) would be the first array which would contain RM
    x(1) would be 01
    x(2) would be Computer

    So if I wanted to see what was in the middle of computer and RM then I would just use x(1) as that will always retrieve the middle value assuming that there will be 2 hyphens aka 3 values to retrieve.

    If it was just the case that it will be RM-01 and you wanted what was after RM- then you would use x(1).

    Basically using the arrays index

    Just thought I would mention that because the wiki says


    if you have a hyphen in your computer name and your want to look at the characters before that you could use.....
    which wasn't true

  2. #107

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,592
    Thank Post
    109
    Thanked 769 Times in 598 Posts
    Rep Power
    181

    Re: A Printer Script

    @gecko: It is true because it says "a hyphen" - it would only be incorrect if it said "two hyphens" :P

    I only stuck it in as an example anyway... you can always edit the wiki and add additional bits that you feel would be useful to others (hint hint)

  3. #108

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,812
    Thank Post
    3,330
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    Re: A Printer Script

    fair enough , better find a decent example of the split and post the URL etc lol @ hint hint

  4. #109

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,812
    Thank Post
    3,330
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    Re: A Printer Script

    Any chance you can put a link on that wiki to create a new page so that I can do something similiar to this page :

    http://www.devguru.com/technologies/...Ref/split.html

    But on the coded examples I want to take out all the % symbols and such

  5. #110

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,592
    Thank Post
    109
    Thanked 769 Times in 598 Posts
    Rep Power
    181

    Re: A Printer Script

    @gecko: Scroll to the bottom of the page and hit the 'Edit this page' button. I have added a subheading all about split() just for you

    Just write something like 'Added by...' in italics so we know who to blame :P

  6. #111

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,812
    Thank Post
    3,330
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    Re: A Printer Script

    Quote Originally Posted by Ric_
    @gecko: Scroll to the bottom of the page and hit the 'Edit this page' button. I have added a subheading all about split() just for you

    Just write something like 'Added by...' in italics so we know who to blame :P
    by who to blame..... you mean who to give credit to LOL

    I just wanted to make sure that people knew that it could be used for both the before the common character ( such as the hyphen ) as well as being used after the common character aka the hyphen ( again ).

    So it is useful in both senses without having to use left or right of the computer or client name by so many characters ( because you dont know how many characters different people use ) where as the split just splits regardless of how many characters which saves the hassle of counting by x amount of characters which I thought would save a bit of hassle

    Just one persons opinion and or $0.02 cents

    take it or leave it as they say

  7. #112

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,592
    Thank Post
    109
    Thanked 769 Times in 598 Posts
    Rep Power
    181

    Re: A Printer Script

    @gecko: Only winding you up! :P

    Seriously though... thanks for your input to the wiki. One day we will truly have a great resource

  8. #113

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,812
    Thank Post
    3,330
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    Re: A Printer Script

    maybe being a bit thick here but at the end you show them how to assign the script via startup and logon scripts, but can't you assign it via one or the other and not both and which one would be better to assign it as or does that depend on if they are assigning it via computer objects or user objects ( ie if you assign the script as logon then its to user objects and if its startup then its to computer objects on an OU that contains computer objects )

    If that makes sense ?

    Yeah I gathered you were winding me up lol, I was doing the same, the whole give and take thing

    Could do with a wiki index so that the important things that get wikied can be found quickly as it builds up in a html format so that the index are links that can be clicked on to take people to the relevant sections

  9. #114

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,592
    Thank Post
    109
    Thanked 769 Times in 598 Posts
    Rep Power
    181

    Re: A Printer Script

    You need the startup section for the first section (maybe I should have explained this better - I will revise it when someone unlocks the page for editting )

    The wiki will (hopefully) soon be swallowed by EduGeek 2.0 where everything will be easy to access in a timely fasion

  10. #115

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,812
    Thank Post
    3,330
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    Re: A Printer Script

    I'm done on that page and have been for about 4 mins

    I just wanted to make sure that the 2 code snippers for the split function were showing up as they were meant to and I figured out that I was putting <code> and not <code vb> when I should of been putting <code vb> obviously

  11. #116

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,592
    Thank Post
    109
    Thanked 769 Times in 598 Posts
    Rep Power
    181

    Re: A Printer Script

    lol

  12. #117

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,812
    Thank Post
    3,330
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    Re: A Printer Script

    Im curious, with regards to the permissions thing on the first one, most likely a blonde moment here but you say it fails on the installing of printer drivers, but considering that the printer is actually installed on the server ( print server or whatever you want to call it ).

    and when you script it it is making a connection to the server ( which has the drivers installed already on it ) to the shared printer to be used by multiple users, why would it need the driver on the client machine if its just connecting to the server to tell the printer on the server how to print the document..

    I swear I must be missing something here and Im guessing I will find out soon enough....

    Just with the vbscript coding the commands are

    AddWindowsPrinterConnection
    RemovePrinterConnection

    Etc which makes me think its just a connection and ( Am most likely wrong here otherwise you wouldn't make the script a startup one )

    But if its just a connection why would the client systems need the driver to print to a shared printer ?

    I know that the client systems do need the driver for the relevant printer in question but I just dont understand why if your centralising the printer with the installed driver on that centralised system as to why you would have the need to repeatdly install the driver on all the other systems ?

  13. #118

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: A Printer Script

    No, Windows clients needs the drivers because the job processing is done on the client rather than the server. Stupid, I know.

  14. #119

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,812
    Thank Post
    3,330
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    Re: A Printer Script

    Is that the same on other O/S's with regards to processing it on the client before its sent to a shared printer or is this a microsoft thing or what ?

  15. #120

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,592
    Thank Post
    109
    Thanked 769 Times in 598 Posts
    Rep Power
    181

    Re: A Printer Script

    @gecko: The reason that a AddWindowsPrinterConnection installs the drivers is because Windows tried to copy the drivers from the server if they are available. As the script runs with SYSTEM-level permissions in a startup script, this is successful where it would not be with user-level permissions.

    Not all OSs process the print job themselves. For instance, anything that uses CUPS (e.g. Linux, OS X, Unix, BSD) will do it 'properly'.

SHARE:
+ Post New Thread
Page 8 of 11 FirstFirst ... 4567891011 LastLast

Similar Threads

  1. logon script for printer
    By ozzy in forum Scripts
    Replies: 6
    Last Post: 22nd November 2007, 03:03 PM
  2. Printer Script
    By faza in forum Scripts
    Replies: 9
    Last Post: 14th September 2007, 08:30 AM
  3. Logon script & Printer script question.
    By Galway in forum Windows
    Replies: 3
    Last Post: 29th August 2007, 11:00 AM
  4. Add printer script not workling
    By mark in forum Windows
    Replies: 6
    Last Post: 15th September 2005, 10:07 AM
  5. Script to delete printer
    By tosca925 in forum Scripts
    Replies: 2
    Last Post: 31st August 2005, 07:45 PM

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
  •