Skip to main content

Notice

If you are using a Hotmail or Outlook email address, please change it now, as Microsoft is rejecting all email from our service outright.
Topic: ConEmu Windows terminal in jscript panel (Read 788 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ConEmu Windows terminal in jscript panel

This guide will describe how to add a ConEmu panel inside foobar2000.



What is ConEmu?
https://conemu.github.io/en/
ConEmu-Maximus5 is a Windows console emulator with tabs, which presents multiple consoles and simple GUI applications as one customizable GUI window with various features.

What will we achieve?
We will have a panel inside foobar2000 to run command line applications and simple GUI windows.

Installation.

1. Install ConEmu from https://www.fosshub.com/ConEmu.html ( you can use any version x86 or x64 )

2. Run ConEmu and change the following values in settings.
2a. Main > Appearance  - Select Single instance mode
2b. Main Taskbar - Deselect Close ConEmu with last tab

3. In an empty jscript panel http://www.foobar2000.org/components/view/foo_jscript_panel add the following code.

for x86
Code: [Select]
var WshShell = new ActiveXObject("WScript.Shell");

hex = window.ID.toString(16);

var cmd = "cmd /c \"" + "\"C:\\Program Files \(x86\)\\ConEmu\\ConEmu.exe\" -insidewnd " + hex + "\"";
fb.trace(cmd);
WshShell.Run(cmd, 0, false);

for x64
Code: [Select]
var WshShell = new ActiveXObject("WScript.Shell");

hex = window.ID.toString(16);

var cmd = "cmd /c \"" + "\"C:\\Program Files\\ConEmu\\ConEmu64.exe\" -insidewnd " + hex + "\"";
fb.trace(cmd);
WshShell.Run(cmd, 0, false);

You should now have the ConEmu panel hooked inside your jscript panel to use anyway you please.
You can dragndrop files from your playlist to the command window to process.

For jscript programmers you can "attach" your commands from another jscript panel  using the following code:

Code: [Select]
cmd = "cmd /k \""+ "\"C:\\Program Files \(x86\)\\ConEmu\\ConEmu\\attach.cmd\" & " + "add_your_command_here" + "\"" ; 

WshShell.Run(cmd, 1, true);

 
SimplePortal 1.0.0 RC1 © 2008-2020