Author Topic: Since Latest Windows Update, Unable to type into mIRC  (Read 2996 times)

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Since Latest Windows Update, Unable to type into mIRC
« on: May 13, 2021, 10:59:19 AM »
So, I used to have VoiceAttack open mIRC as the main window, and type a command into the application, which would work fine, then alt-tab back to the main focused window.

Now, when triggering the command, it will select the window, however as soon as anything is typed from VoiceAttack, the window greys out, like it's losing the focus of the window. This also ties into the VA, if "Stop if focus is lost" is ticked.

The command has been tested in Notepad, and the command types correctly into notepad, however refuses to do this at all within mIRC.

Has anyone got any ideas?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #1 on: May 13, 2021, 11:08:28 AM »
Does the window also lose focus in this manner when it has focus already when the command executes?

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #2 on: May 13, 2021, 05:43:56 PM »
Yes, it does.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #3 on: May 13, 2021, 05:56:22 PM »
Does this also occur if you set the "Send command to this target:" option to "Active Window"?

Which actions does your command contain? Right-click the action list, choose "Copy All as Text" from the context menu, then paste here into a code block (click the # button)

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #4 on: May 14, 2021, 09:25:17 AM »
Don't question it, this controls a fan on my stream :D

Code: [Select]
Say, 'Okay Baby, Get Ready...'  (and wait until it completes)
Set Windows clipboard to '!blowme'
Display window 'mIRC Twitch Chat Bot - [#eggfriedcheese*' as [Show] (pause up to 0.5 seconds for availability)
Pause 0.5 seconds
Press Left Ctrl+V keys and hold for 0.1 seconds and release
Pause 0.5 seconds
Say, 'Hope that feels good *winkyface*'  (and wait until it completes)
Press Left Alt+Tab keys and hold for 0.1 seconds and release
Pause 1 second
Switch to profile, 'Hey Computer'


EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #5 on: May 14, 2021, 09:35:56 AM »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #6 on: May 14, 2021, 09:49:19 AM »
If you increase the pauses before and after the Ctrl-V keypress, say to 5 seconds each, and add a "Write a Value to the Event Log" action before the keypress, does the behavior change?

E.G.
Code: [Select]
Say, 'Okay Baby, Get Ready...'  (and wait until it completes)
Set Windows clipboard to '!blowme'
Display window 'mIRC Twitch Chat Bot - [#eggfriedcheese*' as [Show] (pause up to 0.5 seconds for availability)
Pause 5 seconds
Write [Blue] 'Pasting' to log
Press Left Ctrl+V keys and hold for 0.1 seconds and release
Pause 5 seconds
Say, 'Hope that feels good *winkyface*'  (and wait until it completes)
Press Left Alt+Tab keys and hold for 0.1 seconds and release
Pause 1 second
Switch to profile, 'Hey Computer'

Does the target window still lose focus shortly after gaining it, or does it only occur after five seconds, when "Pasting" is written to the log on the main window?

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #7 on: May 14, 2021, 09:53:31 AM »
I shall test that, one moment

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #8 on: May 14, 2021, 09:55:41 AM »
Yes, it still loses window focus, as soon as it attempts to type anything into the text field

Code: [Select]
4:55:14.322 Profile changed to Hey Computer
4:55:05.590 Pause for 5 seconds
4:55:05.486 1
4:55:00.482 Pause for 5 seconds
4:54:58.060 Recognized : 'blow me'
4:53:39.471 Profile changed to My Profile
4:28:16.585 Profile changed to Hey Computer
4:28:09.271 Recognized : 'blow me'

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #9 on: May 14, 2021, 10:00:51 AM »
I'll assume you mean it still loses focus shortly after gaining it, rather than after five seconds when the keypress occurs.

Modify your command so that the "Write a Value to the Event Log" action outputs the currently active window's title

Code: [Select]
Say, 'Okay Baby, Get Ready...'  (and wait until it completes)
Set Windows clipboard to '!blowme'
Display window 'mIRC Twitch Chat Bot - [#eggfriedcheese*' as [Show] (pause up to 0.5 seconds for availability)
Pause 5 seconds
Write [Blue] '{ACTIVEWINDOWTITLE}' to log
Press Left Ctrl+V keys and hold for 0.1 seconds and release
Pause 5 seconds
Say, 'Hope that feels good *winkyface*'  (and wait until it completes)
Press Left Alt+Tab keys and hold for 0.1 seconds and release
Pause 1 second
Switch to profile, 'Hey Computer'

Which window is gaining focus when the target loses it?


On another note, which version of VoiceAttack are you running?

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #10 on: May 14, 2021, 10:11:54 AM »
Version 1.8.7

Code: [Select]
Say, 'Okay Baby, Get Ready...'  (and wait until it completes)
Set Windows clipboard to '!blowme'
Display window 'mIRC Twitch Chat Bot - [#eggfriedcheese*' as [Show] (pause up to 0.5 seconds for availability)
Pause 5 seconds
Write [Blue] '{ACTIVEWINDOWTITLE}' to log
Press Left Ctrl+V keys and hold for 0.1 seconds and release
Write [Blue] '{ACTIVEWINDOWTITLE}' to log
Pause 5 seconds
Say, 'Hope that feels good *winkyface*'  (and wait until it completes)
Press Left Alt+Tab keys and hold for 0.1 seconds and release
Pause 1 second
Switch to profile, 'Hey Computer'

Code: [Select]
5:12:19.667 Profile changed to Hey Computer
5:12:10.932 Pause for 5 seconds
5:12:10.931
5:12:10.826 mIRC Twitch Chat Bot - [#eggfriedcheese [3]]
5:12:05.663 Pause for 5 seconds
5:12:03.244 Recognized : 'blow me'
5:10:45.714 Profile changed to My Profile

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #11 on: May 14, 2021, 10:21:30 AM »
That would indicate the target application is retaining focus right up to the keypress, so I'll ask again: Does the application still lose focus (I.E. "gray out") almost immediately after gaining it, or does that only happen after five seconds or so?


Also, swap the "{ACTIVEWINDOWTITLE}" tokens with "{ACTIVEWINDOWPROCESSNAME}" and run the command again.

E.G.
Code: [Select]
Say, 'Okay Baby, Get Ready...'  (and wait until it completes)
Set Windows clipboard to '!blowme'
Display window 'mIRC Twitch Chat Bot - [#eggfriedcheese*' as [Show] (pause up to 0.5 seconds for availability)
Pause 5 seconds
Write [Blue] '{ACTIVEWINDOWPROCESSNAME}' to log
Press Left Ctrl+V keys and hold for 0.1 seconds and release
Write [Blue] '{ACTIVEWINDOWPROCESSNAME}' to log
Pause 5 seconds
Say, 'Hope that feels good *winkyface*'  (and wait until it completes)
Press Left Alt+Tab keys and hold for 0.1 seconds and release
Pause 1 second
Switch to profile, 'Hey Computer'

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #12 on: May 14, 2021, 10:25:55 AM »
It only does it, as soon as the keypress happens, but sending that keypress manually, goes through to the application

This is the same if I set it as a "quick input". This used to work, but now doesn't :(

Unless there's another (Easier) way to type commands using voiceattack into Twitch?

Code: [Select]
5:26:51.487 Profile changed to Hey Computer
5:26:42.752 Pause for 5 seconds
5:26:42.750 mirc - After Keypress
5:26:42.636 mirc - Before Keypress
5:26:37.622 Pause for 5 seconds
5:26:35.180 Recognized : 'blow me'
5:25:57.591 Profile changed to My Profile

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #13 on: May 14, 2021, 10:37:47 AM »
Is that output repeatable? I.E. every time you execute the command, it outputs "mirc" as the process name both before and after the keypress?

If so, add "{ACTIVEWINDOWPROCESSID}" to the "Write a Value to the Event Log" actions

E.G.
Code: [Select]
Write [Blue] '"{ACTIVEWINDOWPROCESSNAME}" pid {ACTIVEWINDOWPROCESSID}' to log


I have no personal experience with it (and this is not intended as an endorsement), but this bot does have a VoiceAttack plugin.

If you're running OBS, this command line tool may also be useful (though perhaps not for chat commands; again, no personal experience)

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #14 on: May 14, 2021, 10:41:53 AM »
So, I already use my own chat bot, hence why typing into mIRC is needed, also, I use OBS Command Line, and that doesn't allow chat commands, AFAIK

Also:

Code: [Select]
5:39:51.502 Profile changed to Hey Computer
5:39:42.778 Pause for 5 seconds
5:39:42.776 "mirc" pid 26060
5:39:42.663 "mirc" pid 26060
5:39:37.650 Pause for 5 seconds
5:39:35.240 Recognized : 'blow me'
5:27:47.701 Profile changed to My Profile

It looks like it's keeping focus of mIRC, but trying to type into another window within the application? Even though the cursor is already within the text field of the chat bot

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #15 on: May 14, 2021, 10:46:15 AM »
Looks that way. A single process can certainly have multiple windows, including ones that aren't normally visible to the user

Try disabling the "Perform a Window Function" action (right-click it in the action list and choose "Disable Action"), but setting the "Send command to this target:" option of the command to "mIRC Twitch Chat Bot - [#eggfriedcheese*" instead

VoiceAttack should still switch to the window automatically before executing the keypress


If that doesn't work, re-enable the "Perform a Window Function" action, but uncheck its "Set command to target this window" option, and set the "Send command to this target:" option to "Active Window", then try again

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #16 on: May 14, 2021, 10:49:56 AM »
That just didn't type anything at all :(

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #17 on: May 14, 2021, 11:03:46 AM »
Not with the second configuration either?

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #18 on: May 14, 2021, 04:35:31 PM »
Nope, refusing to type anything again, whatever I do. It's like the keyboard input of VA is being blocked by mIRC, or mIRC just doesn't like it typing into it

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #19 on: May 14, 2021, 04:43:29 PM »
So it didn't paste anything, but did it focus the window? Did the window lose focus as it did previously?


Leave the "Send command to this target:" action set to "Active Window", but try setting up the "Perform a Window Function" action to find its target using the process name, rather than the window title (by using the process name prefixed with a "~" character).

E.G.
Code: [Select]
Say, 'Okay Baby, Get Ready...'  (and wait until it completes)
Set Windows clipboard to '!blowme'
Display window '~mirc' as [Show] (pause up to 0.5 seconds for availability)
Pause 5 seconds
Press Left Ctrl+V keys and hold for 0.1 seconds and release
Pause 5 seconds
Say, 'Hope that feels good *winkyface*'  (and wait until it completes)
Press Left Alt+Tab keys and hold for 0.1 seconds and release
Pause 1 second
Switch to profile, 'Hey Computer'

Try that both with and without the "Set command to target this window" option enabled

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #20 on: May 14, 2021, 04:53:04 PM »
I shall try this tomorrow, as heading to bed :)

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #21 on: May 15, 2021, 11:08:12 PM »
I had a issue similar to this. Not sure if it will fix your problem, but let's see.

On your Show command. Uncheck the box that says, Set Command to target this window.

This was my issue. It would always switch back to the previous windows when entering a command. I unchecked that box, and it stopped doing it. This was a very frustrating problem for me as well.




EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #22 on: May 19, 2021, 07:38:21 AM »
I had a issue similar to this. Not sure if it will fix your problem, but let's see.

On your Show command. Uncheck the box that says, Set Command to target this window.

This was my issue. It would always switch back to the previous windows when entering a command. I unchecked that box, and it stopped doing it. This was a very frustrating problem for me as well.

Unfortunately, both didn't resolve it :(

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #23 on: May 19, 2021, 07:40:19 AM »
HOWEVER... I did find what did resolve it however on playing...

I changed the Display window 'mIRC Twitch Chat Bot - [#eggfriedcheese*' as [Show] to

Display window 'mIRC Twitch Chat Bot - [#eggfriedcheese*' as [Show Default]

And now, it's typing in the box, it doesn't like the "Show" option within that.


EDIT: And now this has stopped working as expected... ffs

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #24 on: May 19, 2021, 07:26:58 PM »
You can try using AutoHotKey to show the window for you. I use it for things that VA has trouble with.
Here's the command for it.

IFWinExist, mIRC Twitch Chat Bot - [#eggfriedcheese*
sleep 300
Winactivate
return

#IfWinActive, mIRC Twitch Chat Bot - [#eggfriedcheese*
winmaximize, A
return

Now, I don't know if that's the exact title window name or not that works for you, and if the * is a wildcard, because the name changes all the time, that might be issue.

If you don't know AHK, just download the software, and just create a txt file with notepad, and save the file with extension .ahk, not txt. Then you can just double click the file, and it will run, which should show the window if it's correct.

In VA, instead of running the show command. Run the .ahk file you just created.

Anyway, I hope it might help in someway.

EggFriedCheese

  • Newbie
  • *
  • Posts: 15
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #25 on: May 20, 2021, 10:07:14 AM »
You can try using AutoHotKey to show the window for you. I use it for things that VA has trouble with.
Here's the command for it.

IFWinExist, mIRC Twitch Chat Bot - [#eggfriedcheese*
sleep 300
Winactivate
return

#IfWinActive, mIRC Twitch Chat Bot - [#eggfriedcheese*
winmaximize, A
return

Now, I don't know if that's the exact title window name or not that works for you, and if the * is a wildcard, because the name changes all the time, that might be issue.

If you don't know AHK, just download the software, and just create a txt file with notepad, and save the file with extension .ahk, not txt. Then you can just double click the file, and it will run, which should show the window if it's correct.

In VA, instead of running the show command. Run the .ahk file you just created.

Anyway, I hope it might help in someway.

Hey @iceblast... You're a legend. AHK is working perfectly!

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: Since Latest Windows Update, Unable to type into mIRC
« Reply #26 on: May 20, 2021, 09:05:41 PM »
Great, glad to hear it!  😎