Hi there ;) I'm running on win10 an I'm making a .bat file to

Hi there :wink:
I’m running on win10 an I’m making a .bat file to start laserweb.
After node.js is running, do you know a way to open a chrome windows with the “IP:8000” displayed in the console ?
Or at least run the chrome page to localhost:8000

Actually I can’t run any lines after ‘node server-smoothie.js’ :frowning:

After node.js is strated, It displays the adress IP and the cursor keep blinking. Then when I connect to the board the console displays the coms like:
Recv: <Idle,MPos:10.0000,0.0000,0.0000,WPos:10.0000,0.0000,0.0000>

Thanks Peter :wink: I knew I was close

@Maxime_Favre ​ post the final working bat for others please

Of course ! (I was still playing with chrome view modes :wink: )
I ended with this on the batch file:

CD
CD \laserweb3
start node server-smoothie.js
start C:\chrome_location_folder\chrome.exe --app=“http://YOUR_IP:8000/”

Depending your board, change:
“start node server-smoothie.js”
to:
“start node server-marlin.js”
or
“start node server-grbl.js”

Replace chrome path and IP of the last line accordingly to your settings.

The chrome page open in app mode which if find nice on my pipo9.

+Peter van der Walt​ should we add this to the wiki? Is there any way we can add git pull there?

I’m not certain, but could you use 127.0.0.1 for localhost IP??

@Yuusuf_Sallahuddin_Y ​ yes it’s the same

@Ariel_Yahni_UniKpty Yeah I’m aware it’s the same, but I wasn’t sure if the IP that Maxime mentions in his batch file is able to be filled with 127.0.0.1, since that is localhost. Then the only thing necessary to replace would be “chromepath”.

I just updated the wiki with the instructions. Used localhost as the server. Thanks @Maxime_Favre

@Yuusuf_Sallahuddin_Y ​ wana give a shot at OSX script?

@Ariel_Yahni_UniKpty Never worked with OSX script. I can have a look at it & see how it works though.

Looks like we could use a combination of the things on this article:
https://mathiasbynens.be/notes/shell-script-mac-apps

+Peter van der Walt Is that in the OAuth2 credentials area? I have been playing around with the APIs lately & saw that you have to give “permission” for various domains/url redirects to use the token.

@Maxime_Favre
CD \ CD \laserweb3 git pull start node server-smoothie.js start C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --app=http://localhost:8000/

saved as lw3.cmd (all files)
but nothing happens when I double click it
did I do it wrong?

I saved it as .bat but .cmd should be ok.
Make sure you have a line return for each action:
CD \ (return)
CD \laserweb3 (return)
git pull (return)
start node server-smoothie.js (return)
start C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --app=http://localhost:8000/ (return)

@Maxime_Favre this time I run the commands in command prompt
CD \ (return)
CD \laserweb3 (return)
git pull (return)
start node server-smoothie.js (return)

But in the next line
start C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --app=http://localhost:8000/
I got error message
“Windows cannot find C:\program, make sure you typed the name correctly and try again”

@Maxime_Favre https://drive.google.com/open?id=0B5_IWI68ZqZTNTZ4cGFIWGRnSFE

The command doesn’t like spaces. It doesn’t happen to me because my chrome.exe is located on the user folder, not program files.
Try:
start “” “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” --app=http://localhost:8000/

Tested , it works. @Ariel_Yahni_UniKpty the wiki needs a little update:

cd
cd \laserweb3
git pull
start node server-smoothie.js
start “” “C:\Path_To_Chrome\chrome.exe” --app=http://localhost:8000/

Can you add the return carriage too?

@Maxime_Favre It works , Thanks :slight_smile: