Jump to content

Collecting data from rid


Mitya
 Share

Recommended Posts

Hi Everybody,

I am a newbie here. I saw a few tutorial videos and I think this is the tool I need for long time.

I have a repetitive process sometimes I need to do 1000 times unfortunately because of a poorly written application.

Do you think that I can do the following ?

I have this application:

https://imgur.com/a/Y7mpsR6

 

On the right there is a huge list. I need to scroll over the whole list and click right on a specific person and click on the menu...

Thats all, but need to do it a few times.

Do you guys think that this is possible with this tool ?

Thanks,

Mitya

Link to comment
Share on other sites

Hi @Mitya, and welcome to the AutoIt forums :welcome:

The image you posted is not there anymore.

Could you please post an image here, and describe what is, in details, the task you are trying to automate? :)

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

2 hours ago, Subz said:

@FrancescoDiMuro It appeared to be for a game rfactor2

@Mitya Forum doesn't support discussing game automation so you probably won't get any assistance with this, see Forum Rules for more info

Hi @Subz,

Well, actually this is not a game, but a tool which helps the league admins to find the places where the driver went off the track (cut a corner) based on a replay file.

The tool is called ReplayOffice for rFactor 2.

please find the image attached this time.

Thanks,

Mitya

4ysQH7I.png

Link to comment
Share on other sites

2 hours ago, FrancescoDiMuro said:

Could you please post an image here, and describe what is, in details, the task you are trying to automate? :)

Hi Francesco,

So basically there are events collected that list on the right side of the picture. What we always need to do is go through all the list as many times as many drivers we have and click on the name and click the "Create clip". After we finished a driver, we can export the "clips" as a file and we need to manually check whether the driver really did cut a corner or not.

The list itself is not filterable and it is not possible to order by name unfortunately. This is why I mentioned that this is a a "poorly written" or not finished application.

Thiis process usually takes about 5-15 hours, depends on the track.

 

Thanks,

Mitya

Link to comment
Share on other sites

  • Moderators

Mitya,

Please do not bump your own threads within 24 hours.  Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare.

From what I can see, this "ReplayOffice for rFactor 2" is an add-on tool for the "rFactor2" game which allows you to analyse at a later date data files stored from the in-game play - it does not have any effect on actions within the game itself. Am I correct in this?

M23

P.S. And just to be absolutely clear - this is the Mod team determining the legality of the thread, so everyone else please keep out.

 

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

2 minutes ago, Melba23 said:

From what I can see, this "ReplayOffice for rFactor 2" is an add-on tool for the "rFactor2" game which allows you to analyse at a later date data files stored from the in-game play - it does not have any effect on actions within the game itself. Am I correct in this?

Dear Melba23,

Firstly, sorry for being impatient.

You are right, this Replay Office is a post processing tool. In our world (simracing) it is usually used by league admins / race controllers. It has nothing to do with the game itself. Its input is a race replay (generated by the game) and this tool is able to collect events from the race like fastest lap, collisions, overtakes,  etc, including corner cuts as well. You are able to filter for event types, but not for drivers. So when you want to collect all the corner cuts for a driver, you need to go through that huge list several times manually, which is really painful.

I am a programmer in my private life, but I am on the other side (Unix/Linux) so these tools are new for me and I just wanted to know whether is it possible to automate that painful task with this tool. If yes, I might be need some help / pointers as well in the future, but that will be an other thread ..

Thanks,

Mitya

Link to comment
Share on other sites

  • Moderators

Mitya,

Thanks for the clarification - the Mod team will discuss the legality of the thread as it falls in a pretty grey area. We will get back to you ASAP.

In the meantime, could you run the AutoIt3 Window Info tool on the GUI and post what information it gives you about the controls within - that will help us offer advice later if possible.

Thanks for your understanding. Everyone else still keep out please.

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

3 hours ago, Melba23 said:

In the meantime, could you run the AutoIt3 Window Info tool on the GUI and post what information it gives you about the controls within - that will help us offer advice later if possible.

Dear Melba23,

I created a video, that might help to understand what is this app... What AutoIT info does with it is also included...

https://youtu.be/SJAJONpYB1A

Link to comment
Share on other sites

  • Moderators

Mitya,

We are going to let the thread run - so if anyone now wants to join in, please feel free.

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

From his video, it looks like the program is written in .Net code (WinForms I think). The Events table that he wants to automate doesn't have individual IDs for each line. I think that the table is a DataGrid, but it's been a while since I used tables in .Net

Mitya: I think you'll need to look into UI Automation to be able to automate this. After the basics, this link may come in handy: https://docs.microsoft.com/en-us/dotnet/framework/ui-automation/ui-automation-support-for-the-datagrid-control-type :)  I'm not familiar with UI Automation, but there are plenty of people here who are!

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

@Mitya

Could you please post the AutoItWindowInfo Tool summary of the control you want to automate (last tab in the Au3_Info)? What you did in the video, but put it here, so we can assist you :)

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

1 hour ago, FrancescoDiMuro said:

@Mitya

Could you please post the AutoItWindowInfo Tool summary of the control you want to automate (last tab in the Au3_Info)? What you did in the video, but put it here, so we can assist you :)

Hi Francesco,

Here is the summary:

>>>> Window <<<<
Title:  Race Analyzer - D:\Steam\steamapps\common\rFactor 2\UserData\Replays\Melbourne Grand Prix Circuit P1 55.Vcr
Class:  WindowsForms10.Window.8.app.0.225e691_r9_ad1
Position:   405, 111
Size:   1378, 781
Style:  0x16CF0000
ExStyle:    0x00050100
Handle: 0x0000000000030DD8

>>>> Control <<<<
Class:  WindowsForms10.Window.8.app.0.225e691_r9_ad1
Instance:   23
ClassnameNN:    WindowsForms10.Window.8.app.0.225e691_r9_ad123
Name:   tableEvents
Advanced (Class):   [NAME:tableEvents]
ID: 198606
Text:   
Position:   976, 77
Size:   377, 621
ControlClick Coords:    139, 321
Style:  0x56010000
ExStyle:    0x00000000
Handle: 0x00000000000307CE

>>>> Mouse <<<<
Position:   1528, 540
Cursor ID:  0
Color:  0x903A3A

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
toolStripContainer2
Events
toolStripContainer1
toolStrip2
toolStrip1
menuStrip1


>>>> Hidden Text <<<<

So I hope it is possible to solve :) 

Really appreciate every help.

Thanks,

Mitya

Link to comment
Share on other sites

@Mitya
Well, since it seems like a ListView (or a DataGrid as @seadoggie01 suggested), you could try to use _GUICtrl_ListView* functions to interact with that type of control.
One quick test you can do is something like this:

#include <GuiListView.au3>

Global $hdlListView, _
       $intListViewItemsCount = 0


$hdlListView = ControlGetHandle("[REGEXPTITLE:(?i)Race Analyzer \-.*\.vcr]", "", "[CLASS:WindowsForms10.Window.8.app.0.225e691_r9_ad1; INSTANCE:23]")
If IsHWnd($hdlListView) Then
    $intListViewItemsCount = _GUICtrlListView_GetItemCount($hdlListView)
    If @error Then
        ConsoleWrite("_GUICtrlListView_GetItemCount() ERR: " & @error & @CRLF)
    Else
        MsgBox(0, '', "Items count in the Control: " & $intListViewItemsCount)
    EndIf
Else
    ConsoleWrite("$hdlListView is not an Handle. Error: " & @error & @CRLF)
EndIf

Run it and let us know :)

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

1 hour ago, FrancescoDiMuro said:

@Mitya
Well, since it seems like a ListView (or a DataGrid as @seadoggie01 suggested), you could try to use _GUICtrl_ListView* functions to interact with that type of control.
One quick test you can do is something like this:
Run it and let us know :)

Hi Francesco,

I can't wait to get home to try this. Big thanks!

Mitya

Link to comment
Share on other sites

10 hours ago, FrancescoDiMuro said:

@Mitya
Well, since it seems like a ListView (or a DataGrid as @seadoggie01 suggested), you could try to use _GUICtrl_ListView* functions to interact with that type of control.
One quick test you can do is something like this:

#include <GuiListView.au3>

Global $hdlListView, _
       $intListViewItemsCount = 0


$hdlListView = ControlGetHandle("[REGEXPTITLE:(?i)Race Analyzer \-.*\.vcr]", "", "[CLASS:WindowsForms10.Window.8.app.0.225e691_r9_ad1; INSTANCE:23]")
If IsHWnd($hdlListView) Then
    $intListViewItemsCount = _GUICtrlListView_GetItemCount($hdlListView)
    If @error Then
        ConsoleWrite("_GUICtrlListView_GetItemCount() ERR: " & @error & @CRLF)
    Else
        MsgBox(0, '', "Items count in the Control: " & $intListViewItemsCount)
    EndIf
Else
    ConsoleWrite("$hdlListView is not an Handle. Error: " & @error & @CRLF)
EndIf

Run it and let us know :)

Dear Francesco,

_GUICtrlListView_GetItemCount() returned back with 0. 

But it could be called at least .. :)

Link to comment
Share on other sites

@Mitya

This means that a valid handle is returned by ControlGetHandle() (and this is already something!), but _GUICtrl_ListView* functions could not be the way to solve your problem.

You can try some other Control* functions, since you got the handle of the control, but if there are no "native" functions which will solve your problem, then, as already suggested above by @seadoggie01, you should go for UI Automation :)

EDIT: In this post, the OP tried something different to interact with Grid Control; it may helps you :)

 

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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