(11-06-2019, 12:36 AM)pandubz Wrote: I believe GSdx loads a copy of the ini into memory on plugin starts. From there it uses that memory copy and then writes the ini after new settings are saved by closing the menus. So to modify the inis you then need to induce some kind of reload of GSdx, pausing emulation, or changing renderers with F9 both may do this.
This will not explain why when I press Numpad5 while the values are already set to 1000 and 500,resets them to 0 and the change is visible ingame
Here is an example,
1.I run Tales of the Abyss and went to a location with visible change on the offsets(the values were both 0 when I start the game)
2.I press Numpad8 six times and each time I see that effect going down
3.Then I press Numpad5 and it went back to normal
Parotaku I have no idea if this has anything to do with it but
1.I use the Unicode version of AHK
2.The GSdx.ini file encoding is Windows (CR LF) ANSI according to Notepad++
The code works here
Edit:
This version basically does what you are doing Parotaku but it's not very reliable(sometimes it may not click on the Ok button to close the window so when that happens,you have to click on the Ok button)
Works here but at least here is nowhere near as fast as the first version
Code:
#SingleInstance,Force
#Persistent
#NoEnv
SetWinDelay,0
GSdx = D:\Games\PlayStation\PlayStation 2\inis\GSdx.ini
IniRead,X,% GSdx,Settings,UserHacks_TCOffsetX
IniRead,Y,% GSdx,Settings,UserHacks_TCOffsetY
#IfWinActive,GSdx AHK_class wxWindowNR
Numpad8::
Numpad2::
Keywait,% A_ThisHotkey
If A_ThisHotkey = Numpad8
Y += 1
Else
Y -= 1
GoSub,Apply
Return
Numpad4::
Numpad6::
Keywait,% A_ThisHotkey
If A_ThisHotkey = Numpad6
X += 1
Else
X -= 1
GoSub,Apply
Return
Numpad5::
Keywait,Numpad5
X = 0
Y = 0
GoSub,Apply
Return
Apply:
If X < 0
X = 0
If Y < 0
Y = 0
WinMenuSelectItem,PCSX2 v1,,Config,Video (GS),Plugin Settings
WinWaitActive,GSdx Settings
ControlClick,Advanced Settings and Hacks,GSdx Settings
Sleep,100
WinWaitActive,Advanced Settings & Hacks
Sleep,100
ControlSetText,Edit3,% X,Advanced Settings & Hacks
ControlSetText,Edit4,% Y,Advanced Settings & Hacks
Sleep,100
ControlSend,OK,{Enter},Advanced Settings & Hacks
WinWaitClose,Advanced Settings & Hacks
WinWaitActive,GSdx Settings
Sleep,100
ControlFocus,OK,A
ControlSend,OK,{Enter},A
WinWaitClose,GSdx Settings
Return
And it will probably only work if you have a GSdx version that have the "Skipdraw Range" hack which is in there from long time ago...meaning,if no one decides to add more edit controls,the code will work