Sign in to follow this  
Followers 0
Lydenia

iniRead Problem

2 posts in this topic

I have a bot that works perfectly like i want. Now i just added a little save function to make it a little more easyer to set up if nothing changed since last use in my game to save some time with the coordinates. But somehow i am to dub to get the "iniread" to work. The saving works perfectly but when i try to "load" the values it just returns the "default" instead of the values from the ini file.

Here the tiny version of what i do:

HotKeySet("{4}","Load")
HotKeySet("{3}","Save")

Local $iToolX1 = 0

Func Save()
   Iniwrite("FoE.ini", "ToolValues", "ToolX1", $iToolX1)
   Iniwrite("FoE.ini", "ToolValues", "ToolY1", $iToolY1)
EndFunc

Func Load()
   Local $iToolX1 = IniRead("FoE.ini", "ToolValues", "ToolX1", "0")
   Local $iToolY1 = IniRead("FoE.ini", "ToolValues", "ToolY1", "0")
EndFunc

There is a hole lot more code and i get the values with mouse over it and a other Hotkey that just use a function with MouseGetPos... yeah. That all works. The ini file is in the same folder as the script. At first i used array for the coordinates but that didnt wanted to save, so i canged the hole code to singe values for x and y. So the ini file has all the values as it should when i open it with editor and check it.

Only thing i could imagine is that it has problems with the negativ coordiantes that i have because its running on a 2nd screen.

That you can check the full script and ini file i added them as attach.

 

FoE.au3

FoE.ini

Share this post


Link to post
Share on other sites



@Lydenia you obviously did not read the forum rules on your way in. Had you done so, you would have seen that we do not permit game automation discussions. I would suggest reading the forum rules before your next post.


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0