Ron Posted May 5 Share Posted May 5 Hi all, I finally was able to figure out how to automate compilation, so that after I hit Ctrl-F9 to compile a new version of the Unigui application, I can just sit back and relax, as I have two post-build events: 1. Copy the application file to the deploy directory, where the Hyperserver looks for a new file 2. Bring the browser window to front, it is just a VLC program which runs the Windows BringWindowToTop function, using FindWindow and the title: BringWindowToTop(FindWindow( nil,'Your App Title - Opera')); In about 10 seconds the new application is automatically loaded in the browser: 1. There is a timer in the main form, which searches for the deployed file, and shows a "Restarting now"-window, starting countdown 2. There is another timer which counts the number of files in the application directory, as the Hyperserver creates a backup file when loading the deployed file 3. When the deployed file is loaded (as the count is increased), the function uniapplication.restart is run, and the new application loads So what do I save? 1. No need to switch to the browser using Alt-Tab 2. No need to hit F5 to reload the application 3. No need to figure out when to hit F5 to reload the application, as I would have to monitor the directory manually otherwise Now I only need to figure out how the writing of the code may be automated, and then I can take a long vacation. If doing 2-300 compilations a day, you may save quite a bit of time, which may then be spent by looking at the birds and smelling the flowers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.