Jump to content

logging pattern/layout


Recommended Posts

How do i do to log variables into a file in this order?? I know I have to use FileWriteLine() and probably FileSetPos(), but no much more!..

//(1)(5) (9)(13)(17)(21)(25)(29)(33)(37)
//(2)(6)(10)(14)(18)(22)(26)(30)(34)(38)
//(3)(7)(11)(15)(19)(23)(27)(31)(35)(39)
//(4)(8)(12)(16)(20)(24)(28)(32)(36)(40)

Thx for your help!

Link to comment
Share on other sites

Hi, do you have simply 1 count variable? Or 40 variables with real data? Are the values in one array variable? Do you want to print the brackets and slashes too? :)

Please post your attempt, it not only shows initiative, it often complements your explanation ;)

Link to comment
Share on other sites

Hi, do you have simply 1 count variable? Or 40 variables with real data? Are the values in one array variable? Do you want to print the brackets and slashes too? :)

Please post your attempt, it not only shows initiative, it often complements your explanation ;)

Sorry, it was late when i posted... ;)

The brackets and slashes was for the exemple...The $variables are retreived from a board of variables by memory detection and are converted in Bin....

Here's what i've done until now but i've no idea on how to do the logging loop i want....

Func _Retreive_Val()
    BlockInput(1)
    Local $BOARD_VAL
    $Line = 0
    $Column = 0
    $Y_ = 330
    $X_ = 430

    MOUSEMOVE(432, 328)
    For $X = 0 To 9
        $Column = $Column + 1
        For $Y = 0 To 2
            $Line = $Line + 1
            $_PTR = _GETPTR_SELVAL($MEM_HANDLE, $KERNEL32)
            ConsoleWrite("$_PTR = " & $_PTR & @CRLF)
            If $_PTR <> 0 Then
                $BOARD_VAL = 1
            Else
                $BOARD_VAL = 0
            EndIf


            $Y_ += 26
            MOUSEMOVE($X_, $Y_)
        Next
        $Line = 4
        $_PTR = _GETPTR_SELVAL($MEM_HANDLE, $KERNEL32)
        ConsoleWrite("$_PTR = " & $_PTR & @CRLF)
        If $_PTR <> 0 Then
            $$BOARD_VAL = 1
        Else
            $$BOARD_VAL = 0
        EndIf


        $X_ += 30
        $Y_ = 330
        $Line = 0
        MOUSEMOVE($X_, $Y_)
        Sleep(60)
    Next
        BlockInput(0)
        Exit
EndFunc
Edited by cesars77
Link to comment
Share on other sites

I can't run your script so I can't test it, perhaps you can make a small runnable attempt of the type of logging you want. Which variables do you want to log? And which is your counter variable?

I understand you want to make something like you posted above, but which would be the first and second variable and so on from your snippet?

Link to comment
Share on other sites

Ok, lets make this a bit simpler :)

Rather than trying to log the values, for now, just try adding them to an array in the order that you receive them, so we can get an idea of the values you want, and their initial order, then, from this array, we can show you how to log those values in the format you like ;)

Link to comment
Share on other sites

Ok, lets make this a bit simpler :)

Rather than trying to log the values, for now, just try adding them to an array in the order that you receive them, so we can get an idea of the values you want, and their initial order, then, from this array, we can show you how to log those values in the format you like ;)

Much thx! I didn't tought to add them in an array...I figured out for the rest... ;)

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...