Stimorol Posted October 14, 2013 Posted October 14, 2013 Quick and easy. How do I translate this simple batch script into a working executable with AutoIT: @echo off set /p id="Stream: " %=% cd c:\program files (x86)\livestreamer livestreamer.exe -url twitch.tv/%id% best Basically I need the script to run this next command in a CMD and keep it open: cd c:\program files (x86)\livestreamer&&livestreamer.exe -url twitch.tv/%id% best I thought it was something like this but it doesnt work: Local $streamname = InputBox("Livestreamer", "What Stream do you want to watch?", "", "") RunWait(@ComSpec & ' /k ' & "cd c:\program files (x86)\livestreamer&&livestreamer.exe -url twitch.tv/"$streamname" best") Can you help me?
Moderators Solution JLogan3o13 Posted October 14, 2013 Moderators Solution Posted October 14, 2013 (edited) "It doesn't work" doesn't help us a lot. What error are you seeing when you run your code? Edit: Try changing this: RunWait(@ComSpec & ' /k ' & "cd c:\program files (x86)\livestreamer&&livestreamer.exe -url twitch.tv/"$streamname" best") To this: RunWait(@ComSpec & ' /k ' & "cd c:\program files (x86)\livestreamer&&livestreamer.exe -url twitch.tv/" & $streamname & " best") Edited October 14, 2013 by JLogan3o13 Stimorol 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
UEZ Posted October 14, 2013 Posted October 14, 2013 (edited) Try this line instead: RunWait(@ComSpec & ' /k "C:\program files (x86)\livestreamer\livestreamer.exe" -url twitch.tv/' & $streamname & ' best') Br, UEZ Edited October 14, 2013 by UEZ Stimorol 1 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
iamtheky Posted October 14, 2013 Posted October 14, 2013 same conclusion: you may want to start using msgbox to check your commands as the errors tend to stand out when you see the whole string $streamname = "THISSTREAM" ;your result msgbox(0 , '' , '"cd c:\program files (x86)\livestreamer&&livestreamer.exe -url twitch.tv/"$streamname" best"') ;what i guess you want msgbox(0 , '' , "cd c:\program files (x86)\livestreamer\livestreamer.exe -url twitch.tv/" & $streamname & " best") Stimorol 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
Stimorol Posted October 15, 2013 Author Posted October 15, 2013 "It doesn't work" doesn't help us a lot. What error are you seeing when you run your code? Edit: Try changing this: RunWait(@ComSpec & ' /k ' & "cd c:\program files (x86)\livestreamer&&livestreamer.exe -url twitch.tv/"$streamname" best") To this: RunWait(@ComSpec & ' /k ' & "cd c:\program files (x86)\livestreamer&&livestreamer.exe -url twitch.tv/" & $streamname & " best") Thanks Logan. Also thank you UEZ and boththose.
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