Skip to content

Commit

Permalink
made running nome code possible on command
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenga1 committed Nov 25, 2022
1 parent 78f826f commit 5140f0a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
25 changes: 16 additions & 9 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,22 @@ function activate(context){
});

let runNomeCode = vscode.commands.registerCommand('nome.runNomeCode', function () {
let uri = vscode.Uri.parse('.\\JIPCAD\\Nome3.exe');
const thing = vscode.env.openExternal(uri);
thing.then(function(value) {
vscode.window.showInformationMessage('Code Run successfully!');
console.log(value);
}, function(error){
vscode.window.showInformationMessage('Code Failed to Run');
console.log(error);
});
let terminal = vscode.window.createTerminal("Nome3 execution");
terminal.show(true);
// terminal.sendText("D:");
// terminal.sendText("cd DEV_JIPCAD/vscode_extension/nome3language")
terminal.sendText("cd JIPCAD");
terminal.sendText("Nome3.exe")

// let uri = vscode.Uri.parse('.\\JIPCAD\\Nome3.exe');
// const thing = vscode.env.openExternal(uri);
// thing.then(function(value) {
// vscode.window.showInformationMessage('Code Run successfully!');
// console.log(value);
// }, function(error){
// vscode.window.showInformationMessage('Code Failed to Run');
// console.log(error);
// });
// let variable = new ActiveXObject("Shell.Application");
// let command = "src\JIPCAD\Nome3.exe";
// const thing = variable.ShellExecute(command,"","","open","1");
Expand Down
13 changes: 13 additions & 0 deletions terminal_demo.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(ns terminal-demo
(:require ["vscode" :as vscode]))


(def terminal (vscode/window.createTerminal "Joyride demo"))


(.show terminal true)
(.sendText terminal "echo hello bash world")
(.sendText terminal "node")
(.sendText terminal "console.log('hello node world')")
(.sendText terminal ".exit")
(.sendText terminal "exit")

0 comments on commit 5140f0a

Please sign in to comment.