MZ Create position for transparent application window.

I'm new to JS and RPGMaker as a whole. I was able to find a forum that addressed a method of which to make a new window of yours transparent which is super cool and works! But now I want to place it in a certain position once opened. Currently it opens in the corner which isn't where I want it to open. Here is the code so far that i've tweaked and modified from the forum mentioned above and after browsing a heck ton of W3schools pages for answers.

Code:
◆Script:const options = {
:      :  frame: false,
:      :  transparent: true
:      :};
:      :
:      :nw.Window.open('Cute.html', "left=700, top=350", options);
:      :let x = myWin.screenX;
:      :let y = myWin.screenY;
:      :document.getElementById("Cute").innerHTML =
:      :"myWin.screenX= " + x + "<br>myWin.screenY= " + y;

Here's the error message too.
Screenshot 2025-01-25 205229.png


Hope this makes sense.
Should be something like this:

const options = {transparent:true,frame:false,};
var newWin=null;
nw.Window.open('Cute.html', options, function(win){newWin = win; win.moveTo(1000,100);});

You can get the opened window using a callback function and store it somewhere. But the method is async so you need to check if newWin is null, you can't just use it right after the open function.
Should be something like this:

const options = {transparent:true,frame:false,};
var newWin=null;
nw.Window.open('Cute.html', options, function(win){newWin = win; win.moveTo(1000,100);});

You can get the opened window using a callback function and store it somewhere. But the method is async so you need to check if newWin is null, you can't just use it right after the open function.
It works! Thank you so much. I also am getting a hang more of Javascript and such so tysm!

Original thread: https://forums.rpgmakerweb.com/threads/create-position-for-transparent-application-window.174957/