• AnyStream is having some DRM issues currently, Netflix is not available in HD for the time being.
    Situations like this will always happen with AnyStream: streaming providers are continuously improving their countermeasures while we try to catch up, it's an ongoing cat-and-mouse game. Please be patient and don't flood our support or forum with requests, we are working on it 24/7 to get it resolved. Thank you.

My modified ReClock script to automatically change refresh rate without PowerStrip

guys,

Can you maybe help me out? I got the file 'SetDisplayFrequency.exe' from some forum and put it in my Program Files (x86)\ReClock folder. I enabled the .vbs option in ReClock and made the runevent.vbs script look like this:

Code:
' -------------------------------------
' Event notification script for ReClock
' -------------------------------------
'
' This script will be called when ReClock change the media adaptation of a played file
' either automatically or after some manual change made in the properties panel
' It is called only for media file which contain a video stream, and when frame rate of this file is known
'
' ---------------------------------------------------------------------------------------------
' The 7 parameters received by this script are explained below:
'
' (1) contains the event name that just occurred:
'    - "GREEN"  : tray icon just got green (all is fine). Parameter
'    - "YELLOW" : tray icon just got yellow. We should make what is necessary
'                 to change the monitor refresh rate 
'    - "STOP"   : playback just stopped
'    - "QUIT"   : ReClock is about to quit
'
' Parameters (2), (3), (8) and (9) apply only with "GREEN" and "YELLOW" events. Otherwise they contain "-"
'
' (2) contains the type of media file currently played :
'    - "CINEMA" : frame rate of source file is around 24 fps
'    - "PAL"    : frame rate of source file is around 25 fps
'    - "NTSC"   : frame rate of source file is around 30 fps
'    - "CUSTOM" : frame rate of source file does not fall in previous categories
'
' (3) contains the current sound playback mode (apply only with GREEN/YELLOW event):
'    - "PCM"    : PCM mode
'    - "SPDIF"  : AC3 passthrough SPDIF
'
' (4) contains the current monitor selected for playback (1=primary, 2=secondary, etc...)
'
' (5) contains the total monitor count detected in the system
'
' (6) contains the current resolution of your monitor (WIDTHxHEIGHT)
'
' (7) contains the current refresh rate of your monitor (in Hz)
'
' (8) contains the original playback rate of the file (in fps multiplied by 1000)
'
' (9) contains the current playback rate of the file (in fps multiplied by 1000)
'
' (10) contains the filename of the current media file
'
' -------------------------------------------------------------------------
' SetDisplayFrequency Version - Sets refresh rate using SetDisplayFrequency
' -------------------------------------------------------------------------

' Decode the parameters

Set objArgs = WScript.Arguments

If objArgs.Count < 10 Then

    MsgBox "Bad argument count !",  MB_OK, "ReClock Event Notification"
        
    ' We have done nothing. Return 1 to indicate ReClock that the configuration has not changed.
    
    WScript.Quit 1

End If

eventName = objArgs(0)
mediaType = objArgs(1)
soundMode = objArgs(2)
currentMonitor = objArgs(3)
totalMonitorCount = objArgs(4)
currentResolution = objArgs(5)
currentRefreshRate = objArgs(6)
originalPlaybackSpeed = objArgs(7)
currentPlaybackSpeed = objArgs(8)
currentMediaFile = objArgs(9)

' If you need to debug, replace false with true in the following line.

If false Then MsgBox _
    eventName & " " & _
    mediaType & " " & _
    soundMode & " " & _
    currentMonitor & " " & _
    totalMonitorCount & " " & _
    currentResolution & " " & _
    currentRefreshRate & " " & _
    originalPlaybackSpeed & " " & _
    currentPlaybackSpeed, _
    MB_OK, "ReClock Event Notification"

Set wshShell = CreateObject("WScript.Shell") 

' We will put new refresh rate here if necessary.

newRefreshRate = currentRefreshRate

' Obviously we have something to do only if the icon is yellow.

If eventName = "YELLOW" Then
	
   If currentRefreshRate <> originalPlaybackSpeed Then
   	
        Select Case mediaType 
            Case "CINEMA"
                newRefreshRate = "23"
            Case "PAL"
                newRefreshRate = "50"
            Case "NTSC"
                newRefreshRate = "59"
        End Select
        
   End If
   
End If

' We quit the player, restore our favorite refresh rate.

If eventName = "QUIT" Then

    newRefreshRate = "60"

End If

' Do we have new refresh rate to apply ?

If currentRefreshRate <> newRefreshRate Then

    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace(&H26&) 
    Set objFolderItem = objFolder.Self

    ' Now run SetDisplayFrequency command and wait for it to finish its job.
    
    WshShell.Run """" & objFolderItem.Path  & _
                 "\ReClock\SetDisplayFrequency.exe"" " & newRefreshRate, 0, true
                                         
    ' In case we did a configuration change we MUST return 0 to indicate ReClock it need to recalibrate itself.
    
    WScript.Quit 0

End If

' We have done nothing. Return 1 to indicate ReClock that the configuration has not changed.

WScript.Quit 1

When I run MPC-HC with ReClock and the .vbs script option enabled MPC-HC seems to do SOMETHING (screen seems to change) but not how I want it. When I ran a 25fps source it does not switch to my ati 1920@1080@50Hz profile and when I run a 29,970fps source it does not switch to my ati 1920@1080@59Hz profile.

What could I be doing wrong here?
 
I cannot quite believe that you have illegally downloaded Slysoft software (supplied with AnyDVD) and then come to a Slysoft forum for support!
 
setdisplayfrequency.exe comes along with the free trial of Anydvd so nothing illegal here.
 
Just because they gave you a free trial and it does not have protection does not make it legal to keep using it and anyway you said you downloaded it from "some forum". Anyway it is not my job to be a policeman, I just found it amusing! And IMO until James says it is OK I don't think it would be right to troubleshoot.
 
You have to think more before posting something on the forum m8:

Slysoft AnyDVD is a software package that has to be paid for. I m NOT going to grab AnyDVD from some kind of newleecher or something. I only downloaded the 'SetDisplayFrequency.exe' to see and try if it work. And WTF are you talking anyway? Do I SAY anywhere that I m not going to buy AnyDVD if it works? And moreover, AnyDVD can be downloaded as a TRIAL from the official site. You can only use it for 14 days (it is protected I assume?). There s no documentation that a person cannot copy the 'SetDisplayFrequency.exe' to his local hard drive. If Slysoft wanted they could have made a protection for this little app too. But again, I m going to buy AnyDVD anyway if it fits for my after 14 days.
 
I could say the same to you! if you said you downloaded the AnyDVD trial we would not be having this exchange, but you said you downloaded Slysoft software from"some forum"! in the nicest possible way, that is pretty dumb!

I am not trying to be a pain here, but in the face of such a flagrant breach I think we have to wait to see if James accepts your explanation!
 
hahahaha, James freakin hates me. You really think he s going to support me? NOT!

But thanks Jong, for putting me in such a bad daylight. If there ONE SINGLE PERSON on this planet who only has all his software legal, it s me.

Thanks man, really :mad::mad:
 
Well I'm sorry. I really am. But it was just too obvious to ignore and I'd have left it as a lighthearted remark if you had not pushed.

By the way, I do not think there are any specific advantages of setdisplayfrequency over other similar and free tools, unless James can say otherwise.
 
Well I'm sorry. I really am. But it was just too obvious to ignore and I'd have left it as a lighthearted remark if you had not pushed.

By the way, I do not think there are any specific advantages of setdisplayfrequency over other similar and free tools, unless James can say otherwise.

ok, I may have overreacted too in the heat of the moment. Case closed for me Jong!

I ve already skipped SetDisplayFrequency.exe anyway. I thought I needed this to 'call in' my ATI profiles but I just learned from renethx from the AVS forum that I don t need anything at all. I just need to config the .vbs script correct so it 'sees' my ATI profiles.
 
For some reason dc.exe has stopped working a while ago("unsupported resolution")...I've just tried nircmd.exe but it also doesn't do anything. I can change resolutions through the windows config, but it's just annoying..not sure wth is up?! Each time I install a new forceware driver, I use DriverCleaner, maybe it's messed up the registry somehow.

apparently I can't go >85Hz in dc.exe?! :(

I've made a dummy .inf for my monitor that says 120Hz max...same story. It's prolly the nvidia drivers that get the 85Hz limit through DDC, time to break some pins :D
 
Last edited:
I can't get it to work. It says it cannot find the file specified. Yes the path is correct.
 
is there any chance of someone posting the full runevent.vbs for just changing with the nvidia built in changer.

i know theres the if statement you need in the second post of this thread but i can't figure out how to mesh it with the other full runevent.vbs's that people have posted on here.
 
I thought this would be easy way to match refresh rate to media rate without manually changing things. No such luck, thought, doesn't play nice with TMT. TMT stops and restarts playback on resolution/refresh change and you can see where this is going.. :doh:

I guess acceptable workaround is to make simple batch file with DC for TMT..
 
Back
Top