Hi, I need help with a very simple script

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
SmokieCZ
Posts: 5
Joined: 24 May 2023, 12:11

Hi, I need help with a very simple script

Post by SmokieCZ » 02 Jun 2023, 12:24

Hi, I need help with a very simple script. I need to type a script where the T key (opens chat) is pressed subsequently by the ↑ /UP key and then the command is sent to the chat by pressing the [ENTER] key, I would need to do this key combination after the claves are pressed 1,2,3,4,5,6,7,8,9(no numpad) and these keys are replaced every 9 seconds. Summary: I turn on the script, 1#9sec/2#9sec/3#9sec/4#9sec ..., after 9#9sec/ presses T then ↑ and ENTER, and then repeat it all over again 1#9sec/2#9sec3#9sec/4#9sec... thank you for a very good community here happy to help.

SmokieCZ
Posts: 5
Joined: 24 May 2023, 12:11

Re: Hi, I need help with a very simple script

Post by SmokieCZ » 03 Jun 2023, 06:11

I'm new and I'm not really familiar with it. If no numpad version is not available, write the script with numpad keys, i try rewrite it on the keys what i need. Thank you, and best wishes.

SmokieCZ
Posts: 5
Joined: 24 May 2023, 12:11

Re: Hi, I need help with a very simple script

Post by SmokieCZ » 03 Jun 2023, 12:02

I tried writing the script myself but it won't go off, could someone please put their eye on it and fix it so the script works? thank you to everyone

Code: Select all

F4 :: {  ; F4 = Start timer
SendEvent '+'
SetTimer 9000
SendEvent 'ě'
SetTimer 9000
SendEvent 'š'
SetTimer 9000
SendEvent 'č'
SetTimer 9000
SendEvent 'ř'
SetTimer 9000
SendEvent 'ž'
SetTimer 9000
SendEvent 'ý'
SetTimer 9000
SendEvent 'á'
SetTimer 9000
SendEvent 'í'
SetTimer 9000

SetKeyDelay 25, 25
SendEvent 't'
Sleep 500
SendEvent '↑`n'

return
[Mod edit: [code][/code] tags added. Please use them yourself going forward!]

SmokieCZ
Posts: 5
Joined: 24 May 2023, 12:11

Re: Hi, I need help with a very simple script

Post by SmokieCZ » 03 Jun 2023, 13:50

I have finally managed to write a piece of the functional script, now I just need to adjust the pressing of the ↑/up key And add a repeat of this script until I turn it off myself. thank you to everyone for your help.

Code: Select all

f1::
SendEvent 1
 Sleep,8500
SendEvent 2
 Sleep,8500
SendEvent 3
 Sleep,8500
SendEvent 4
 Sleep,8500
SendEvent 5
 Sleep,8500
SendEvent 6
 Sleep,8500
SendEvent 7
 Sleep,8500
SendEvent 8
 Sleep,8500
SendEvent 9
 Sleep,8500
SendEvent 't'
Sleep 500
SendEvent ↑ n

return

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

Re: Hi, I need help with a very simple script

Post by mikeyww » 03 Jun 2023, 13:59

You are posting in the v2 forum.

Code: Select all

#Requires AutoHotkey v1.1.33
#MaxThreadsPerHotkey 2
SoundBeep 1500

F1::
If on := !on
 Loop {
  Loop 9 {
   Send % A_Index
   Sleep 8500
  }
  Send t
  Sleep 500
  Send {Up}`n
 }
Else Reload

User avatar
boiler
Posts: 16926
Joined: 21 Dec 2014, 02:44

Re: Hi, I need help with a very simple script

Post by boiler » 03 Jun 2023, 15:33

@SmokieCZ -- Between the two pieces of code you have posted, they have elements of both v1 and v2, neither of which is a fully correct script for either. Which are you using? We'll move this thread to the v1 section if that's what you're using.

Post Reply

Return to “Ask for Help (v2)”