Is there a way to make "pynput" clicks on "next" or "cancel" buttons in exe installer? - pynput

I made a python script to automate sum apps on windows, and its working very fine.
I am using pynput to click on elements (by giving the coordinates)and to insert a text to fields.
Like i said every thing is working very fine, the problem is when i am trying to click on a button (next, cancel...) on an exe installer, the mouse do not move and do not click on the given coordinates when the installer window is in focus.
when putting the installer window out of focus, the mouse starts moving and clicking.
Help please !!!
Thanks a lot

Related

Simulate mouse hover in windows application using win32 api

With a game application (may have been minimized or hidden), I have a button that only shows up when I hover over it. I need to write an script (by c# or python) that can click that button without moving my cursor. I was able to simulate click event with SendMessage(hWnd, WM_LBUTTONDOWN, ...), but i don't know how to make that button show up.
I have seen a tool that can do it, I don't know how they do it.
My problem seems similar to this problem.
I won't need SendInput or mouse_event because it will move my cursor.
Any one can help? Is there another unrelated way?

Log Event Details Window is Not Showing Up in Data Stage Designer (IBM)

I can't see the detailed job log message from IBM Data Stage Designer (client) from a few days ago. I had worked well by double-clicking the log message on the job log panel, but suddenly it has been stopped to show up in the popup windows.
I tried to push the key combination: Shift + Window + Left/Right arrows, but it still does not provide the job log window. Could anyone has an idea how to make it visible again? I would appreciate it.
If you're working with multiple monitors, maybe on a laptop, changing the connected monitors, then maybe the popup window is showing "outside the box". You already tried to fix it with Shift+Win+←→, but this type of modal window will not stick to that.
Instead, try the following procedure:
Press Alt+SPACE while the window has focus. This will bring up the context menu of the window.
Use the arrow keys ↑,↓ to select Move and press ↵Enter. Do not click on it using the mouse.
The window is now in moving state. Press any arrow key ←↑↓→, just one keystroke.
Now, the window will be stuck to the mouse. Move the mouse around (without clicking) to retrieve the window.
Click once to release the window from the mouse.

How to move browser tabs to different monitors using a script?

I have a 3 monitor setup which is connected to a PC. It displays a Google Chrome tab on each of the screens with some dashboard. It will auto log off every night from the website (I cannot control that). So I need to manually login to it, open the tabs, then move it to each of the monitors every night. I am trying to automate this task. I am trying to use Sikuli slides to do it. Right now I am able to login, open tabs, and click on buttons. But I am not able to drag the tabs to other monitors. It doesn't matter which tab is displayed in which monitor. The PC is running Windows 7. How can I get it done ? Any scripting language or tool which is available in windows is fine. Thanks in advance.
Edit: Added an image which describes my need
You're opening the same thing on the same computer on the same screens, so it will be in the same place every time.
AutoHotKey (AHK) can do click-and-drag from a start coordinate to an end coordinate:
https://autohotkey.com/docs/commands/MouseClickDrag.htm
Run AutoHotKey, right click on the icon in the taskbar notification area (systray) and click 'Window Spy', and it will bring up AHK's helper tool. Now you can click on the Chrome tabs and look in AHK to see the coordinates of the mouse pointer, so you can plug those into the command. And drag/drop the browser and look at the mouse coordinates there, too.
(And if you weren't using Windows 7, but instead 8 or 8.1 or 10, you could use Aero Snap with Win+RightArrow, Win+RightArrow and Win+UpArrow to move the active window to the edge of the center screen, then to the right screen, then to fullscreen it).
(Or you could use Alt-Space, M, Arrow Keys to script moving the focused window around).
This is what I did to fix it:
Used MouseRecorder to record the mouse movements and keystrokes including my username and password. Using this, I logged in, opened tabs, clicked on buttons and moved them to different monitors.
Problem with this is that it is not possible to load a saved macro and run using the commandline (or I could not figure out). So I used Mouse Controller to record the mouse movement to open MouseRecorder and click on run. [It cannot record key strokes]. Mouse controller has option to run from commandline with ability to accept the filename as argument.
I wrote a batch file to open and run MouseRecorder and scheduled to run every night using task scheduler.

vb6 button click event strange behaviour

I have a very large accounting system. In a user preferences section, the program has begun to act abnormally on my development machine only. No customers are reporting this, nor can I duplicate it on any of my other computers. Running Windows 8.1, others are on 7.0. Not exactly sure when this started happening because it's not the kind of thing one goes into on a regular basis. The preferences screen consists of a tab control and various standard controls. At the bottom is Okay, Cancel, and Apply buttons. All three buttons seem to be acting with the same strange behaviour. Clicking with a mouse does not generate a click event yet does not hang the system - mouseup follows and you can click it again and see the mousedown and mouseup but no click. However, since the Okay is defined as Default, pressing enter DOES create the desired click event, and all the code inside that even runs fine. Cancel and Okay also unload the form, but when clicked, that doesn't happen because none of the code gets executed, yet you can still navigate the screen (move between tabs and controls) but you can't even click the "X" button to close the form at that point.
Also, if you go straight in, and press enter, everything works and the form unloads, but if you do anything before pressing enter (or escape to cancel), like change a tab and/or edit a value, then press enter, the click event again does not run and the system semi-hangs.
I tried turning-off my anti-virus thinking that might have something to do with it, but no-go. Debugging is frustrating because while I finally got it execute the click event, the stop command inside that event (after debug.print "click") would allow stepping and success if just straight in and enter, but if anything else done as before described would stop at the stop statement (keyboard enter only still no mouse clicks under any scenario) and would do a total lock-out. In other lockouts where it would let me navigate, almost always selecting a new tab would cause a fatal error and it would force-unload VB for me, otherwise I had to use the task manager.
This is driving me nuts, but I don't know how else to debug it.
The culprit was tv_w32.dll which is Team Viewer. Turning-off Team Viewer allows my program to run normally.

How do I prevent installer dialog from appearing partly off screen?

Has anybody seen this installer problem where the user runs an uninstall from the control panel, minimizes the window once the uninstall gets underway and then, when he restores the window after the point where the Finish Uninstalling screen would appear, the window shows up partly off screen? Does anybody know how to prevent this from happening? Or is this simply a bug in Windows Installer that we have to mention in our installer's user documentation?
I'm not sure how to reproduce this behavior to think about how to address it.
In my installers ( InstallShield and WiX mostly ) if I do a "Remove" I get a minimal ui experience that doesn't have a minimize button or a finished dialog. If I do a "Change" and select remove my progress dialog has a minimize but when that dialog is done and the installer switches to a Finished type dialog I get the dialog full size and centered on the screen again as it's a new dialog.

Resources