techadmin32
Members-
Posts
10 -
Joined
-
Last visited
Content Type
Forums
News
20th
EduGeek EDIT Conference
Blogs
Everything posted by techadmin32
-
need Script to ask user if they want to begin again
techadmin32 replied to techadmin32's topic in Scripts
Thats exactly what we need. Awesome! Thanks Ben! -
need Script to ask user if they want to begin again
techadmin32 replied to techadmin32's topic in Scripts
What's up Ben? No its cool i just changed a few thing s so nothing would be exactly like our network. im just concerned with the last part. I tried writing you but it said your Pm's were full. No I took what you helped me with before and made it do another function that will have a lot more use. I couldn't really find another site that provided me with an idea of what I'm looking for. I'd like to make it all possible with excel but the way our net apps work it's not quite there yet. They need certain files we use to not have macros. So from what I looked up tho, please correct me if I'm wrong but I would need to create a variable to serve as a function that reopened the script file itself or loops back to the top. I looked up the message cancel thing too and I tried puttin it in but all it did was produce message box saying cancel was pressed and stopped the script. It didn't restart it when I created the variable for the file and tried to run it in the last if then portions. It just erred and said the obj I created was undefined. It went thru the questions and stopped there. Cancel doesn't have to work tho. That's no big deal but it would be cool. -
I have a script that creates a file and writes lines of text based on the users input one line at a time but I have to run the script each time by clicking on it. I need to eliminate as many steps as possible to help cut down the time it takes us because our SLA is getting reduced. So, I need the script to ask me if I want to continue and then if not I need the script to close. This is what I have so far. I am also having trouble getting the Cancel button to work. I've tried several things and no matter what I add to the below script its just not working. many thanks for the assistance. Option Explicit dim login, groupname, touname, x, startover, strfile, objFSO, objFile strFile = "C:\Documents and Settings\username\Desktop\output.txt" Sub GetInput() Do While X = 0 login = InputBox ("Please enter the user's ID.","Step 1") If login = "" Then Wscript.Echo "You must enter the user's ID." Else Exit Do End If Loop Do While X = 0 groupname = InputBox ("Please enter the groupname.","Step 2") If groupname = "" Then Wscript.Echo "You must enter the groupname." Else Exit Do End If Loop Do While X = 0 startover = InputBox ("Type y and hit enter to run again","Step 3") If startover = "y" Then Else Exit Do End If Loop End Sub Call GetInput set objFSO = CreateObject("Scripting.FileSystemObject") set objFile = objFSO.OpenTextFile(strFile, 8, True) objFile.WriteLine(login & ":AD User:Active Directory:CN=" & groupname) objFile.Close
-
Sorry about that Mordy. I cant grab it right now because I'm at the office but I will when I get home. Our homeusers are very interested in it. I brought it up at our last meeting and we are all looking forward to revamping the process. You guys were a tremendous help and now I'm going to finish my degree, hehe. kind a inspired me.
-
It says the errors in line 86 char 1. I don't see the error? it looks like it makes sense to me. I'm on my home machine and I'm logged in with the admin account. I cant see any thing that looks out of place. I'm thinking if I'm looking at the right line its trying to save it. I cant get it to the part where it saves the file so I can't see if the vbscript works as far as generating the input in the form of a text file with the pipes. I edited this line like so strFile = "c:\Users\username\Desktop\NewHireImports.txt" Thanks for the help Ben and MordyT!
-
Both your responses are outstanding and I'm going to bring up both of them. The vbscript gave me a permission denied after i went through it. I don't it would act like I cant save to my own desktop. I think thats what might be causing it, a permissions issue maybe? I'm I really love Mordy's exe but my boss has his way of doing things and it might be too much legwork for him because he'd have to approve it. It would be useful to all our home workers so I am still going to let him check it out. Home users use their home PC so this is great for them no matter what. At the corporate office where things are stricter that VBscript is perfect because its easier for us to use without the hassle of getting other managers to approve it. Home users though will definitely appreciate the exe without a doubt so both of them will be used. Thanks so much really. I just signed up for the website and I am really impressed. Great resource!
-
I tried to run it and i think line 2 had an extra comma and then I went to run it again. Now, im working on line 89. Its the one where it adds in the pipes. For some reason it doesnt like that line. I'm really getting more interest in vb these days. If you know a good book I'll get a copy and check it out. At the end of line 2 I got an expected identifier error and it looked like after objfso, was making the script expect another identifier? lol, so i deleted the comma. i really have no idea i was just guessing but line 89's got me.
-
It works great. I really like it so hopefully we will be able to use it. I know they have a software approval process and I think it would be awesome. The only thing that I think might be a road block is its too advanced for what my boss thinks. its hard to change old dogs, ya kno? If it was a little simpler like a vbs script that we could edit because there are other signs other than the | sign that we use and I could play with the script with other situations because ascript that does this would be very versatile. I think so many people could use it in data entry jobs. this is the first IT job ive had that has a data entry feel to it. its an infosec position and to me it reminds me of HR work. im used to AD admin type work.
-
thanks for responding! no theres no hurry. its not a task I was given or anything. it would just be something really cool I could bring to the table that would make a lasting impact. I want to make an impression by taking something that I think could be automated and it needs to be done daily so it would be a tremendous time saver. I'm taking responsibility for something to ease the workload so what better way to do it then with this script. there is a heavy workload; which is good, lol. job employment. but ya, I'm wasnt asked to do it and its just a secret project I'm working on so once its all set I can present it to the table. Thanks again! it would be so awesome.
-
I just got a nice job after I got out of the military but I really need to make myself more useful so that they will decide to keep me. I've been working very hard to make the best impression here so this would really help in making me stand out. If you help me with that script it will help me so much. This script would simplify the work I do and take a job that takes 10 minutes to do per job and condense it to a matter of seconds. Here is what I need. I need to create a text file that takes user input and separates each word provided and separates them by a | or a series of pipes. I need the script to ask the user for the new hire's login, the new hires name, the cost center, the vendor, the manager, the date of birth, and "is there another new hire;" which would then prompt the script to run through the questions again to provide a second line of out put and a third etc etc. until the user ansers "no" to the new hire question. Now, the output from each series of the 6 questions needs to contain the users input plus the pipes with a few special additions to the output. Basically, in out organization we assign a user ID that is a letter and then a number which may have the letter A at the end. That will be provided by the user in the first question, First question: "What is the new hires login?" the script will take that login name for the first question and the text it will add first to the line of output will look like this: N55555A|55555A *Notice that here the new hire's login is generated twice but the second time the first letter is not present. This must be this way for future reporting and auditing. If another question asking for the last 6 of the user's login needs to be added to create this line that will work. The second question, "What is the new hires first and last name?" It will take that in put and add the | signs in the following manner: N55555A|55555A|Jon|Doe The next question: "What is the new hire's cost center?" That input will be added to the line with the pipes like so: N55555A|55555A|Jon|Doe|||||||||||||55555 The next question: "What is the new hire's vendor company name?" That input will add to the output line as follows: N55555A|55555A|Jon|Doe|||||||||||||55555||Personnel Consulting LLC The next question: "What is the new hire's location code?" That input will add to the output: N55555A|55555A|Jon|Doe|||||||||||||55555||Personnel Consulting LLC|Headquarters|||||||||||||| The next question: "What is the hiring manager's user ID?" That input will add to the line with the pipes as follows: N55555A|55555A|Jon|Doe|||||||||||||55555||Personnel Consulting LLC|Headquarters||||||||||||||U451492|451492 *Notice that here the manager's login is generated twice but the second time the first letter is not present. This must also be this way for reporting. If another question asking for the last 6 of the user's login needs to be added to create this line that will be fine. The next question: "What is the last 6 of the new hire's ssn or what is 2 digit month, 2 digit day, and first and last initial in capital letters?" In some situations the new hire may not have an ssn so the date of birth needs provided. Either way that input needs to be added at the end of the line of text as follows: N55555A|55555A|Jon|Doe|||||||||||||55555||Personnel Consulting LLC|Headquarters||||||||||||||U555555|555555||||0304JD The next question the answer will not be recorded in the text file that will be generated at the end. "Is there another new hire?" The answer to the above question will either prompt the script to run through the questions again to create an additional line of data for an additional new hire or it will prompt the script to save the line of text created by the script to a text file on the user's desktop and close. If the answer to the next question is Yes it will save the additional line of data underneath the first line like so: N55555A|55555A|Jon|Doe|||||||||||||55555||Personnel Consulting LLC|Headquarters||||||||||||||U555555|555555||||0304JD N55556A|55556A|Jane|Doe|||||||||||||55555||Personnel Consulting LLC|Headquarters||||||||||||||U555555|555555||||0203JD I need this script to create the above text based on the questions into a text file so I can copy that text and paste it into another program. I would appreciate the help so much as it would help me keep my job in this economy. Thank you very much for any help.
