Jump to content

Send, randomly not always sending


Nyarly
 Share

Recommended Posts

Hello everyone,

I'm a QA Tester at a big video game editor (i can provide proofs), and it was decided that we needed tools for automation to help us in our work.

So i'll be honest with you, i'm currently developping a bot to run hardware tests, playthroughs, and game loops.

I do not intend to share the program, i'll be only using it at work to help us develop better games.

I hope you'll be able to help me despite the FAQ. I'm not coming here for the same goal and I wouldn't have come if I could do it on my own.

So, what I did is separate the task in two parts.

One that records my inputs on a block note with each line being :

timer based on @SEC, @MSEC and the difference with the time at the entrance of the loop.

the direct key pressed code 

and saves it at the end of the session.

The other one opens the file, stores it in an array (for perfs), and then loops to execute every input at the time given, using the same timing method.

My lines to send the inputs are as below :

ControlSend(("WindowName"), "", "[CLASS:WinsowClass; INSTANCE:1]", "{LEFT}")
Send ("{LEFT 10}")
 
I put both, and added 10 to send because it's not always sending the commands. Randomly (the same code and file will run differently), the tool will forget inputs.
Using consolewrite, I'm sure every command is properly handled.
 
Perfs looks good, and every command that is sent is working fine. But I'm currently successfully sending only 80% of the commands.
It doesn't seem to be linked with the key pressed duration, i tried various values. (5 to 100 ms)
So i'm left with : sending does not always send, or the game doesn't always receive the info.
 
Could someone help me ?
Shall I / Am I allowed to add more of my code ?
Thanks.
Edited by Nyarly
Link to comment
Share on other sites

https://www.autoitscript.com/autoit3/docs/functions/AutoItSetOption.htm

maybe setting the sendkeydelay and sendkeydowndelay (and mouse delays if you are playing with that input), rather than sleep will help.  

Also checking things after each movement:   get the rightmost pixel of the object being moved, move left, check to make sure that pixel changed color.  If not, log it and repeat that step.

And dont post your code (save for generic snippets to illustrate an issue), it does not matter that your efforts are job related.

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

https://www.autoitscript.com/autoit3/docs/functions/AutoItSetOption.htm

maybe setting the sendkeydelay and sendkeydowndelay rather than sleep will help.  

Also checking things after each movement:   get the rightmost pixel of the object being moved, move left, check to make sure that pixel changed color.  If not, log it and repeat that step.

And dont post your code, it does not matter that your efforts are job related.

Thank you.

I have those values by default, i tried with them a bit and didn't succeed, i'll try more then.

This pixel solution seems nice, i'll see how I can implement that, thanks!

Noted, I won't post anything.

It's not a known issue with send atleast ? I wonder if I could code my own send function..

Edited by Nyarly
Link to comment
Share on other sites

  • Moderators

Nyarly,

We have been discussing this thread amongst the moderating team and I am afraid we have decided that we will not accept it for 2 reasons:

 

- 1. It does specifically deal with game interaction, which the Forum rules expressly prohibit. We accept that you are doing it for professional reasons, but we hope you can accept that any help given to you would also be available to any passing botters.

- 2. You mention "records my inputs [...] the direct key pressed code". This is another no-go area as explained here

So...thread locked. :(>

However, as we are satisfied that you are indeed who you say you are, exceptionally we would suggest that anyone who does wish to help you should do so via PM. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...