Jump to content

Easy Question...


Recommended Posts

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 by EndFunc
EndFuncAutoIt is the shiznit. I love it.
Link to comment
Share on other sites

$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

$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 by SniperSA
Link to comment
Share on other sites

$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

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

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 by EndFunc
EndFuncAutoIt is the shiznit. I love it.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...