Thread: Need help for a AHK script

Results 1 to 5 of 5
  1. Collapse Details
    Need help for a AHK script 
    #1
    Member
    MainSecondary
    Join Date
    Mar 2015
    Posts
    49
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site
    Hello,
    As i can't find an answer to my post here : Pause and 15Khz resolutions , i decided to create my own workaround.

    So what i want to do is that sequence :
    - before launching Pause, i get current resolution of emulator in use (width, height, refresh)
    - i set my resolution to [email protected] using external tool, display changer
    - When i exit Pause, i set back emulator's resolution using display changer

    So here where i am now :

    Code:
    ; Use this function to define any code you want to run before Pause starts
    	StartPauseUserFeatures(){
    	Global RLLog,dbName,systemName	
    	Global $iDesktopWidth = A_ScreenWidth, $iDesktopHeight = A_ScreenHeight
    	RLLog.Info(A_ThisFunc . " - Starting")	
    	Run D:\Utilities\Display Changer\dc.exe -width=648 -height=480 -refresh=60
    	RLLog.Info(A_ThisFunc . " - Ending")
    	}
    
    	; Use this function to define any code you may need to stop or clean up after Pause ends
    	StopPauseUserFeatures(){
    	Global RLLog,dbName,systemName
    	Global $iDesktopWidth , $iDesktopHeight
    	RLLog.Info(A_ThisFunc . " - Starting")	
    	Run D:\Utilities\Display Changer\dc.exe -width= $iDesktopWidth -height= $iDesktopHeight
    	RLLog.Info(A_ThisFunc . " - Ending")
    	}
    For now i encounter 2 problems :
    - I don't know how to get current refresh rate...
    - I can't find correct syntax to set back the emulator's resolution when i exit Pause. I'm sure it's a problem with how to pass parameters to dc.exe. I tried many things but i can't figure it out...

    If someone could share his thoughts on this, i would be happy...
    Last edited by Dalba ; 07-03-2020 at 05:03 PM.
     

  2. Collapse Details
    Re: Need help for a AHK script 
    #2
    Super Moderator
    agent47's Avatar
    MainSecondary
    Join Date
    Jan 2016
    Posts
    1,371
    "hyperPause" hasn't been a thing for 5+ years. It's just "Pause"
     

  3. Collapse Details
    Re: Need help for a AHK script 
    #3
    Member
    MainSecondary
    Join Date
    Mar 2015
    Posts
    49
    You're right, i edited my posts.
    Would you have an idea about AHK syntax i should use ?
     

  4. Collapse Details
    Re: Need help for a AHK script 
    #4
    Super Moderator
    agent47's Avatar
    MainSecondary
    Join Date
    Jan 2016
    Posts
    1,371
    You can use the following code to get the current refresh rate:

    Code:
    currentMonitorObject := GetDisplaySettings()
    currentFrequency := MonitorObject[1].Frequency
     

  5. Collapse Details
    Re: Need help for a AHK script 
    #5
    Member
    MainSecondary
    Join Date
    Mar 2015
    Posts
    49
    Thanks for your help !
     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •