Jump to content

iniRead Problem


Lydenia
 Share

Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...