ini read help Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ravena1
Posts: 62
Joined: 06 Sep 2017, 15:13

ini read help

16 Apr 2022, 02:49

im so confused so much, how do i check if my ini file value is 12? it does not seem to detect the 12 value in my ini file


i hope you guys can enlighten me, thank you

Code: Select all

numpad1::
loop,
{
check_id()
sleep 30

}


check_id() {
Global apple:= 0
IniRead, var, myini.ini, id, apple
if(apple = 12) {
msgbox, found
return
}
 else  {
 msgbox, not found
 sleep 1000
  return

 }

}


end::exitapp
+


here is inside myini.ini file

Code: Select all

[id]
12
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: ini read help

16 Apr 2022, 03:08

Code: Select all

[section]
id=12
and the code

Code: Select all

IniRead, var, myini.ini, section, id
ravena1
Posts: 62
Joined: 06 Sep 2017, 15:13

Re: ini read help

16 Apr 2022, 03:20

AHKStudent wrote:
16 Apr 2022, 03:08

Code: Select all

[section]
id=12
and the code

Code: Select all

IniRead, var, myini.ini, section, id
i tried but still cant match the value of 12
do you think there is something wrong with this??

Code: Select all

if(id = 12) {
msgbox, found it
ravena1
Posts: 62
Joined: 06 Sep 2017, 15:13

Re: ini read help

16 Apr 2022, 03:25

still no luck :( :(

Code: Select all

Global id:= 0
IniRead, var, myini.ini, section, id
Newid:= %id%
if (Newid = 12) {
msgbox, found
gregster
Posts: 9098
Joined: 30 Sep 2013, 06:48

Re: ini read help  Topic is solved

16 Apr 2022, 03:25

var contains the output, so you should check it:

Code: Select all

if(var = 12) 
ravena1
Posts: 62
Joined: 06 Sep 2017, 15:13

Re: ini read help

16 Apr 2022, 03:27

gregster wrote:
16 Apr 2022, 03:25
var contains the output, so you should check it:

Code: Select all

if(var = 12)
omg im so dumb :crazy: :crazy: thank you so much from the buttom of my heart :bravo:
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: ini read help

16 Apr 2022, 03:29

@ravena1 - AHK's help about :arrow: IniRead contains an example (at the bottom of the page, like for almost all commands). It's really not that complicated :thumbup:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 184 guests