savj14 Posted August 24, 2007 Share Posted August 24, 2007 I am pretty new to the world of scripting and need some help. It would be greatly appreciatedWhat I would like to do is this Get Input from a User (Username and Password) via Gui Input box.Then Launch a Program call JoindomDisable User Input/Mouse ControlInsert Domain Info (meaning I will type in the needed information)Insert User's Input where (insert the username and password where needed)End the Application Joindom when it is finishedEnable User Input/Mouse ControlForce a Computer Restart (With click Ok to restart) and no option to cancel or quit at that pointYou can find the Joindom application I am using HereIs there a way to package this up into One EXE File? So all the user has to do is run the EXE and not have to save two EXE and reference the joindom app? Link to comment Share on other sites More sharing options...
cramaboule Posted August 24, 2007 Share Posted August 24, 2007 (edited) I am pretty new to the world of scripting and need some help. It would be greatly appreciatedWhat I would like to do is this Get Input from a User (Username and Password) via Gui Input box.Then Launch a Program call JoindomDisable User Input/Mouse ControlInsert Domain Info (meaning I will type in the needed information)Insert User's Input where (insert the username and password where needed)End the Application Joindom when it is finishedEnable User Input/Mouse ControlForce a Computer Restart (With click Ok to restart) and no option to cancel or quit at that pointYou can find the Joindom application I am using HereIs there a way to package this up into One EXE File? So all the user has to do is run the EXE and not have to save two EXE and reference the joindom app?Hi savj14All you ask looks possible. I myself wrote a small autoit script to configure the laptop of the people, to set up the proxies for IE and FF, map the drives, and so on,...You can find a lot of help in the Help file with exemple and so on... very cool !In this forum we are not so.... "willing" to open exe file but much more open to help you if you put your code in your post.EDIT: Typo Edited August 24, 2007 by cramaboule My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
weaponx Posted August 24, 2007 Share Posted August 24, 2007 Did you look at whowd's Join Domain GUI from MAy 2006? http://www.autoitscript.com/forum/index.ph...p;hl=joindomain Link to comment Share on other sites More sharing options...
savj14 Posted August 24, 2007 Author Share Posted August 24, 2007 Did you look at whowd's Join Domain GUI from MAy 2006? http://www.autoitscript.com/forum/index.ph...p;hl=joindomainI did find that but I couldn't get it to work properly. It would accept the username and password but then came back with some error messages. If I could get that to work I wouldn't mind using it.Thanks for the info. Link to comment Share on other sites More sharing options...
savj14 Posted August 25, 2007 Author Share Posted August 25, 2007 Here is what I have so far.......... I am a little stumped here It will take the user input. It will run Joindoom. It will fill in DETTEST in the first box of Joindoom. It will put DETTEST\ in the second box. But it will not follow that with the User Input. It puts the Number 4 there. GUICreate("Enter Login Credentials :",250,90) GUICtrlCreateLabel ("Username:",10, 10,60,21) $E=GUICtrlCreateEdit ("", 70, 6,175,19) $K=GUICtrlCreateButton("OK",100,60,50) GUISetState(@SW_Show) While 1 $msg = GUIGetMsg() Select Case $msg=-3 ExitLoop Case $msg=$K Run("c:\joindom.exe") ExitLoop EndSelect WEnd WinActivate("Join Domain App", "") WinWait("Join Domain App", "", 3) Send("DETTEST") Send("{TAB}") Send("DETTEST\"& $E) Also, is there a way to make sure a user inputs data and not leave it blank?? And hitting Enter is not the same as click "OK" it just returns the GUI??? Please help this newbie Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 25, 2007 Share Posted August 25, 2007 $E=GUICtrlCreateEdit ("", 70, 6,175,19) ; ... Send("DETTEST\"& $E) That is sending the ControlID of the Edit, not it's contents. Try something more like: Send("DETTEST\" & GuiCtrlRead($E)) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
savj14 Posted August 26, 2007 Author Share Posted August 26, 2007 All right I am revamping completely and I am going about this in a different way. I am going to be using the traditional way of Joining a Domain through the control panel, system, computer name, change. I am going to be automating this process though. I really want to Use the GUI for gathering user input. Here is what I have so far: Do $Username=InputBox("Credentials","Username:") If $Username = "" Then MsgBox(1,"Are you Sure you want to Quit?") Else $PortalID=InputBox("Credentials", "Please Enter Your Portal ID") EndIf Until $Username <> "" Run("control sysdm.cpl,,1 -1") WinWaitActive("System Properties") Send("!c") Send("{BS}") Send("K212-"& $PortalID) Send("{TAB 2}") Send("{UP}") Send("{TAB}") Send("HOME") Send("{TAB}") Send("{ENTER}") Send($Username) Send("{TAB}") Send("password") Send("{ENTER}") WinWait("Computer Name Changes","Welcome to the", 5) WinWait("Computer Name Changes","You must restart this computer for the changes to take effect.", 5) Send("{ENTER}") Now I'd like to have the GUI to have a box for the Username and Portal ID. Then I want a Radio button for Laptop and Desktop. And I want to check to make sure a Username and Portal ID is entered and not left blank. And a check to make sure that a Radio button is picked for either a Laptop or Desktop. If any of these are missing I want to shoot a Message box out to the user. I have created something simialr in VB Script and Visual Studio.Net. I can't seem to convert this. I have no idea how to do this...........Can someone help me out?? Link to comment Share on other sites More sharing options...
savj14 Posted August 27, 2007 Author Share Posted August 27, 2007 bump Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 27, 2007 Share Posted August 27, 2007 All right I am revamping completely and I am going about this in a different way. I am going to be using the traditional way of Joining a Domain through the control panel, system, computer name, change. I am going to be automating this process though. I really want to Use the GUI for gathering user input. Here is what I have so far: Do $Username=InputBox("Credentials","Username:") If $Username = "" Then MsgBox(1,"Are you Sure you want to Quit?") Else $PortalID=InputBox("Credentials", "Please Enter Your Portal ID") EndIf Until $Username <> "" Run("control sysdm.cpl,,1 -1") WinWaitActive("System Properties") Send("!c") Send("{BS}") Send("K212-"& $PortalID) Send("{TAB 2}") Send("{UP}") Send("{TAB}") Send("HOME") Send("{TAB}") Send("{ENTER}") Send($Username) Send("{TAB}") Send("password") Send("{ENTER}") WinWait("Computer Name Changes","Welcome to the", 5) WinWait("Computer Name Changes","You must restart this computer for the changes to take effect.", 5) Send("{ENTER}") Now I'd like to have the GUI to have a box for the Username and Portal ID. Then I want a Radio button for Laptop and Desktop. And I want to check to make sure a Username and Portal ID is entered and not left blank. And a check to make sure that a Radio button is picked for either a Laptop or Desktop. If any of these are missing I want to shoot a Message box out to the user. I have created something simialr in VB Script and Visual Studio.Net. I can't seem to convert this. I have no idea how to do this...........Can someone help me out?? You said you wanted a GUI but you just poked an InputBox() in there. Read the help file on GuiCreate(), GuiCtrlCreateInput(), and run the examples there. Plus check out the tutorial scripts in the help file. You'll be coding GUIs in no time! If you get stuck post some (GUI) code for help. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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