Saving Rmd script without preview - rstudio

Whenever I tries to save the working .Rmd script, Rstudio automatically knits the file and this causes my Rstudio to stop for a while ( not responding thing).
How can I save my Rmd file without knitting it ?

Related

Can Firefox be "automated"?

I have a PHP file on the server that creates a backup and then returns it as a zip file. There is no HTML returned, just the ZIP file.
My question is:
How can I call Firefox, pass the URL, and tell it where to save the file, and then have that instance of Firefox close? I plan on using Windows Task Scheduler to call this page once per day. The zip file produced has a unique name.
I've seen the option to pass the url, and that works just fine. I also saw the option to open it in a new window. So far I've tried the code below. It opens the file, and the save file dialog. I want this to happen silently.
If there's a better way to accomplish this using another tool rather than Firefox, that would be very helpful.
firefox -new-window https://example.com/bk/makebackup.php?u=username&p=pw&site=site_to_backup

vbscript encoded file (vbe) not properly working after adding plain vbs

I have encoded vbs(vbe) and plain vbs in one file (.vbe) I create this file programmatically with the help of other .vbs script.
For some reason, when it is created programmatically- (.vbe) file doesnt work. BUT When I open it in notepad and add just a simple space, save it and run again- vbe works perfectly. What can be the reason for that?
Also if I manually copy the code from the opened .vbe and then create in ANSI format new .vbe and paste there my code- it works also as well

How to update a PDF document opened in a viewer on Windows

I am writing a cross-platform application which generates PDF documents and then opens them with the standard PDF viewer. On Linux, updating (re-writing) an already opened document is no problem. The PDF viewer (have tried several) updates the displayed document after overwriting the file. I don't even have to trigger anything. This comes in very handy.
On Windows, however, I cannot overwrite a PDF document opened for reading by some viewer, because the viewers seem to open the document exclusively. Of course I cannot change the code of the viewers like Adobe Reader.
Is there any solution to this? I don't want to clutter the directory with arbitrary new file names, but rather use the same file name again. Deleting of the opened file is also forbidden on Windows.
I cannot determine which PDF viewer is used. In order to open the document, I use
cmd.exe /c start <fileName>

Open an already opened (by others) Excel file with BATCH

I have a BATCH code, which perfectly opens an EXCEL file:
START "C:\office\excel.exe" "C:\tmp\file.xlsx"
BUT: If someone else opens this EXCEL file (via network) and do not close it --> he leaves it opened, then I cannot open this file using my BATCH.
If I click on the EXCEL file, and press ENTER (so opening using windows not batch), the file will be opened, but it alerts me that someone else is locked this file, but I can open it to read or I can request a notice if the other person closes the file.
How could I set in BATCH file, to open the EXCEL (or WORD) file (only for reading) even if it is opened by others (via network)?
The solution is: leave the START command:
"C:\office\excel.exe" "C:\tmp\file.xlsx"

how to detect programmatically when a powerpoint slideshow starts

I would like to write a windows program that would enable the user to choose a ppt file. When that ppt file starts the slideshow, my program would automatically display some message in front of the slideshow. When the slideshow is over, my program would close itself. What do I need to learn to write this program?
I'm not good with VBS (which I'm sure you could use for this) but if you set your show's extensions to .PPS instead of .PPT that will force them to start playing automatically on open. Then you won't need to see when the show starts because you'll control that.
As for opening it, if you write BATCH script you can use it to prompt for a file location but it will all be manually typed because it will load from the command window. If a show opens, the command screen can stay open until that slideshow closes, then continue with the next line of script.
Depending on if these are your powerpoints that you want opened, I personally would put VBA script in them to trigger On_Open and On_Close That will get you a clean customizable popup error message.
Edit
After doing some quick searching the On_Open and On_Close is not found in PPT, you would need to install an add-in.

Resources