Jump to content

is it possible


Recommended Posts

Is this possible? lets say I have this script.

while 1

$1 = "hello"

$text = InputBox("Example", "Type hello into box, and press enter or click ok, and notepad will open, and it will send the text Hello World!!! into notepad.")

If @error = 1 Then

exit

endif

if $text = $1 then

run(notepad.exe")

winwaitactive("Untitled")

sleep(100)

send("Hello World!!!")

endif

wend

Is there any way to do a string split, to where you can t have 10 differnt sayings typing out 6 differnt ones into the input box, getting them to come up into any order that you want them to inside a message box, without having to have a million differn't combinations?

thanks, any help would be appreciated.

Link to comment
Share on other sites

Something like this?

Dim $strSecret = "hello"

$strInput = InputBox("Example", "Type hello into box, and press enter or click ok, and notepad will open, and it will send the text Hello World!!! into notepad.")
If StringLower($strInput) = $strInput Then
    Run("notepad.exe")
    Sleep(500)
    ControlSetText("Untitled - Notepad", "", "[CLASS:Edit;INSTANCE:1]", "Hello World")
EndIf
Link to comment
Share on other sites

Oh sorry, I read the first post wrong, you mean this?

Dim $strSecret[5] = ["hello", "world", "string", "abc", "password"]

$strInput = InputBox("Example", "Type hello into box, and press enter or click ok, and notepad will open, and it will send the text Hello World!!! into notepad.")
For $i = 0 To UBound($strSecret) - 1
    If StringLower($strInput) = $strSecret[$i] Then
        Run("notepad.exe")
        Sleep(500)
        Switch StringLower($strInput)
            Case $strSecret[0]
                ControlSetText("Untitled - Notepad", "", "[CLASS:Edit;INSTANCE:1]", "Hello World")
                ExitLoop
            Case $strSecret[1]
                ControlSetText("Untitled - Notepad", "", "[CLASS:Edit;INSTANCE:1]", "World Hello!")
                ExitLoop
            Case $strSecret[2]
                ControlSetText("Untitled - Notepad", "", "[CLASS:Edit;INSTANCE:1]", "String")
                ExitLoop
            Case $strSecret[3]
                ControlSetText("Untitled - Notepad", "", "[CLASS:Edit;INSTANCE:1]", "abc")
                ExitLoop
            Case $strSecret[4]
                ControlSetText("Untitled - Notepad", "", "[CLASS:Edit;INSTANCE:1]", "password")
                ExitLoop
            Case Else
                ExitLoop
        EndSwitch
    EndIf
Next
Link to comment
Share on other sites

no thats not what i want. I want one for example, that with a code simular to the one you entered, if I typed hello word password in one line it would have typed hello world! password. acually the way it was written, would have been hello world!password if it would have worked. however with 5 differnt sayings it would be 2500 lines needed, but that as well is not what I want. is there any way to do it, with string spit, or something like that?

Link to comment
Share on other sites

@program builder,

You should probably give up on writing your request in paragraph form.

Try this "input and output" style for your request.

Input into the InputBox = ???

Output into Notepad =

=

=

=

=

=

Give enough examples of the output to make the pattern obvious or state that you want it randomized. Also, explaining what this it for might help others to help you.

[size="1"][font="Arial"].[u].[/u][/font][/size]

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...