Reading ini files issues
Moderators: JRL, Dorian (MJT support)
Reading ini files issues
ReadIniFile>c:\Upload\test.ini,Testing,user,username
Let>name=username
test.ini looks like the following
[Testing]
user=Novalak
nothing in the code watch list, is blank name is not being populated
Am i doing something wrong
Let>name=username
test.ini looks like the following
[Testing]
user=Novalak
nothing in the code watch list, is blank name is not being populated
Am i doing something wrong
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Reading ini files issues
Is "user" a literal or might it already be a variable? What happens if you do:
ReadIniFile>c:\Upload\test.ini,{"Testing"},{"user"},username
Or better would be a more obvious variable name which is not going to get confused with something else:
ReadIniFile>c:\Upload\test.ini,{"Testing"},{"user"},strUserName
ReadIniFile>c:\Upload\test.ini,{"Testing"},{"user"},username
Or better would be a more obvious variable name which is not going to get confused with something else:
ReadIniFile>c:\Upload\test.ini,{"Testing"},{"user"},strUserName
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Reading ini files issues
neither worked
This is literally my whole script - i was testing
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
ReadIniFile>c:\Upload\test.ini,{"Testing"},{"user"},strUserName
Let>name=strUserName
along with my ini
[Testing]
user=Novalak
This is literally my whole script - i was testing
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
ReadIniFile>c:\Upload\test.ini,{"Testing"},{"user"},strUserName
Let>name=strUserName
along with my ini
[Testing]
user=Novalak
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Reading ini files issues
Makes no sense. Unless the INI file is not where you think it is and the path is wrong. Or the INI file has some weird format. Can you attach your INI file and script file here. See "Upload attachment" tab below the post edit box.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Reading ini files issues
uploaded the ini file as well as the screenshot of the path
running 14.2.01
running 14.2.01
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Reading ini files issues
Your INI file is fine. Works nicely for me. I did a screencast to show you which might jog something:
http://vids.mjtnet.com/watch/c2ljljeZ3Q
http://vids.mjtnet.com/watch/c2ljljeZ3Q
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Reading ini files issues
i dont know why, but i recreated my scriptfile and my ini and started working
anyway next problem
ReadIniFile>%SCRIPT_DIR%\settings.ini,Buttons,march,strMarch
Let>march=strMarch
MouseMove>%march%
INI File
[Buttons]
; march button
march=1200,780
Error in: INI
Line: 6 - Missing parameters in function call (minimum of 2 expected)
anyway next problem
ReadIniFile>%SCRIPT_DIR%\settings.ini,Buttons,march,strMarch
Let>march=strMarch
MouseMove>%march%
INI File
[Buttons]
; march button
march=1200,780
Error in: INI
Line: 6 - Missing parameters in function call (minimum of 2 expected)
Re: Reading ini files issues
I even tried to split the settings into x and y and still MoveMouse wont accept a variable
Re: Reading ini files issues
I believe the cause of the problem was that it was located c:\Upload\ which requires administrative rights, you can be the administrator and still have this problem... if you put the file in a location that doesn't require administrator permission it will read the file.
That's why putting it in script_dir worked out for you (Guessing the directory is in your document file)
That's why putting it in script_dir worked out for you (Guessing the directory is in your document file)
Re: Reading ini files issues
MouseMove> requires two parametersLine: 6 - Missing parameters in function call (minimum of 2 expected)
If your ini file has the x and y coordinates on separate lines try:
Code: Select all
ReadIniFile>%script_dir%\settings.ini,Buttons,marchx,strMarch1
ReadIniFile>%script_dir%\settings.ini,Buttons,marchy,strMarch2
MouseMove>strMarch1,strMarch2
Code: Select all
ReadIniFile>%script_dir%\settings.ini,Buttons,march,strMarch
Separate>strMarch,comma,vPos
MouseMove>vPos_1,vPos_2
Re: Reading ini files issues
thanks that works cheers