IniRead, IniWrite help please Topic is solved

Ask gaming related questions (AHK v1.1 and older)
kn4yz
Posts: 16
Joined: 08 Feb 2023, 17:19

Re: IniRead, IniWrite help please

Post by kn4yz » 09 Feb 2023, 15:28

boiler wrote:
09 Feb 2023, 12:39
kn4yz wrote:
09 Feb 2023, 05:01
I have everything in the code as you wrote above
No, you did not. See if you can spot the difference. It wastes the time of those helping when you say the script is the same but you made changes that you think are not important but make all the difference.

Code: Select all

IniRead, InputAtag, %A_MyDocuments%\NHelper\settings.ini, settings, admintag

:*?B0:/admtag::
SendInput, {space}
Input, InputAtag, V, {enter}
IniWrite, %InputAtag%, %A_MyDocuments%\NHelper\settings.ini, settings, admintag
msgbox, %InputAtag%
return
With this code, it still does not write the value specified in settings.ini after a reboot

User avatar
boiler
Posts: 17222
Joined: 21 Dec 2014, 02:44

Re: IniRead, IniWrite help please

Post by boiler » 09 Feb 2023, 16:39

kn4yz wrote: With this code, it still does not write the value specified in settings.ini after a reboot
Do you mean it doesn't read the value after a reboot? Does it write to the .ini file at all? Do you see that file at some point? If so, does the .ini file exist after a reboot?

What does it show when you run the following script?

Code: Select all

IniRead, InputAtag, %A_MyDocuments%\NHelper\settings.ini, settings, admintag
MsgBox, % "The .ini file was " . (FileExist(A_MyDocuments . "\NHelper\settings.ini") ? "" : "not ") . "found.  The value of InputAtag that was read is: " . InputAtag

kn4yz
Posts: 16
Joined: 08 Feb 2023, 17:19

Re: IniRead, IniWrite help please

Post by kn4yz » 09 Feb 2023, 17:35

boiler wrote:
09 Feb 2023, 16:39
kn4yz wrote: With this code, it still does not write the value specified in settings.ini after a reboot
Do you mean it doesn't read the value after a reboot? Does it write to the .ini file at all? Do you see that file at some point? If so, does the .ini file exist after a reboot?

What does it show when you run the following script?

Code: Select all

IniRead, InputAtag, %A_MyDocuments%\NHelper\settings.ini, settings, admintag
MsgBox, % "The .ini file was " . (FileExist(A_MyDocuments . "\NHelper\settings.ini") ? "" : "not ") . "found.  The value of InputAtag that was read is: " . InputAtag
The ini file exists further, and what I indicated through / admtag is there, only after a reboot, as if what is written there simply does not read

User avatar
boiler
Posts: 17222
Joined: 21 Dec 2014, 02:44

Re: IniRead, IniWrite help please

Post by boiler » 09 Feb 2023, 17:58

Can you just copy and paste what the MsgBox shows? I'm walking you step by step how to debug it. Don't just repeat what you've already told me.

kn4yz
Posts: 16
Joined: 08 Feb 2023, 17:19

Re: IniRead, IniWrite help please

Post by kn4yz » 09 Feb 2023, 18:46

boiler wrote:
09 Feb 2023, 17:58
Can you just copy and paste what the MsgBox shows? I'm walking you step by step how to debug it. Don't just repeat what you've already told me.
If I can please explain, I will be very grateful to you

User avatar
boiler
Posts: 17222
Joined: 21 Dec 2014, 02:44

Re: IniRead, IniWrite help please

Post by boiler » 09 Feb 2023, 19:57

kn4yz wrote:
09 Feb 2023, 18:46
If I can please explain, I will be very grateful to you

1. Copy this script into a .ahk file and save it:

Code: Select all

IniRead, InputAtag, %A_MyDocuments%\NHelper\settings.ini, settings, admintag
MsgBox, % "The .ini file was " . (FileExist(A_MyDocuments . "\NHelper\settings.ini") ? "" : "not ") . "found.  The value of InputAtag that was read is: " . InputAtag
2. Run the above script that you just saved.

3. While the MsgBox that the script displays is the active window, press Ctrl+C.

4. Reply to this thread and click in the place where you would type your message, and press Ctrl+C.

5. Click the Submit button to submit your post to the forum.

kn4yz
Posts: 16
Joined: 08 Feb 2023, 17:19

Re: IniRead, IniWrite help please

Post by kn4yz » 10 Feb 2023, 06:31

boiler wrote:
09 Feb 2023, 19:57
kn4yz wrote:
09 Feb 2023, 18:46
If I can please explain, I will be very grateful to you

1. Copy this script into a .ahk file and save it:

Code: Select all

IniRead, InputAtag, %A_MyDocuments%\NHelper\settings.ini, settings, admintag
MsgBox, % "The .ini file was " . (FileExist(A_MyDocuments . "\NHelper\settings.ini") ? "" : "not ") . "found.  The value of InputAtag that was read is: " . InputAtag
2. Run the above script that you just saved.

3. While the MsgBox that the script displays is the active window, press Ctrl+C.

4. Reply to this thread and click in the place where you would type your message, and press Ctrl+C.

5. Click the Submit button to submit your post to the forum.
---------------------------
Nakamura Helper.ahk
---------------------------
kn4yz
---------------------------
ОК
---------------------------

User avatar
boiler
Posts: 17222
Joined: 21 Dec 2014, 02:44

Re: IniRead, IniWrite help please

Post by boiler » 10 Feb 2023, 07:33

It’s not possible that’s the output of that script. It doesn’t show the part about the .ini file being found.

This is the fourth post asking for the output of a simple script. I can’t help debug like this. Hopefully someone else is willing to help.

Post Reply

Return to “Gaming Help (v1)”