Initial commit
This commit is contained in:
50
app/js/hold testing.js
Normal file
50
app/js/hold testing.js
Normal file
@@ -0,0 +1,50 @@
|
||||
const { shell } = require('electron');
|
||||
const fs = require('fs');
|
||||
const screen = require('screen');
|
||||
|
||||
const path = '';
|
||||
const filename = 'test.txt';
|
||||
|
||||
//Check if file exists
|
||||
if(fs.existsSync(filename)) {
|
||||
} else {
|
||||
console.log("File does not exist. Creating new file.")
|
||||
fs.writeFile(filename, '', (err) => {
|
||||
if(err)
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
|
||||
//shell.openItem('test.txt');
|
||||
|
||||
/*
|
||||
const path = './';
|
||||
if (fs.stat.isDirectory(path)) {
|
||||
console.log('Directory');
|
||||
} else {
|
||||
console.log('File or nothing');
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
function testing() {
|
||||
console.log(api_temporary_token);
|
||||
}
|
||||
*/
|
||||
|
||||
/* Testing inter-process communication (IPC) */
|
||||
/*
|
||||
var ipc = require('electron').ipcRenderer;
|
||||
var authButton = document.getElementById('test_button');
|
||||
authButton.addEventListener('click', function(){
|
||||
ipc.once('action_reply', function(event, response){
|
||||
processResponse(response);
|
||||
})
|
||||
//ipc.send('invoke_action', 'Test PowerPoint.pptx');
|
||||
ipc.send('invoke_action', api_temporary_token);
|
||||
});
|
||||
|
||||
function processResponse(response) {
|
||||
document.getElementById('response').innerHTML = "Response: "+response;
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user