Autohotkey over Hikvision software - autohotkey

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.

Related

Autoit MouseClick - click does not work on Connection Bar in RDP window

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.

AutoHotkey script only works when this window is open

Autohotkey script only works when I have this window open (please see screenshot). If I minimise it, it does not work. I have the H visible in the tray. Any help would be appreciated, thanks.
My script to use with Windows Pen is simply:
#F20::Run OneNote ; Single click, Open OneNote
if your keyboard has a f20 key
#F20::Run C:\Windows\write.exe
Would run wordpad.
Supply the path where OneNote is located.
#F20::Run path\OneNote

Access the MDI toolbar menu with AutoHotKey ControlSend

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,

AutoHotKey script fails after first use

I am working with a Help file as a Word 2007 document. I need to update the screenshots as I go through, so I'm trying to get AHK to select the 'Change Picture' option from the right click drop down menu when I press my key combination. I've got the code, and it works perfectly... the first time I use it. After that, I only see the right click menu flash and disappear. I suspect that the script from Send {Down 4} on is not executing because I can just barely see the 'Cut' option highlighted, but the selected image is not cut from the document, indicating that the Send {Enter} is also not being executed.
I cannot find anyone else who seems to be having this problem. If I manually reload my script, it works fine again, but only the once. Then it's back to flashing the drop down and nothing else. Any help would be greatly appreciated. I'm trying to get this process down to as few clicks as possible, but it's getting to the point where I'm wasting more time trying to solve my macro problems than I would just doing it the slow awkward way.
My script as it is now:
^!z::
Send +{F10}
Send {Down 4}
Send {Enter}
return
For clarification's sake:
When I remove everything following Send +{F10} and then use my hotkey, I get the right click menu displayed and not flashed, but again, only the first time I use it. After that, the menu goes back to flashing on the screen once. To compare, actually pressing Shift and {F10} displays the right click menu, and it does not disappear on lift.
If I move all three Send commands into one line to get Send +{F10} {Down 4} {Enter} The script executes the 'Cut' option from the right click menu, then moves the cursor down 4 lines and then sends the {Enter} keystroke. This set of actions works after the first use of the script, unlike previous instances.
In my copy of Word, the control key causes a secondary 'Layout Options' menu to pop up if there is an image selected. While I'm not sure why it's working for you the first time but not subsequently, when I test this at my end it works if I change two things:
Use mouseclick, right instead of Send +{F10}
Change the shortcut modifier from shift-ctrl to Win, i.e. set it to #z
You can try sending the keyboard shortcut instead of down command
SetBatchLines, 1
SetKeyDelay , 100 ; in miliseconds, keep increasing until your pc can hadle it
!x:: ; your hotkey in my case alt + x which is similar to ctrl + x for cutting text
Send +{F10}
Send {t} ; use the cut keyboard shortcut, for word should be 't'. if for some weird reason isn't change it
Send {Enter}
return

Having Problems running Auto Hot Key in "ahk_class SWT_Window0" windows

I'm not sure if this is common or not but I cannot get my code to run in this type of window. It works in all of my other windows except for the one, ahk_class SWT_Window0, I want it to work in... go figure.
My code is:
RButton::
SendInput {Click 166,350}
return
Pretty simple just move the cursor and click. It works in google chrome wundow spy scite and various other windows but not with the correct window. Any help would be awesome thanks!
Jack,
Have you tried to use the scan codes directly in your application?
Here is an example. It clicks the mouse at the current location and then sends a {Tab}. You need to change this for your needs. You can move your mouse to the right location first with MouseMove,%XPos3%,%YPos3%
F8:: ; Press F8 to start macro
Send, {vk01} ; Click left mouse button
;Send, {scYYY} ;
Send, {vk09sc00F} ; Send the Vk and SC codes for the {Tab} key.
Return
Let me know if this works