Search found 127 matches
- 12 Jan 2022, 03:39
- Forum: Ask for Help (v1)
- Topic: ControlClick not working in Explorer window
- Replies: 3
- Views: 600
Re: ControlClick not working in Explorer window
Thank you very much for the complete working code that you provided mikeyww . It works great. Your solution is much more direct than the workaround that I was trying. I would still like to understand why my first code example doesn't click (so that I know how to correctly use ControlClick in other i...
- 11 Jan 2022, 22:05
- Forum: Ask for Help (v1)
- Topic: ControlClick not working in Explorer window
- Replies: 3
- Views: 600
ControlClick not working in Explorer window
I'm trying to automate a mouseclick on blank space within an Explorer window (the content pane area: DirectUIHWND3 , not the tree view). I don't want to accidentally click on any items (e.g. a column header or file/folder) so I thought I'd get the position of DirectUIHWND3 within the active Explorer...
- 29 Oct 2021, 03:26
- Forum: Ask for Help (v1)
- Topic: Detect whenever a specified app gains or loses focus
- Replies: 8
- Views: 3629
Re: Detect whenever a specified app gains or loses focus
Thanks FG, It was difficult to judge by using the tooltip because the tooltip would not display at all when restoring from minimized, so I had no way of knowing whether it was being recognised as active or not immediately after a restore. Obviously if I clicked on it after a restore then the tooltip...
- 28 Oct 2021, 15:36
- Forum: Ask for Help (v1)
- Topic: Detect whenever a specified app gains or loses focus
- Replies: 8
- Views: 3629
Re: Detect whenever a specified app gains or loses focus
Thanks @GEV. I'll see if I can come up with something based on your suggestion, although I'm not very good with structuring code, so I'll have to really think about how best to organize the flow of commands to get it to work as intended.
- 28 Oct 2021, 15:31
- Forum: Ask for Help (v1)
- Topic: Detect whenever a specified app gains or loses focus
- Replies: 8
- Views: 3629
Re: Detect whenever a specified app gains or loses focus
Thank you so much for your detailed reply FanaticGuru . I got things working simply by plugging in the appropriate class name, and the tooltips then correctly showed whenever the window gained or lost focus. However there is an issue. I'm not sure whether this issue is due to the choice of event bei...
- 28 Oct 2021, 04:26
- Forum: Ask for Help (v1)
- Topic: Detect whenever a specified app gains or loses focus
- Replies: 8
- Views: 3629
Detect whenever a specified app gains or loses focus
What would be an efficient way to check if an application exists, and if it does, send a hotkey (just once) every time that the application either gains focus or loses focus, up until the app shuts down (at which point the script goes back to waiting until the next time that the app exists again). I...
- 19 Oct 2021, 13:30
- Forum: Ask for Help (v1)
- Topic: ControlGetText behavior when getting path from explorer window
- Replies: 3
- Views: 575
Re: ControlGetText behavior when getting path from explorer window
I actually wanted to know why ControlGetText is behaving the way it is in the scenario I described. I'd like to know the answer to this too (having encountered the exact same problem myself). Does anybody have any insight on why ControlGetText does not work with the path / breadcrumb bar in Explore...
- 18 Oct 2021, 19:51
- Forum: Ask for Help (v1)
- Topic: Sending text into 'rename' file box in Explorer Topic is solved
- Replies: 5
- Views: 835
Re: Sending text into 'rename' file box in Explorer Topic is solved
I am such an idiot! I have answered my own question, and it was SO easy. I don't know why I assumed that detecting the state of an Explorer rename box would be so complicated. I just assumed that getting a ClassNN value for it would not be straight-forward because it's a dynamic control that only ex...
- 18 Oct 2021, 17:12
- Forum: Ask for Help (v1)
- Topic: Sending text into 'rename' file box in Explorer Topic is solved
- Replies: 5
- Views: 835
Re: Sending text into 'rename' file box in Explorer Topic is solved
The number of strings varies, but at any moment in time I am usually regularly using 4 or 5 of them, but any one of them can get placed at a different point in the filename depending on which file is being amended (and a variety of other file-content related refactors). So the main issue that I am t...
- 15 Oct 2021, 17:42
- Forum: Ask for Help (v1)
- Topic: Sending text into 'rename' file box in Explorer Topic is solved
- Replies: 5
- Views: 835
Re: Sending text into 'rename' file box in Explorer Topic is solved
Thank you for your reply and suggestion. Unfortunately this will not work for me. The whole point of me doing this was to avoid using the clipboard (which clutters up my clipboard manager's history with endless junk entries because I need to do this so often) and that is which is why I specified usi...
- 14 Oct 2021, 17:10
- Forum: Ask for Help (v1)
- Topic: Sending text into 'rename' file box in Explorer Topic is solved
- Replies: 5
- Views: 835
Sending text into 'rename' file box in Explorer Topic is solved
I have a collection of different strings of text that I use as part of my file naming scheme. At the moment I have these strings saved in a text document, and whenever I want to include one of the strings in the name of a file or folder, I have to copy the desired string from the text file and then ...
- 17 Apr 2021, 13:21
- Forum: Ask for Help (v1)
- Topic: Problem using GetKeyState
- Replies: 1
- Views: 210
Problem using GetKeyState
I'm trying to use GetKeyState to detect when a key is in the up/unpressed state and then use that to trigger the release/unpress of a couple of other keys. But it's not working. I don't know if I'm using the command correctly. Appskey & Up:: Send, {LWin down}{Alt down}{up down} KeyWait, up GetKeySta...
- 04 Apr 2021, 05:50
- Forum: Ask for Help (v1)
- Topic: Detecting Windows Explorer menu clicks?
- Replies: 1
- Views: 127
Detecting Windows Explorer menu clicks?
I have seen some pretty ingenious AHK solutions created using advanced methods such as dll calls / Windows API. It's all way above my level, but I wondered if it would be possible to detect context-menu clicks in Windows Explorer using those kinds of techniques? I have some code which I found in an ...
- 22 Mar 2021, 14:30
- Forum: Ask for Help (v1)
- Topic: Prevent held-down hotkey acting on subsequently focussed windows
- Replies: 7
- Views: 471
Re: Prevent held-down hotkey acting on subsequently focussed windows
What I'm trying to do is this: when the hotkey is pressed, it checks the name of the current window, and then it applies the close action only to that same named window (instead of just closing whatever happens to be active at the time). So the hotkey will only ever close the application that was ac...
- 22 Mar 2021, 13:14
- Forum: Ask for Help (v1)
- Topic: Remap double-click for only one application
- Replies: 2
- Views: 447
Re: Remap double-click for only one application
Thank you, Rohwedder . When your code is run on its own, it works perfectly. However, I am having some trouble integrating it with my existing code. Now that I can capture and modify what happens when LButton is double-clicked, I need to restrict this action to specific regions within the applicatio...
- 22 Mar 2021, 05:16
- Forum: Ask for Help (v1)
- Topic: Prevent held-down hotkey acting on subsequently focussed windows
- Replies: 7
- Views: 471
Re: Prevent held-down hotkey acting on subsequently focussed windows
Thank you for your reply, mikeyww. I do appreciate the use of PostMessage to close the window instead of the kludgey menu method that I was using. While your code does work well to prevent closure of subsequently focussed windows, it seems to have achieved this at the expense of being able to use th...
- 22 Mar 2021, 03:46
- Forum: Ask for Help (v1)
- Topic: MsgBox, Modality and Ownership Topic is solved
- Replies: 7
- Views: 1400
Re: MsgBox, Modality and Ownership Topic is solved
Apologies for my noob ignorance, but how did you get the 8228? I copy/pasted it from your code LOL!!!! I actually burst out laughing when I read that! I don't know why I didn't recognize the number that I had previously calculated myself to set the dialog style. For some reason, just seeing "INT"...
- 20 Mar 2021, 15:37
- Forum: Ask for Help (v1)
- Topic: Prevent held-down hotkey acting on subsequently focussed windows
- Replies: 7
- Views: 471
Prevent held-down hotkey acting on subsequently focussed windows
I have a hotkey that I use for closing windows. I use a timed keywait to require the hotkey to be held down longer (to prevent accidental window closure by inadvertent key presses). It is also set to fire after a certain amount of time so that you can get window closure while the keys are pressed (r...
- 11 Nov 2020, 18:17
- Forum: Ask for Help (v1)
- Topic: Renaming a Registry Key
- Replies: 6
- Views: 579
Re: Renaming a Registry Key
Thanks, gregster. I'm now getting the contents of the reg keys, however none of the sub-key names are included in the output (only the values) even though I am using kvr. Edit: <sigh> it turns out that KVR is case-sensitive (although the help file says absolutely nothing about this). So I now appear...
- 11 Nov 2020, 18:14
- Forum: Ask for Help (v1)
- Topic: MsgBox, Modality and Ownership Topic is solved
- Replies: 7
- Views: 1400
Re: MsgBox, Modality and Ownership Topic is solved
Do you find that easy? Hi SKAN . Thank you for your additional comments (and code) after the thread was solved. It's not so much the structure of the command that confused me (that's straight-forward enough once you get over the unfamiliarity of it) it was more about not knowing what 'Ptr' and 'I...