-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows support #4
Comments
Possible solution 1:The StataEditor package uses the above python packages to create a COM connection to Stata. Instead of reinventing the wheel, try to call that python package from Javascript. Make an ajax request to python: $.ajax({
type: "POST",
url: "~/pythoncode.py",
data: { param: text}
}).done(function( o ) {
// do something
}); Note that I think this uses the jQuery package. Here are links to use that with Coffeescript: Other javascript-ajax-python links: 1, 2. Possible solution 2:Do this directly from javascript/coffeescript. Calling a VBScript function from Javascript General ReferencesStata Automation Reference
OLE Automation Wikipedia Note that Javascript is not necessarily the same as JScript. |
The python code is storing Perhaps this: https://www.npmjs.com/package/win32com? You'd need to rewrite the snippet in js/cson, but the syntax looks pretty similar. |
Yeah, I see that |
Fingers crossed. FWIW, the hash repo I used for gtools hasn't been updated in 3 years and it works just fine, but I understand it feels a bit like rolling the dice. Best of luck! |
Thanks!!! I got it to work. To document my progress:
Once everything is correctly installed, the following worked: var winax = require('winax');
var con = new ActiveXObject("stata.StataOLEApp", {
activate: true,
async: true,
type: true
});
con.DoCommandAsync('sysuse auto, clear'); To do:
|
Possibly helpful: https://electronjs.org/docs/tutorial/using-native-node-modules I need to read more about electron |
Likely impossible to have this work from Atom. Atom is built on Electron, which is built on Chrome, and Chrome doesn't support ActiveX. See: |
You can still do batch mode:
Probably the only possibility |
https://atom.io/packages/ide-bash
look into this and see if there's something like this I could do for Stata |
It works!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! From an admin-level command prompt, install
Then rebuild winax against the current electron version. Get the current electron version with
Then rebuild with:
|
Fixed with 1059ae8 |
The key part of StataEditor is here.
The text was updated successfully, but these errors were encountered: