Mar 14

To update an image in Google Slides via a URL every day, you can use Google Apps Script. Here’s a step-by-step guide on how to do this:

  1. Open the Google Slides presentation where you’ve inserted the image via URL.
  2. Click on Tools > Script editor. This will open a new tab with the Google Apps Script editor.
  3. In the script editor, paste the following code:
    function updateImage() {
    var slide = SlidesApp.getActivePresentation().getSlides()[0]; // Change the slide index if needed
    var imageUrl = “INSERT_IMAGE_URL_HERE”; // Replace with your image URL
    var image = slide.getImages()[0]; // Change the image index if needed
    image.replace(imageUrl);
    }
  1. Replace “INSERT_IMAGE_URL_HERE” in the code with the URL of the image you want to update.
  2. Save the script with a name (e.g. “Update Image Script”).
  3. Click on the clock icon in the script editor toolbar to open the Triggers dialog.
  4. Click on the “Add Trigger” button.
  5. In the “Run” dropdown, select the name of your function (“updateImage”).
  6. In the “Select event type” dropdown, select “Time-driven.”
  7. Set the time interval you want the image to be updated (e.g. every day at 9:00 AM).
  8. Click on the “Save” button to create the trigger.

That’s it! Now the script will run every day at the specified time and update the image in the first slide of your Google Slides presentation with the new URL you’ve provided.

Share
Feb 15

Have a PC that is crawling with malware.  Tron is your friend!  https://www.reddit.com/r/TronScript/

Share
Jan 17

I have a older program who’s backup process is a bit flaky.   And there is no notification to me on whether it actually backed up or not.   Then I ran across this little program called Blat (www.blat.net), and it gave me an idea.  I now have a script that runs after the scheduled backup window (via Task Scheduler) to check to see if the file is actually in the backup folder and if not, to email me.

Here is the script:

If exist “\\server\share$\backups\*.zip” goto Worked
: DidNotWork
<path to blat>\blat.exe – -body “Backup did not work!!!” -to <email> -server <emailserver>-f <from email address> -subject “Backup did not work!!!”
:Worked

Just change the items in the bracket <> and the subject and body (if you want to).

Share
Apr 15

I found a great article about a script to mount a TrueCrypt Volume on Windows here.  It also detailed a script to unmount the volume.

I decided to improve on it a bit, and allow the same script to mount and unmount the volume (by testing to see if the volume is mounted).  I did not include his password parameter because TrueCrypt will ask for the password anyway. And I really don’t want to code my password into any script.

So here is the script:

REM TrueCrypt mounting script (version 2)
REM Based on script Written by Mark Ursino (allthingsmarked.com)
REM Modified by Zen (Zenmojo.com)
REM Modifications are allowed, but please include these comments
@echo off

set TrueSource=I:\TrueCrypt\truecrypt
set Source=I:\volume.cab
set Drive=O:

IF EXIST “%Drive%” goto unmount

:mount
cls
“%TrueSource%” /v “%Source%” /l “%Drive%” /m /a /p /q
explorer.exe “%Drive%”
cls
goto end

:unmount
cls
“%TrueSource%” /d”%Drive%” /q
cls
goto end

:end
cls

Notes:
TrueSource is the location of your truecrypt.sys file (from the stand-alone version of TrueCrypt)
Source is the source of your TrueCrypt file
Drive is the drive letter you want to mount the file to

Share
Sep 05

I never could find a good script to check to see if a Macromedia Contribute key had been installed for a user on a machine, and if not then to run the key. So I made one. This one is for Contribute 2, but I think it will work with 3 (if you change the Site folder to 3). And it assumes that the user will only be running one Site. I make the Contribute Icon/Shortcut point to this script.

You will need to change “h:\key.stc” to the location of your key. You will need to save the following script as a .vbs

Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objNetwork = WScript.CreateObject(“WScript.Network”)
strUserName = objNetwork.UserName
If objFSO.FileExists(“C:\Documents and Settings\” & strUserName & “\Local Settings\Application Data\Macromedia\Contribute 2\Sites\Site1\_mm\contribute.xml”) Then
Set wshShell = WScript.CreateObject (“WSCript.shell”)
wshshell.run “””C:\Program Files\Macromedia\Contribute 2\Contribute.exe”””, 6, True
set wshshell = nothing
Wscript.Quit
Else
Wscript.Echo “Your Contribute Key needs to be installed on this computer. Click OK to begin.”
Set wshShell = WScript.CreateObject (“WSCript.shell”)
wshshell.run “h:\key.stc”, 6, True
set wshshell = nothing
End If

References:
1) http://www.microsoft.com/technet/scriptcenter/resources/qanda/jun05/hey0620.mspx
2) http://weblogs.asp.net/steveschofield/archive/2004/03/14/89240.aspx
3) http://www.computerperformance.co.uk/Logon/Logon_HomeDirAdv.htm

Share