Can someone help me, please. Im using autohotkey and got some problems Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
dodgeyyy
Posts: 5
Joined: 02 Dec 2022, 23:12

Can someone help me, please. Im using autohotkey and got some problems  Topic is solved

Post by dodgeyyy » 02 Dec 2022, 23:19

I have script with autohotkey. The script is working like this:
It will auto type a message every minute and the next minute it will delete the message automatically.

This script is work before. I don't know what happened, but now the script is not work properly.

Auto type message is still working, but the auto delete message is not working anymore. The problem is when the script running and hit the code (delete message) it's only erase 1 character in the end of paragraph. Example

If i set auto message is :
"how to save the world"

In the next minute, the script only erase "d" Word. So it will be
"How to save the worl"

Please someone can fix it for me? I really needed help.

Please running it on discord to proof my work.

Here is the script :

Code: Select all

/*  
 Notes:  
  Set message in line 6. 
  Set delay between messages (in milliseconds) in line 7. 
*/  
  
#singleInstance force   
delay = 60500  
msg =  Hi guys. I'm very apologize for the delay. I found a bug issue about Matchmaking and it's not good for u guys to try this. I will fix this out for a few days and after we sure that it's work for many people. We will do the official announcement Our team try to be quick as much as possible for about this problem. I will try to solve this within this week. BUG : 1. Sometime Match Making match to a person that close the app already (that's mean it will match offline person forever) 
 
`::  ; Toggle autoTyper   
  send % !auto ? msg "{enter}" :   
  setTimer, autoTyper, % !auto ? delay : "off"   
  notify("Auto-Typer", (auto:=!auto) ? "ON" : "OFF")   
return   
autoTyper:   
  send %msg%{enter}   
return   
   
notify(alert, status = 0) {   
  global   
  gui +alwaysOnTop +toolWindow -caption +E0x20   
  gui color, black    
  gui font, cWhite s40 bold, arial   
  gui add, text, vNotification center w700   
  alert := alert " " status   
  guiControl,, notification, % alert   
  gui, show, autosize   
  opacity = 0   
  sleep 775  ; Maintain notification   
  gui destroy   
} 
 
z:: 
{ 
send, {Up} 
send, ^a 
send, {BS} 
send, {Enter} 
send, {Enter} 
sleep, 100 
} 
return

Rohwedder
Posts: 7558
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Can someone help me, please. Im using autohotkey and got some problems

Post by Rohwedder » 03 Dec 2022, 03:45

Hallo,
perhaps?:

Code: Select all

/*
 Notes:
  Set message in line 6.
  Set delay between messages (in milliseconds) in line 7.
*/
#singleInstance force
delay = 60500
msg =  Hi guys. I'm very apologize for the delay. I found a bug issue about Matchmaking and it's not good for u guys to try this. I will fix this out for a few days and after we sure that it's work for many people. We will do the official announcement Our team try to be quick as much as possible for about this problem. I will try to solve this within this week. BUG : 1. Sometime Match Making match to a person that close the app already (that's mean it will match offline person forever)
`::  ; Toggle autoTyper
Critical ;<<<
send % !auto ? msg "{enter}" :
setTimer, autoTyper, % !auto ? delay : "off"
notify("Auto-Typer", (auto:=!auto) ? "ON" : "OFF")
return
autoTyper:
send %msg%{enter}
return
notify(alert, status = 0)
{
	global
	gui +alwaysOnTop +toolWindow -caption +E0x20
	gui color, black
	gui font, cWhite s40 bold, arial
	gui add, text, vNotification center w700
	alert := alert " " status
	guiControl,, notification, % alert
	gui, show, autosize
	opacity = 0
	sleep 775  ; Maintain notification
	gui destroy
}
$z:: ;<<<
{
	send, {Up}
	send, ^a
	send, {BS}
	send, {Enter}
	send, {Enter}
	sleep, 100
}
return


dodgeyyy
Posts: 5
Joined: 02 Dec 2022, 23:12

Re: Can someone help me, please. Im using autohotkey and got some problems

Post by dodgeyyy » 03 Dec 2022, 05:03

Rohwedder wrote: Hallo,
perhaps?:

Code: Select all

/*
 Notes:
  Set message in line 6.
  Set delay between messages (in milliseconds) in line 7.
*/
#singleInstance force
delay = 60500
msg =  Hi guys. I'm very apologize for the delay. I found a bug issue about Matchmaking and it's not good for u guys to try this. I will fix this out for a few days and after we sure that it's work for many people. We will do the official announcement Our team try to be quick as much as possible for about this problem. I will try to solve this within this week. BUG : 1. Sometime Match Making match to a person that close the app already (that's mean it will match offline person forever)
`::  ; Toggle autoTyper
Critical ;<<<
send % !auto ? msg "{enter}" :
setTimer, autoTyper, % !auto ? delay : "off"
notify("Auto-Typer", (auto:=!auto) ? "ON" : "OFF")
return
autoTyper:
send %msg%{enter}
return
notify(alert, status = 0)
{
	global
	gui +alwaysOnTop +toolWindow -caption +E0x20
	gui color, black
	gui font, cWhite s40 bold, arial
	gui add, text, vNotification center w700
	alert := alert " " status
	guiControl,, notification, % alert
	gui, show, autosize
	opacity = 0
	sleep 775  ; Maintain notification
	gui destroy
}
$z:: ;<<<
{
	send, {Up}
	send, ^a
	send, {BS}
	send, {Enter}
	send, {Enter}
	sleep, 100
}
return
delete script didn't work automatically. i need to press "Z" to delete my message, how to make it auto?

Rohwedder
Posts: 7558
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Can someone help me, please. Im using autohotkey and got some problems

Post by Rohwedder » 03 Dec 2022, 05:17

Then:

Code: Select all

/*
 Notes:
  Set message in line 6.
  Set delay between messages (in milliseconds) in line 7.
*/
#singleInstance force
delay = 60500
msg =  Hi guys. I'm very apologize for the delay. I found a bug issue about Matchmaking and it's not good for u guys to try this. I will fix this out for a few days and after we sure that it's work for many people. We will do the official announcement Our team try to be quick as much as possible for about this problem. I will try to solve this within this week. BUG : 1. Sometime Match Making match to a person that close the app already (that's mean it will match offline person forever)
`::  ; Toggle autoTyper
Critical ;<<<
send % !auto ? msg "{enter}" :
setTimer, autoTyper, % !auto ? delay : "off"
notify("Auto-Typer", (auto:=!auto) ? "ON" : "OFF")
return
autoTyper:
Gosub, $z ;<<<
send %msg%{enter}
return
notify(alert, status = 0)
{
	global
	gui +alwaysOnTop +toolWindow -caption +E0x20
	gui color, black
	gui font, cWhite s40 bold, arial
	gui add, text, vNotification center w700
	alert := alert " " status
	guiControl,, notification, % alert
	gui, show, autosize
	opacity = 0
	sleep 775  ; Maintain notification
	gui destroy
}
$z:: ;<<<
{
	send, {Up}
	send, ^a
	send, {BS}
	send, {Enter}
	send, {Enter}
	sleep, 100
}
return

dodgeyyy
Posts: 5
Joined: 02 Dec 2022, 23:12

Re: Can someone help me, please. Im using autohotkey and got some problems

Post by dodgeyyy » 03 Dec 2022, 05:37

Im still using my old script, just increase sleep into 500 then my problem solved

dodgeyyy
Posts: 5
Joined: 02 Dec 2022, 23:12

Re: Can someone help me, please. Im using autohotkey and got some problems

Post by dodgeyyy » 04 Dec 2022, 20:55

Got problem, your script its only deleted message if no one chat except me. But if use in active group, it won't delete the message. Can you solve this?

Rohwedder
Posts: 7558
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Can someone help me, please. Im using autohotkey and got some problems

Post by Rohwedder » 05 Dec 2022, 04:51

Sorry, I have too little experience with chatting. Even telephone answering machines I do not like.
I'm bothered when too much half-baked stuff from me, is archived.

Post Reply

Return to “Ask for Help (v1)”