I have a basic AHK script that I am trying to run on a MS tool SurfaceDiagnosticToolkit.exe. Trying to click any button does not work.
Steps followed,
start SurfaceDiagnosticToolkit.exe
select screen with title Microsoft Surface Diagnostic Toolkit (Fan Test 1/1)
run script below.
.
detectHiddenWindows, On;
WinActivate, Microsoft Surface Diagnostic Toolkit (Fan Test 1/1)
MouseMove,1255,1190
MouseClick,Left,1255,1190
The script will bring the window to the front, but the mouse does not move over the screen and the MouseClick does not fire.
Other AHK tools like WinMove also do not seem to work.
Interestingly this program shows a green fading bar going left to right on the toolbar icon similar to the copying files icon.
I have also tried with the same results
MouseMove, 1560, 40
Send {vk01sc000}
Related
I am trying to click on the iVMS-4200 window with a script made with Autohotkey.
The script works as I have tested it on the browser and it doesn't give me any problems. The thing is that on the mentioned software, the clicks don't work.
This is the script in ahk:
MouseMove 500, 300 ; Move mouse to my coor
Send {Click Right} ; First right click
Any idea how to make it work?
If someone is also facing this problem with Autohotkey, just try to run the script as administrator.
I am trying to minimize RDP window by using Autoit mouse functions
First MouseMove to correct location -> hint "Minimize" appear
but then MouseClick (or mousedown, sleep, mouseup) seems do click "through" connection bar , as I see icon on desktop under the connection bar got focused.
I thought before, any mouse action "by hand" can be imitated , but I am stuck here...
To fix this problem, you need to do one of the following:
Run the program on the remote computer - then you can use the "standard" AutoIt functions
Run the program on the local computer, and analyze the remote image with ImageSearch UDF or OpenCV UDF and click in the selected point of screen.
Automating a process that is being run on a RDP session, I have to use ControlSend, and not Send command in AutoHotKey.
The WindowSpy doesn't find any control on the MDI toolbar, and there are no shortkey to the menu item I want to access (Filter..). How may I open the toolbar and select the item?
I've tried
ControlSend, ahk_parent, {alt}, ahk_class FNWND3170 ;Open project folder in treeview
But with no success.
I've considered using AutoIT, but I don't think that would help as the AutoIt spy doesn't pick up the control either.
Sorry, but think of the RDP window (or even full screen) as an ever-evolving bitmap image. Your PC and autohotkey have no idea what is behind the picture. Can you run the ahk script in the remote pc itself? Keep in mind, the RDP client handles your mouseclicks and keyboard (and even voice) entirely by re-directing inputs, etc. So best bet is to do a mouse click in the appropriate spot by running a script from outside the window:
CoordMode, TargetType [, RelativeTo]
Click, 44, 55 ; Clicks the left mouse button once at coordinates 44, 55 (based on CoordMode).
Use the CoordMode "RelativeTo" flag to set to "Relative" so coordinates are relative to the active window. You may have to click twice, once to activate the RDP window and then to click at the mouse position.
See https://www.autohotkey.com/docs/commands/Click.htm and https://www.autohotkey.com/docs/commands/CoordMode.htm for info.
Hth,
So I need to automate some button clickings on a java program. I tried ahks/autoit's controlclick but it doesn't really work (normal clicks do work, but I require no mouse movement).
I tried to get some information from window detective / window spy, etc. but not much is displayed apart from the window name and ahk_class
Java Ferret shows quite a lot more information though: https://gyazo.com/3539415488ce3e03c90f3532327419f2
How can I trigger one of these "push button" actions? (say "Descendent 19 role")
If you can get the X and Y coordinates of the control along with the window name, you could use a mouse click event.
Other than that, you can try using an image search to find the control's X and Y and perform a mouse click.
Using AutoHotKey, I'm trying to maximize the Netflix metro when it is already running and minimized. I haven't had any luck so far.
Here is the script I've tried:
^!z::
WinActivate Netflix
WinShow Netflix
WinMaximize Netflix
return
Here's what AHK Window Spy says about the Netflix metro app:
>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
Netflix
ahk_class Windows.UI.Core.CoreWindow
>>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<<
On Screen: 528, 738 (less often used)
In Active Window: 528, 738
>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<
Color: 0x8B7272 (Blue=8B Green=72 Red=72)
>>>>>>>>>>( Active Window Position )<<<<<<<<<<
left: 0 top: 0 width: 1360 height: 768
>>>>>>>>>>>( Status Bar Text )<<<<<<<<<<
>>>>>>>>>>>( Visible Window Text )<<<<<<<<<<<
>>>>>>>>>>>( Hidden Window Text )<<<<<<<<<<<
>>>>( TitleMatchMode=slow Visible Text )<<<<
>>>>( TitleMatchMode=slow Hidden Text )<<<<
Try to launch script with admin privileges.
Always use AutoHotkey and its documentation from
http://ahkscript.org/ (current uptodate version, new official
website)! AutoHotkey and its documentation from autohotkey.com is
outdated and you may have some problems using them!
I am not user of metro applications but here are my thoughts. If WinActivate, WinShow, WinMaximize command are not working and my above suggestions are not helping too as far as I know you are left with only one solution:
You have to activate window of minimized Netflix by clicking with
Click command on minimized Netflix.
Use ImageSearch for getting coordinates to use with Click command or enter coordinates manually.
The best option I've found so far is to re-run explorer.exe to restart the Netflix metro app, even if it's already running minimized.
;Start Netflix
^!z::
Run explorer.exe netflix:
return
This causes the Netflix app to load in the foreground without creating multiple instances of the app. However as a side-effect it causes the app to navigate back to the 1st screen.
I haven't found a better way.