Must I use ActiveXObject to open a powerpoint presentation in html - html

I have the following code snippet which simply opens a Powerpoint presentation and calls a VBA macro.
function CallVBA()
{
var App;
App = new ActiveXObject("PowerPoint.Application");
App.Visible = true;
App.Presentations.Open("D:\\Jonathan\\PPtHymns\\b.pptm");
App.Run("Doit");
}
While this works fine on Windows, it does not work on a Mac because of using ActiveX objects.
Is there another way of opening a Powerpoint presentation within a html page?
This may appear to be trivial, but I wish use code to add several new slides and text into the presentation and then run the presentation manually when done.

There appears to be no alternative at present.
As I wanted to build up slides from Excel spreadsheets, the only way to make this happen on both Mac and PC is to create a tab delimited file output from excel. Open the powerpoint app and use javascript/typescript in Script Lab.
So far this can not be done 100% as I can not see any javascript/typescript api's for inserting audio and text shapes and setting slide tansition properties. Perhaps I have missed them. Would someone please confirm?
Many thanks.

Related

Auto-filling web forms

I have to create video-tutorial as help. We have a document with help, but customer want video.
I have found chrome extensions for this purpose - Screencastify (https://www.screencastify.com) for recording chrome tab contenct. It is cool that this tool highlight user clicks.
The best trouble is filling forms. I can't find any tool, or chrome extension or something, whitch is able to fill fluently forms. When I am filling forms, i make some typing errors and typing is not fluent - video tutorial looks unprofesionall and chaotic.
I have tried UI Vision RPA (https://ui.vision/), but this tool does not simulate user click (yes with some extension, but before simulation user click screen becomes green for a while), but there are no highlighted clicked position.
Is there a tool that can simulate a smooth form fill according to a prepared script or a macro - basically something like an auto-run UI test, such as a keyboard shortcut that is able to simulate mouse clicks and fluently write defined form content?
There are lot of ways to do it. All below three allow record and play back.
1. VBA macros in excel,
2. Automated test tools and frameworks like Selenium
3. RPA tools like WinAutomation or automation anywhere etc.
Once you record, you can go to recorded script, correct any spelling mistakes, add any pauses needed, start your screen recorder and play back the script.

Display a editable Google Sheet on a web page

I want to display an editable Google Sheet on a web page.
No problem for that.
The problem: I want to display this sheet without the menus, columns and lines. Is it possible ?
Or display the sheet in full screen mode, but I do not know the javascript function to execute when opening the sheet.
Ex.: https://docs.google.com/spreadsheets/d/1xwheykkZMb806JKNoPGcVl17TpIm4Z9LTLJb8HAhVVk/edit?usp=sharing
How to do ?
Thank you
Go to File > Publish to the Web.
And then, you will see this kind of pop up. You can publish it and also get the link. Google Slide and Docs also have this feature. As you can see it, you can also get embed tag for inserting it in HTML. You can stop publishing with the Stop publishing button whenever you want.
And as far as I know, there is no such thing that you can edit the file with that mode.

Gmail extension/gadget API - how to add a button to the compose toolbar?

I'm trying to figure out how can I add a button to the Gmail compose window.
In "Gmail Labs" they have some extensions that add certain buttons For example "Send & Archive" button and "Inserting images" button, so I assume this is possible.
I checked their API here and it seems that you can either add a gadget to left sidebar or use contextual gadgets that are dependent on the message context. I'm looking for a way to add a button to the toolbar of the compose window, and both options don't seem to support it.
Do you know how can this be done?
If it's not possible using Gmail API, is there another way I can achieve this? Maybe by creating a Google Chrome extension or user scripts?
I would appreciate any info that can direct me in the right direction.
Thanks.
The Gmail Labs have special permissions because they are written by Google Employees, unfortunately we mortals don't have such power. There is a way around it of course and you've correctly pointed out that it is to make a Chrome Extension or a UserScript. If you choose to do a Chrome Extension it will just be a wrapper for a UserScript anyway
You will have to create and inject the button programmatically. This will involve quite a bit of scouring the Gmail source code (spoiler: it's ugly).
Without more details about what you want to do, I won't be able to provide much more help but I can help you with one problem right away. You have to make your script wait until the Gmail loading process is done which is a bit of a challenge. This is the solution I'm currently using in Minimalist:
function bootstrap() {
target = document.querySelectorAll('.vt:not(.SFzvCe)');
if (document.querySelectorAll('html.xiu1Fc, html.aao')[0] == null) {
return;
}
if (target.length > 0) {
// loaded, do stuff
} else {
window.setTimeout(bootstrap, 200);
}
}
window.addEventListener('DOMSubtreeModified', bootstrap);
That version waits for the chat to fully load. Let me know if you have any other questions: #anstosa
You can use InboxSDK for that.
Here is documentation link
Also you have a Hello world repo, where is a solved your problem
hello repo

Execute button inside a ribbon

I want to write a script (C# or AutoIT or VBScript.. whatever works) which should
Get reference of already open outlook application
Iterate through ribbons to find a specific button
Execute that button click
How can I do it?
Use AutomationPeers.
Here is the MSDN article with lots of details:
http://msdn.microsoft.com/en-us/library/ms752331.aspx
Add references to:
UIAutomationClient
UIAutomationClientsideProviders
UIAutomationProvider
UIAutomationTypes
And here is a little C# code snippet of how to get the AutomationId of what currently has focus:
var id = AutomationElement.FocusedElement.Current.AutomationId;
this.txt.Text = id;
You can navigate the entire tree of a window and drive the entire UI using automation peers. This is how accessibility applications interact with applications in Windows. This is also one way that automated UI testing applications do it as well.

Creating Chrome popup with a C++ program

Problem context:
I have a C++ program and a web presence. Currently the way things are working I have made a control panel with javascript and html. And it send commands via an unimportant communication medium to control things or get information from the C++ program.
Now, when the C++ program launches, I'm making it run a
ShellExecute(NULL, "open", addressBuffer," --new-window", NULL, SW_NORMAL);
This is a way of launching the default browser with the given address. The addressBuffer in this case points to an intermediate HTML file that quickly turns around and uses the
window.open()
in Javascript to open the final popup, then closes itself.
The result is the user now has the popup control panel that I want them to have but the user's main browser window also gets given focus, un-minimized, and placed on a different tab than the one they had selected. (Basically pops up out of nowhere and selects a another tab)
Problem:
I'm looking for a way to launch a Chrome popup, without disturbing a previously open browser window. Any ideas or solutions would be very helpful.
Lastly, it's worth noting that the " --new-window" from the code above doesn't actually open a new window like you would expect. In this case it's actually doing nothing... If it did work, none of this would really be an issue.
I know this is wordy so thanks in advance for you time!
-Michael
Alright, I came up with a solution.
Something about how ShellExecute processes it's commands was preventing the command line args to be passed in correctly.
My work-around includes grabbing the path to Chrome from the registry,
HKET_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe
Then simply doing a system() command with the chrome path "--new-window" and the web path.
Then I let the intermediate html page open it's popup and close itself.
Tada done.
Thanks.