no it is not.
I mean, really. The whole process is as much as checking if file changed, and kindly asking browser to reload a tab if it did. Second part is slightly harder, but, fortunately, there is WinAPI with it's SendMessage support.
To keep things simple, I've just went and wrote the following micro-code in AutoIt:
$time1 = "" While 1 $time0 = $time1 $time1 = fileGetTime("C:/Temp/NewProject/bin/NewProject.js", 0, 1) if ($time1 <> "") and ($time0 <> $time1) then consoleWrite("Update: " & $time1 & @CRLF) $p = winGetHandle("[ACTIVE]") ; get current active window controlSend("New Project - Google Chrome", _ ; window title "", "", _ ; component "^r") winActivate($p) ; switch back to current active window endif sleep(500) wend
How to use it:
- Open your desired JS+HTML application in a (preferably separate) browser window
- Input window title text into code (you can guess where it goes by a comment saying "window title")
- Input "changing" files location into code (if you are working on game, it's probably the main .js file)
- Run the script (F5 if you are using the customized SciTE that comes with AutoIt)
- Now, whenever the file is modified, script will refresh the browser tab, ensuring that it is of current version.
- Once done with it, terminate the script (either via SciTE, or by adding a exit hotkey to code)
Obviously this wouldn't be a "full-blown" solution, but that's a start.
I may also publish a larger example of this later.