1ST PROBLEM TO SOLVE
At the moment, I use Touch Portal (TP) and WinMover to execute the necessary changes. However, for the presentations, I have to select the specific Sunday Service Powerpoint in edit mode in Google Slides, capture the ID, feed that into TP to get it to load and I employ mouse commands (with co-ordinates) and keyboard controls to select what we need to Present w/ Remote. I then go back to the Streamyard studio, share the screen with selected overlays. That works but if anything changes, especially in Streamyard, I have to change the TP code accordingly. I'd rather use a more accurate and foolproof programming (webscraping) method with AHK, as TP relies on everything being in the same place (window size, the same and unchanged elements, etc.).
I've seen a few videos about webscraping using Internet Explorer and therefore programmers/AHK users taking advantage of COM [I know what it means but have never used it!]. Is the same type of thing possible with AHK within Google Chrome?
2ND PROBLEM TO SOLVE
Our Powerpoints are always the same format, it's the date in UK format with date suffix and".pptx" as the extension. I've created a hotstring and associated function for this, however, it doesn't work properly. Today is the 2nd and the output is 2th! That's only satisfactory for a dentist!
Code: Select all
:*:]ds::
FormatTime, CurrentDate,, d ; get the day first
sfx := F(%CurrentDate%) ; add the suffix using the F(d) function
spc := " " ; store a space in a variable
pptx :=".pptx" ; store the PPTX extension in a variable
SendInput %CurrentDate%%sfx%%spc% ; output the date and suffix with a space
FormatTime, CurrentDate,, MMMM yyyy ; get the month and year
SendInput %CurrentDate%%pptx% ; add this to the date and suffix
Return
F(D) { ; 💋 (Keep it Simple Stupid)
Static Special := {1: "st", 2: "nd", 3: "rd", 21: "st", 22: "nd", 23: "rd", 31: "st"}
Return D . ((S := Special[D]) ? S : "th")
}
Any help would be most appreciated. Thanks in advance.