darkleton Posted March 1, 2007 Share Posted March 1, 2007 I'm sorry if this sort of thing has already been asked, I did search, honestly! Only downloaded today and have been looking at creating a little GUI for adding users on a domain. Currently use a batch file which uses two variables (initial and surname). I've created two input boxes, and called them $initial and $surname. GUICtrlCreateLabel("First Initial", 10, 70) $initial = GUICtrlCreateInput("", 70, 70, 100, 18) GUICtrlCreateLabel("Surname", 10, 100) $surname = GUICtrlCreateInput("", 70, 100, 100, 18)oÝ÷ ØÛay»¶í¡ÊÞj×ë¬z»h±éݶ¬w趢Êk¢jmÂ+a¢Ø^Ê&©Ý°¬Æ¥("v®±êè|,z²0j{b¶Ú¢Æ¬ªê-ën±êãºÇ«ªê-~ÞÅ©©â7ö÷®'¢ëiºÛb¶%èj·Z±«^²Ûh±ç°«aj^Ì"¶ayÊ&©ÝN¡×¥¢,)¶¬jëh×6ClipPut("net user" & $initial "06" & $surname) I need the username to be in the form of j06user so I thought enclose the text in "" and then add the variables might work, but I get errors when trying to run it. I need a way that I can output the variables in the same string as normal text. Is this possible? Help would be much appreciated. I'm still looking through a lot of the help files for extra info. This is my first time at any sort of coding or scripting so please forgive me if my attempt is way way off target. Thanks! Mike Link to comment Share on other sites More sharing options...
/dev/null Posted March 1, 2007 Share Posted March 1, 2007 (edited) ClipPut("net user" & $initial "06" & $surname) ClipPut("net user" & $initial & "06" & $surname) Edited March 1, 2007 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Will66 Posted March 1, 2007 Share Posted March 1, 2007 #include <GUIConstants.au3> GUICreate("test",500,400) GUICtrlCreateLabel("First Initial", 10, 70) $initial = GUICtrlCreateInput("", 70, 70, 100, 18) GUICtrlCreateLabel("Surname", 10, 100) $surname = GUICtrlCreateInput("", 70, 100, 100, 18) $button1=GUICtrlCreateButton("Enter",70,150) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $button1 Then $initial_Value = GUICtrlRead($initial) $surname_Value = GUICtrlRead($surname) msgbox(0,"testing", "net user" & $initial_Value & "06" & $surname_Value) EndIf Wend Link to comment Share on other sites More sharing options...
darkleton Posted March 1, 2007 Author Share Posted March 1, 2007 thank you both very much. i know right now it only puts out the string to clipboard or a msgbox, but i'm sure from there i can mess around and learn how to make it do other things. i can see this being a superb way of doing all the picky little jobs i have to do. thanks again Link to comment Share on other sites More sharing options...
darkleton Posted March 1, 2007 Author Share Posted March 1, 2007 OK, follow up question.....sorry. I've used the ClipPut command to otuput once the button is pressed and it comes out fine, exactly how I need it. I then changed it to Run(@ComSpec & " /c " & and then my command but it only runs the first part Basically the batch file adds user assigns him to a group creates his home folder assigns permissions on that folder shares that folder I tried putting @CRLF after every section of the commands but the dos prompt only reads the first one. Is there a way I can do the Run() command for adding the user, then do like AND Run() so it will move on to the next. So I can have it running each section individually. I tried using AND and THEN but I'm assuming i am using it in the wrong context. I'll get there in the end! 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