Jump to content

Question about Input


Jeaux
 Share

Recommended Posts

Hello All, here's what I need some help with:

Case $button3

$input1 = inputbox ("CD/DVD Drive", "")

$input2 = inputbox ("File Path", "")

runwait (@comspec & " /c " & "echo $input1 $input2 > test.txt", "", @SW_HIDE)

I need to take user input and add it to the command line. The text file that is made has $input1 $input2. How do I get it to use the actual input?

This might be a very easy question, but I have researched for a long time on different ways to get this done. Any help would be welcomed.

Link to comment
Share on other sites

Use GUICtrlRead($input1) respectively GUICtrlRead($input2) to read input line.

Edit: Ops, did not read carefully. GUICtrlRead() is only for GUICtrlCreateInput()!

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

in your current example you have to remove the quotes around the variables so they are not treated as literal strings:

$input1 = inputbox ("CD/DVD Drive", "")
$input2 = inputbox ("File Path", "")

runwait ("cmd /c " & "echo " & $input1 & $input2 & " > c:\testPIPING.txt", "", @SW_HIDE)

run ("notepad c:\testPIPING.txt")

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

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