I am wondering if it is possible to execute JavaScript in a browser window using the command prompt in Windows. Is it possible to start chrome and execute a JS file in that new browser window, all from the command prompt?
            Asked
            
        
        
            Active
            
        
            Viewed 2,222 times
        
    1
            
            
        - 
                    take a look at userscripts (`user.js`) – P1nGu1n Jan 09 '13 at 22:01
- 
                    1It's certainly possible to open a browser to a specific page from the command line... so you could put some JavaScript in an html page and launch a browser so it opens that page. – jahroy Jan 09 '13 at 22:47
- 
                    @jahroy I've been trying for over 30 minutes to achieve something like this as a _.bat_ for an answer (anon func takes `window.location.search` and adds as ` – Paul S. Jan 09 '13 at 22:59
- 
                    Wow... I can't think of anything worse that working with _.bat_ files! – jahroy Jan 09 '13 at 23:18
- 
                    You could look at Adobe AIR. Gives you a Webkit wrapper you can write JS for. – Danny Beckett May 17 '13 at 05:11
1 Answers
1
            
            
        I doubt it.
I just tried this though:
You can put javascript:alert("moo") in the browser's home page url setting, which will run as soon as you open the browser.
 
    
    
        Diodeus - James MacFarlane
        
- 112,730
- 33
- 157
- 176
