SniperSA Posted March 27, 2007 Share Posted March 27, 2007 How do I add a variable into like Run or InputBox, like $1 is what I want to add in inputbox and $2 is what I want to add in run. So... InputBox("Hello","You Typed" $1 "Lol!") Run("net user" $2 "*") Link to comment Share on other sites More sharing options...
EndFunc Posted March 27, 2007 Share Posted March 27, 2007 (edited) How do I add a variable into like Run or InputBox, like $1 is what I want to add in inputbox and $2 is what I want to add in run. So... InputBox("Hello","You Typed" $1 "Lol!") Run("net user" $2 "*") $input = InputBox("Input", "Please type your name", "", " M") MsgBox(0,0, "Hi " & $input) That's pretty basic but you can set the var to what you want, read it from the inputbox ect Edited March 27, 2007 by EndFunc EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
SniperSA Posted March 27, 2007 Author Share Posted March 27, 2007 $input = InputBox("Input", "Please type your name", "", " M") MsgBox(0,0, "Hi " & $input)oÝ÷ Ù8Z·l¦··&Ú²'ºÜ¨¹Æ§±ëmëÚ®Ú0«r¢ìÚÞiØ~º&¶¢n^rßêº^jëh×6$3 = InputBox("Change Pass","What would you like" & $2 "'s password to be?") Didn't work... Link to comment Share on other sites More sharing options...
EndFunc Posted March 27, 2007 Share Posted March 27, 2007 $3 = InputBox("Change Pass","What would you like" & $2 "'s password to be?")oÝ÷ Ø8mÂäþ«¨µå¡jÛÚ碳MúÚË©¦vÚ+zÞ±éíZ«yªÞʬzÛbajÛÚ«Oë2¢éÞyÖ§¢Ø^©©iû^¯f®¶sbb33c³2ÒçWD&÷gV÷C´6ævR72gV÷C²ÂgV÷CµvBv÷VÆB÷RƶRgV÷C²fײb33c³"fײgV÷C²b33·277v÷&BFò&SògV÷C² EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
SniperSA Posted March 27, 2007 Author Share Posted March 27, 2007 (edited) $1 = InputBox("Change Pass","If you know what user you want to change the password for, type Yes, if not type No.") If $1 = "Yes" Then $2 = InputBox("Change Pass","What is the user?") $3 = InputBox("Change Pass","What would you like " & $2 & "'s password to be?","","|") $4 = InputBox("Change Pass","Confirm what you have typed.","","|") If $3 = $4 Then Run("net user " & $2 & " *") Sleep(600) Send($3) Send("{Enter}") Sleep(600) Send($3) Send("{Enter}") Msgbox(0,"Change Pass","Password changed successfully!") Else MsgBox(0,"Change Pass","Passwords did not match, change unsuccessful.") EndIf ElseIf $1 = "No" Then MsgBox(0,"Change Pass","To get the user, choose out of the list on the right that I bring up.") Run("cmd") Send("Net User") Send("{Enter}") EndIf That is my code so far. Edited March 27, 2007 by SniperSA Link to comment Share on other sites More sharing options...
EndFunc Posted March 27, 2007 Share Posted March 27, 2007 $1 = InputBox("Change Pass","If you know what user you want to change the password for, type Yes, if not type No.") If $1 = "Yes" Then $2 = InputBox("Change Pass","What is the user?") $3 = InputBox("Change Pass","What would you like " & $2 & "'s password to be?","","|") $4 = InputBox("Change Pass","Confirm what you have typed.","","|") If $3 = $4 Then Run("net user " & $2 & " *") Sleep(600) Send($3) Send("{Enter}") Sleep(600) Send($3) Send("{Enter}") Msgbox(0,"Change Pass","Password changed successfully!") Else MsgBox(0,"Change Pass","Passwords did not match, change unsuccessful.") EndIf ElseIf $1 = "No" Then MsgBox(0,"Change Pass","To get the user, choose out of the list on the right that I bring up.") Run("cmd") Send("Net User") Send("{Enter}") EndIf That is my code so far. Well if you are trying to do it via command prompt then when you run Net User and $2 it's going to flash and then you are going to be sending. $3 into space. Maybe try doing it altogether in the line? EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
SniperSA Posted March 27, 2007 Author Share Posted March 27, 2007 Well, I tested the code, and I ran it in Run before I even added the Run() line. If you try a Net User you know exists (Check by running cmd and typing Net User), Net User Steve * runs a command prompt for me that stays up. Link to comment Share on other sites More sharing options...
EndFunc Posted March 27, 2007 Share Posted March 27, 2007 (edited) Well, I tested the code, and I ran it in Run before I even added the Run() line. If you try a Net User you know exists (Check by running cmd and typing Net User), Net User Steve * runs a command prompt for me that stays up.I see what you're doing, so whats not working then? Edited March 27, 2007 by EndFunc EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
SniperSA Posted March 27, 2007 Author Share Posted March 27, 2007 Just wanted to see what you thought of my code, it's fine. Thanks for the help BTW. Link to comment Share on other sites More sharing options...
EndFunc Posted March 27, 2007 Share Posted March 27, 2007 Just wanted to see what you thought of my code, it's fine. Thanks for the help BTW.Anytime, glad i could help EndFuncAutoIt is the shiznit. I love it. 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