Jump to content

Media Player Help


adz89
 Share

Recommended Posts

Hello all,

Basicaly I have a really complex problem...

My friends have challenged me to unlock a dvd that they've made that has pin protection, i.e. you have to enter a pin on the dvd before you can access the content, i've decided to write a program thats going to try every number between 0000 and 9999,

Thats not the problem though, i've written the script and it all works perfectly, probably my best script, I'm a noob see...

But i cannot get the script to stop when the dvd changes screen, i.e. the pins been cracked

I've tried using the change in colour to dictate what the script should do in each situation, i.e. when the colour isnt blue the pin's been cracked!

So to solve all my problems i've tried learning how to control media player, but i cant find out how to tell when media player is playing something...

Can someone help me please?

Self confessed noob...

Link to comment
Share on other sites

Link to comment
Share on other sites

Yeah i've already tried that, but the problem is, it doesn't actualy work, I used a select command, so it would decide to continue the program if the tried number didn't work...

But the script didn't work...

any clues?

Self confessed noob...

Link to comment
Share on other sites

If you could show a screenshot of it in action and point out what changes when the movie plays it would help. A code example would also help.

Link to comment
Share on other sites

If you could show a screenshot of it in action and point out what changes when the movie plays it would help. A code example would also help.

Yeah, but there's a problem, because my friend won't show me what the movie looks when the pin's cracked, he's being a bit anal about it actually, ive got the hex colour written down somewhere, and i was thinking about using a select argument so that when the colour of the pin changes the script just stops and the movie carries on playing...

Here's my script so far, which tries all the pin possibilities, but the script doesn't know when its reached the correct pin...

Let me talk you through it, I've used the mouse co-ordinates to press the actual buttons, and I wrote the mouse co-rdinates into a ini file, with section 1 being the x co-ordinates and section 2 being the y co-ordinates. I've also included the colour code in the file, as the variable 'ready'

$sINI = @DesktopDir & "\Pins.ini"
$sxdata = "0=330" & @LF & "1=270" & @LF & "2=331" & @LF & "3=392" & @LF & "4=272" & @LF & "5=330" & @LF & "6=389" & @LF & "7=271" & @LF & "8=330" & @LF & "9=392"
$sydata = "0=471" & @LF & "1=325" & @LF & "2=326" & @LF & "3=327" & @LF & "4=376" & @LF & "5=375" & @LF & "6=376" & @LF & "7=425" & @LF & "8=425" & @LF & "9=427"
IniWriteSection(@DesktopDir & "\pins.ini", "section 1", $sxdata)
IniWriteSection(@DesktopDir & "\pins.ini", "section 2", $sydata)
$i = 0
$j = 0
$k = 0
$l = 0
$ready = 0x89CCFE
WinWaitActive("Windows Media Player")
Sleep(3000)
$pix = PixelGetColor(200, 200)
$pix2 = Hex($pix, 8)
While $l<10
    Select
        Case $i = 10
        $i = 0
        $j = $j + 1
        Case $j = 10
        $j = 0
        $k = $k + 1
        Case $k = 10
        $k = 0
        $l = $l + 1
        Case $l = 10
        Exit
        Case Else
            $4x = IniRead(@DesktopDir & "\pins.ini", "section 1", $i, "0")
            $4y = IniRead(@DesktopDir & "\pins.ini", "section 2", $i, "0")
            $3x = IniRead(@DesktopDir & "\pins.ini", "section 1", $j, "0")
            $3y = IniRead(@DesktopDir & "\pins.ini", "section 2", $j, "0")
            $2x = IniRead(@DesktopDir & "\pins.ini", "section 1", $k,"0")
            $2y = IniRead(@DesktopDir & "\pins.ini", "section 2", $k,"0")
            $1x = IniRead(@DesktopDir & "\pins.ini", "section 1", $l, "0")
            $1y = IniRead(@DesktopDir & "\pins.ini", "section 2", $l, "0")
            MouseClick("primary", $1x, $1y, 1, 10)
            MouseMove(200, 200, 0)
            MouseClick("primary", $2x, $2y, 1, 10)
            MouseMove(200, 200, 0)
            MouseClick("primary", $3x, $3y, 1, 10)
            MouseMove(200, 200, 0)
            MouseClick("primary", $4x, $4y, 1, 10)
            Sleep(2000)
            MouseClick("primary", 340, 510, 1, 10)  
            $i = $i + 1
    EndSelect
WEnd
Exit
Edited by adz89

Self confessed noob...

Link to comment
Share on other sites

have you tried adding something like this in your while loop:

Pseudo-code:

...
If Not PixelGetColor(200, 200) = $pix Then ExitLoop; if not color is pure blue then exitloop
...

?

Of course you'd have to correct the pixel color ..

also in this case you'd have to make sure that $pix contains the color you're looking for.

Link to comment
Share on other sites

have you tried adding something like this in your while loop:

Pseudo-code:

...
If Not PixelGetColor(200, 200) = $pix Then ExitLoop; if not color is pure blue then exitloop
...

?

Of course you'd have to correct the pixel color ..

also in this case you'd have to make sure that $pix contains the color you're looking for.

Yeah I tried tha, that was in my original code, but the script refused to find the colour, and just thought that it had cracked the code without even entering anything, so it doesn't work... Is there no way of telling if the movie is playing without using the colour?

Thanks for helping so far...

Self confessed noob...

Link to comment
Share on other sites

Try ControlExists(). If it does then you don't have the right code,if it doesn't you do.

How'd you mean? I got a little confused there, there's somethings I still find really confusing...

Self confessed noob...

Link to comment
Share on other sites

There should be a control for where you enter the number. Use ControlExists() to see if that control actually exists/is visible and if it isn't visible or doesn't exist then you've cracked the password.

Link to comment
Share on other sites

What dbzfanatic meant was that you could check if the pid input window exist or not, and use that to judge if you have the correct pin or not.

Try popping out your autoit window info tool, and check if the pin input window is visible.

Link to comment
Share on other sites

Link to comment
Share on other sites

Yeah more or less,I could've sworn I saw a ControlExists() command around on the forum somewhere. I guess 20 is too old to be coding :P.

Sorry guys tha doesn't solve my problem, the control isn't visible as its a dvd, the autoit window tool just picks up the video...

However I have tried the puesdo code from earlier, and the script is not telling me anythings wrong, so i'll have to leave it run and hope for the best...

Does anyone know how to display a variable in a message box or something? I want to rub it in and tell him the code, rather than only access the content...

Edited by adz89

Self confessed noob...

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