Page 1 of 1

i need script for chat pls

Posted: 20 Jan 2022, 21:15
by disco_dolph1n
As silly as it sounds, if you can help me, I would be very happy.
I need the script to do this every 122 sec on F1:
Alt+TabTab->Ctrl+C->Alt+Tab->T->Ctrl+V->Enter

Re: i need script for chat pls

Posted: 20 Jan 2022, 21:28
by mikeyww

Code: Select all

F1::
SoundBeep, 1500
SetTimer, Go, 122000
Go:
Clipboard =
Send !{Tab 2}^c
ClipWait, 0
If ErrorLevel
 MsgBox, 48, Error, An error occurred while waiting for the clipboard.
Else Send !{Tab}t^v`n
Return
WinActivate is often a more reliable way to activate a window.

Re: i need script for chat pls

Posted: 20 Jan 2022, 21:53
by disco_dolph1n
mikeyww wrote:
20 Jan 2022, 21:28

Code: Select all

F1::
SoundBeep, 1500
SetTimer, Go, 122000
Go:
Clipboard =
Send !{Tab 2}^c
ClipWait, 0
If ErrorLevel
 MsgBox, 48, Error, An error occurred while waiting for the clipboard.
Else Send !{Tab}t^v`n
Return
WinActivate is often a more reliable way to activate a window.
This is all it says to me(
Honestly, I'm not good at this, sorry if I'm being stupid.
Error, An error occurred while waiting for the clipboard.

Re: i need script for chat pls

Posted: 20 Jan 2022, 21:56
by mikeyww
Although you can add Sleep at any point, WinActivate is probably a better bet. You would need to specify the windows. Running Window Spy can provide the WinTitle information for your target windows. Example