If window exists, minimize and sendcontrol

Get help with using AutoHotkey and its commands and hotkeys
jmcall10
Posts: 22
Joined: 25 Jan 2016, 21:27

If window exists, minimize and sendcontrol

21 Mar 2018, 13:35

Hi,

I have tried and failed to achieve what I believe to be a fairly easy task.

Basically I want to find a window with a particular name. For this example lets use notepad.

The first obstacle is that there are two windows with very similar but always different names. for example "window 1.txt - Notepad" and "window 2.txt - Notepad".

I can find the window I want ok and minimize it, however I cannot send text to the window I minimized.

I tried getting the ID however I couldn't get it to work.

Can anyone offer any help?
MaxAstro
Posts: 551
Joined: 05 Oct 2016, 13:00

Re: If window exists, minimize and sendcontrol

21 Mar 2018, 14:10

Not all windows will let you send text to them while minimized. Notepad should, though, I think. Are you sure you are getting the correct handle for the window? Can we see your code?
jmcall10
Posts: 22
Joined: 25 Jan 2016, 21:27

Re: If window exists, minimize and sendcontrol

21 Mar 2018, 14:16

I will post code in a few hours (unable to access my code at present)

How can I tell if the windows I am using accepts text or not when minimized.

Thanks for the help.
MaxAstro
Posts: 551
Joined: 05 Oct 2016, 13:00

Re: If window exists, minimize and sendcontrol

21 Mar 2018, 14:19

The only way to tell really is to just try it and find out, unfortunately.

Return to “Ask For Help”

Who is online

Users browsing this forum: chngrcn, nacken012, sn0365 and 84 guests