Press button in application using perl - perl

How do I control an application using perl script. Once the application is opened, how can I press a button on the GUI of the application.
for eg:- after opening IDM, I want to add a new download. For doing that how do I press the "Add url button"
Please help

I have no idea what IDM is, you don't tell us this or what platform you're on. To automate applications on Windows use Win32::GuiTest, X11 -> X11::GUITest. The documentatoin for each links to pages explaing the theory, code samples and tutorials.

Related

Can I create a QR code to install a web app?

I'm a huge begginer in programming and I want help about coding mobile stuff.
Actually, I want to create a QR code which allows to add an icon linked to a web app.
For example, I want to add figma web app on my phone. Usually, I would go the website, choose the option "add on my homescreen" and validate my choice. But I want to minimize the steps by just scanning a qr code to directly have the choice to add the web app.
To illustrate :
1. figma website
2. go to the options to add an icon of figma on my homescreen
3. validate my choice
4. the app is on my homescreen !
But I want this :
1. scan the qr code
2. Validate the action
3. The app is on my homescreen !
I suppose that it would be different depending the os that I use but if I can configure a QR code for ios and one for android it would be perfect !
I've started to generate QR code and modify the encoded text but I've found nothing interesting. Maybe I just simply don't have the right to do this i don't know ?
Is it a story of URI scheme or deep link ?
Anyway thanks for the help, it's still interesting to improve knowledge on something that could work (or not!).
This article is useful, it worth to have a look: https://web.dev/customize-install/
Alright this is the method that I used:
The QR code should contain a URL with a parameter that can be used to indicate that the installation flow should start, something like www.myapp.com/dashboard?installPWA=true, once you scan the QR code this will redirect you to that page on your phone, in that page you need to have code to handle the installation, for instance you can have a button that it only shows when the installPWA parameter is true and the PWA is not installed yet, the button could have an event listener that will trigger the install prompt
button.addEventListener('click', function (e) {
// Show the install prompt
deferredPrompt.prompt();
});
using an approach like the button one is important because the prompt must be called with a user gesture (https://developers.google.com/web/updates/2018/06/a2hs-updates)2, this mean the user need to actively click the button, you can just use different ways to promote your app to the user.

How to make a background macOS application?

I'm trying to develop a macOS app that performs operations on a file when the user chooses to do so. My goal is to let a user right-click a file, select my app from the list of services so that the app will pop open a UI with things like configuration options, etc.
A prime example would be Evernote's "Add to Evernote"; when a user clicks it, the Evernote app opens and saves the file there. In addition, I need to switch control to the UI, so that the user can input some settings, before performing any file operations.
The place where I'm stuck now is how to get the app/UI open when the user clicks it from the contextual menu, as well as keeping the UI hidden initially. From some googling, I think what I need to make is an agent? I'm not really sure.
Any help would be appreciated, thanks!

Share a same popup window among different addin instances

I am making an Excel add-in by Excel JavaScript API. There is a button in this add-in, clicking on it launches popup = window.open("https://localhost:3000/#/new/", "popup", "width=1000, height=1100") and popups a browser window.
Closing the workbook or the add-in will NOT systematically close the popup. So at the moment, if I open a workbook and the add-in again, and click on the button, another browser window will popup.
I am thinking if it is possible to always use the same popup for all the excel/add-in instances. We could use localstorage to share information among different excel/add-in instances, but I am not sure if it is possible to save the popup/window there.
Does anyone have any good idea to achieve this?
For Office Add-ins, you should be using the built in Dialog API. This API ensures popups are properly handled regardless of platform (i.e. across browsers, mobile and desktop clients).
The Dialog object supports a close method, allowing you to close any open dialogs from the parent taskpane.

Where should I open initial dialogs in an Eclipse application?

I have an Eclipse RCP application. When the application is started I want to immediately present the user with a login dialog. Where is the best place to do this?
I've tried to use various hooks in the WorkbenchAdvisor and WorkbenchWindowAdvisor, but all of these open a dialog before the application had a task bar icon. In this case the dialog can easily be moved behind other windows and there will be no visual indication that the application is open, and the user might open several instances of the application by mistake.
I could force the dialog to be on top, but that's not a good solution. I want a proper modal dialog. A good example of such a dialog is Firefox's "save page as" dialog. When this dialog is present it is always in front of the main browser window; you must complete or close the dialog before you can effectively resume browsing the web. However, this "save page as" dialog doesn't force itself to be on top of every window, just the browser.
You can make a splash screen your login dialog: see an example here.
First: Is it allowed to have multiple instances open? If not, you have to implement independent from the Login-Dialog-Problem something that prevents opening several instance. Take a look here (btw: I made good experiences with the server-socket thing).
Second: If you overwrite #postWindowOpen in your ApplicationWorkbenchWindowAdvisor the application is up and running (including task-item). The only drawback is that your views are already opened, you have to reload them after a successful login.

How would I show an HTML page in Eclipse at Design Time?

When I'm writing crappy code in eclipse and I'm looking at a website for help I am constantly flipping back and forth between the browser and eclipse. To help me write crappy code faster is there a way to have a View that has a web page in it? I need to be able to set the URL and if I'm navigating around the site have a button to have it return to the original URL. So a URL Address box and 1 favorite link.
BTW I'm not a Eclipse plugin developer.
menu: window / show view / other ...
enter browser in the search box on top
select internal web browser
i would recommend you to install the web development tools
menu: help / install new software
select the software site for your eclipse installation (in my case it's "Helios - http://download.eclipse.org/releases/helios")
enter "web" in the search bar (and wait a little bit) and select "Eclipse Web Developer Toos" and "Web Page Edtior (Optional)"
Just open your HTML file with web page editor. This will open in view where you can view the html code as well as the design it is going to create at run time.