Fade91 Posted March 25, 2016 Share Posted March 25, 2016 Hi I am trying to record some audio using Linco, however for some reason it won't work! https://romanrm.net/lineincode This is my batch command that does work! (Somehow run this in Autoit ) linco -B 8 -C 1 -R 8000 -D 00:00:10 | oggenc - -r -B 8 -C 1 -R 8000 -o Audio.ogg And this is how I attempted to do it in Autoit ShellExecute("Linco.exe", "-B 8 -C 1 -R 8000 -D 00:00:10 | oggenc - -r -B 8 -C 1 -R 8000 -o Audio.ogg", @ScriptDir) I even tried "Run()" and both "Run()" & "ShellExecute" seem to open the application and pass the parameters, however it fills the console (command window) with very strange letters and numbers as if i's not executing properly. Thank you! Link to comment Share on other sites More sharing options...
AutoBert Posted March 25, 2016 Share Posted March 25, 2016 linco.exe is in @ScriptDir? No, then try: $sLincoPath="Path to Linco Exe" ;with ending backslash ShellExecute($sLincoPath&"Linco.exe", "-B 8 -C 1 -R 8000 -D 00:00:10 | oggenc - -r -B 8 -C 1 -R 8000 -o Audio.ogg") Fade91 1 Link to comment Share on other sites More sharing options...
Fade91 Posted March 26, 2016 Author Share Posted March 26, 2016 I tried this but still doesn't work. ShellExecute(@ScriptDir & "\Linco.exe", "-B 8 -C 1 -R 8000 -D 00:00:10 | oggenc - -r -B 8 -C 1 -R 8000 -o Audio.ogg") It adds a bunch of garbage in the prompt :/ Link to comment Share on other sites More sharing options...
argumentum Posted March 26, 2016 Share Posted March 26, 2016 8 minutes ago, Fade91 said: I tried this but still doesn't work. ShellExecute(@ScriptDir & "\Linco.exe", "-B 8 -C 1 -R 8000 -D 00:00:10 | oggenc - -r -B 8 -C 1 -R 8000 -o Audio.ogg") It adds a bunch of garbage in the prompt :/ this "|" you have there, is a pipe, use Run( @comspec & ' /c "' & the rest . That should do it. Fade91 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Fade91 Posted March 26, 2016 Author Share Posted March 26, 2016 (edited) Run( @comspec & ' /c Linco.exe -B 8 -C 1 -R 8000 -D 00:00:10 | oggenc - -r -B 8 -C 1 -R 8000 -o Audio.ogg') Perfect, that did it! Just a few questions though, what is the purpose of ' /c' and what is a pipeline. How does it differ running it with @Comspec vs Run/ShellExecute. Lots of questions but don't really know where to look for the answers Edited March 26, 2016 by Fade91 Link to comment Share on other sites More sharing options...
argumentum Posted March 26, 2016 Share Posted March 26, 2016 Just now, Fade91 said: Run( @comspec & ' /c Linco.exe -B 8 -C 1 -R 8000 -D 00:00:10 | oggenc - -r -B 8 -C 1 -R 8000 -o Audio.ogg') Perfect, that did it! Just a few questions though, what is the purpose of ' /c' and what is a pipeline. How does it differ running it with comspec vs Run/ShellExecute. Lots of questions but don't really know where to look for the answers no clue, just my experience. Fade91 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
water Posted March 26, 2016 Share Posted March 26, 2016 (edited) "/c" stands for "close". Means: Run( @comspec & ' /c starts the DOS environment and executes the command. When finished it closes the window and exits. Try "/k" to "keep" the window. Useful when you need to debug your code. "|" is the DOS pipe character. Means: It grabs the output of the command left of the pipe character and passes it as input to the command right of the character. Edited March 26, 2016 by water argumentum and Fade91 2 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki 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