Pls help with the script Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
kacper4354_
Posts: 28
Joined: 02 Feb 2021, 10:02

Pls help with the script

09 May 2021, 05:45

Someone would write a script for me that write a message typed in gui, click enter, and repeat this action the selected number of times
User avatar
mikeyww
Posts: 26939
Joined: 09 Sep 2014, 18:38

Re: Pls help with the script

09 May 2021, 07:19

Code: Select all

Gui, Font, s10
Gui, Add, Text,, Enter text below.
Gui, Add, Edit, w195 vttext
Gui, Add, Button, x100 Default, OK
Gosub, F3
F3::
Gui, Show, w220, Text
GuiControl, Focus, ttext
Send ^a
Return

ButtonOK:
Gui, Submit
F4::SendInput {Text}%ttext%

GuiEscape:
GuiClose:
Gui, Hide
Return
kacper4354_
Posts: 28
Joined: 02 Feb 2021, 10:02

Re: Pls help with the script

10 May 2021, 08:34

Thank you for the help, but can can you add a field where you will enter the number of times this message was sent?

Code: Select all

Gui, Font, s10
Gui, Add, Text,, Enter text below.
Gui, Add, Edit, w195 vttext
Gui, Add, Button, x100 Default, OK
Gosub, F3
F3::
Gui, Show, w220, Text
GuiControl, Focus, ttext
Send ^a
Return

ButtonOK:
Gui, Submit
NumPad7::
 {
SendInput {Text}%ttext%
sleep, 210
send {enter}
sleep, 200
}
   
GuiEscape:
GuiClose:
Gui, Hide
Return
Last edited by gregster on 10 May 2021, 13:15, edited 1 time in total.
Reason: [code] tags added. Please use them yourself, next time. Thank you!
User avatar
mikeyww
Posts: 26939
Joined: 09 Sep 2014, 18:38

Re: Pls help with the script  Topic is solved

10 May 2021, 08:48

Code: Select all

Gui, Font, s10
Gui, Add, Text  , ym+3             , Text:
Gui, Add, Text  ,                  , Number of times:
Gui, Add, Edit  , ym   w195 vttext
Gui, Add, Edit  ,      wp   vtimes
Gui, Add, Button,           Default, OK
Gosub, F3
F3::
Gui, Show, w350, Text
GuiControl, Focus, ttext
Send ^a
Return

ButtonOK:
Gui, Submit
NumPad7::
Loop, %times% {
 SendInput {Text}%ttext%
 Sleep, 210
 Send {Enter}
 Sleep, 200
}
Return

GuiEscape:
GuiClose:
Gui, Hide
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: sachinme and 346 guests