Pls help me with the script

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 me with the script

Post by kacper4354_ » 11 May 2021, 09:47

i have script and i wont to add in gui checkbox and when i will mark it after message script click {tab}, but when i dont mark it after message script dont click {tab}

It is my script

Code: Select all

Gui, color, purple
Gui, Font, s10
Gui, Add, Text  , cRed ym+3             , Text:
Gui, Add, Text  , cRed                 , Numbers of times:
Gui, Add, Text  , cRed                 , Sleep:
Gui, Add, Edit  , ym   w195 vttext
Gui, Add, Edit  ,      wp   vtimes
Gui, Add, Edit, w195 vClick_Delay 
Gui, Add, Button,          Default, OK
Gosub, F3
F3::
Gui, Show,, Kacper4354 SCRIPT
GuiControl, Focus, ttext
Send ^a
Return

ButtonOK
Gui, Submit
Gui, Show
return

NumPad7::
Loop, %times% {
 SendInput {Text}%ttext%
 Sleep, %click_delay%
 Send {Enter}
 Sleep, 100
}
Return

GuiEscape:
GuiClose:
Gui, Hide
Return


F9::exitapp

User avatar
mikeyww
Posts: 26889
Joined: 09 Sep 2014, 18:38

Re: Pls help me with the script

Post by mikeyww » 11 May 2021, 11:05

Does your script run? Generates a syntax error at my end.

Have you tried Gui, Add, Checkbox? You can then access its variable and act accordingly. The command to send a Tab is Send {Tab}.

kacper4354_
Posts: 28
Joined: 02 Feb 2021, 10:02

Re: Pls help me with the script

Post by kacper4354_ » 11 May 2021, 11:16

Code: Select all

Gui, color, purple
Gui, Font, s10
Gui, Add, Text  , cRed ym+3             , Text:
Gui, Add, Text  , cRed                 , Numbers of times:
Gui, Add, Text  , cRed                 , Sleep:
Gui, Add, Edit  , ym   w195 vttext
Gui, Add, Edit  ,      wp   vtimes
Gui, Add, Edit, w195 vClick_Delay 
Gui, Add, Button,          Default, OK
Gosub, F3
F3::
Gui, Show,, Kacper4354 SCRIPT
GuiControl, Focus, ttext
Send ^a
Return

ButtonOK:
Gui, Submit
Gui, Show
return

NumPad7::
Loop, %times% {
 SendInput {Text}%ttext%
 Sleep, %click_delay%
 Send {Enter}
 Sleep, 100
}
Return

GuiEscape:
GuiClose:
Gui, Hide
Return


F9::exitapp
[Mod edit: [code][/code] tags added.]


now this script it works, can you now do this function pls

User avatar
mikeyww
Posts: 26889
Joined: 09 Sep 2014, 18:38

Re: Pls help me with the script

Post by mikeyww » 11 May 2021, 11:49

An example is below.

Code: Select all

Gui, color, purple
Gui, Font, s10
Gui, Add, Text    , ym+3 cRed             , Text:
Gui, Add, Text    ,      cRed             , Numbers of times:
Gui, Add, Text    ,      cRed             , Sleep:
Gui, Add, Text    ,      cRed             , Tab:
Gui, Add, Edit    , ym   w195 vttext
Gui, Add, Edit    ,      wp   vtimes
Gui, Add, Edit    ,      w195 vClick_Delay
Gui, Add, Checkbox, y+10      vtabby      , Include TAB
Gui, Add, Button,          Default, OK
Gosub, F3
F3::
Gui, Show,, Kacper4354 SCRIPT
GuiControl, Focus, ttext
Send ^a
Return

ButtonOK:
Gui, Submit
Gui, Show
return

NumPad7::
Loop, %times% {
 SendInput {Text}%ttext%
 Sleep, %click_delay%
 Send % "{Enter}" (tabby ? "{Tab}" : "")
 Sleep, 100
}
Return

Post Reply

Return to “Ask for Help (v1)”