Hi devs,
I just discovered problem with AutoRateAccurate and MM Pre-3.1.
Problem:
To prevent the script from running multiple times at the same time, I write into the mediamonkey.ini 'ini.StringValue("AutoRateAcc", "IsWorking") = "True"'. Now I have a problem with this part since 3.1 because it seems to set IsWorking to "True" (I can see that if I run 'SDB.Messagebox ini.StringValue("AutoRateAcc", "IsWorking"), mtWarning, Array(mbOK)' afterwards WITHIN THE SAME SCRIPT-INSTANCE) but it doesn't really saves this modified mediamonkey.ini. At least the ini on the harddisk didn't get modified (directly), it seems like it would be in a sort of cache. If now a second instance of the script runs and tries to look if another instance is already running it thinks that it isn't because in the ini which it loads 'ini.StringValue("AutoRateAcc", "IsWorking") = "False"' and not 'ini.StringValue("AutoRateAcc", "IsWorking") = "True"', altough it should be.
I also tried to pause a instance to look the mediamonkey.ini in my text-editor and it really shows the old 'ini.StringValue("AutoRateAcc", "IsWorking") = "False"' altough the running scrpt shows me per msgbox that it should be 'True'.
Big_Berny
Different ini-update-handling in MM 3.1?
Moderator: Gurus
Different ini-update-handling in MM 3.1?

Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
Re: Different ini-update-handling in MM 3.1?
Yes, ini file is only saved when the ini file object instance is destroyed, e.g. when the script terminates or by setting
Set ini = Nothing
I hope that it won't cause much trouble.
Jiri
Set ini = Nothing
I hope that it won't cause much trouble.
Jiri
-
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
Re: Different ini-update-handling in MM 3.1?
Hmm, I know of 1 problem I will have.
If you run a vbscript from a html page you cannot get a msg box, the only way I have been able to debug this part of scripts is to write it to the ini.
Now I have to create my own text file to debug?
Just debugging in general will be a pain, especially for users; we can't ask them to look at the ini i.e. before they click ok etc
If you run a vbscript from a html page you cannot get a msg box, the only way I have been able to debug this part of scripts is to write it to the ini.
Now I have to create my own text file to debug?

Just debugging in general will be a pain, especially for users; we can't ask them to look at the ini i.e. before they click ok etc
-
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
Re: Different ini-update-handling in MM 3.1?
I reread Big Berny's post, does it mean that the ini is now only local to the script that opens/write it?
If so this really is a big problem where the script has child scripts
i.e. main script writes a value for the html onevent script to read?
If so this really is a big problem where the script has child scripts
i.e. main script writes a value for the html onevent script to read?
Re: Different ini-update-handling in MM 3.1?
The only difference is when you use ini file object as a variable, e.g.
Set inif = SDB.IniFile
inif.StringValue...
inif.StringValue...
...
if you however use it as
SDB.IniFile.StringValue("x", "y") = "z"
then the change will be immediatelly written to disk.
Jiri
Set inif = SDB.IniFile
inif.StringValue...
inif.StringValue...
...
if you however use it as
SDB.IniFile.StringValue("x", "y") = "z"
then the change will be immediatelly written to disk.
Jiri
Re: Different ini-update-handling in MM 3.1?
Hi jiri,
ok, so we can use 'SDB.IniFile.StringValue("x", "y") = "z"' instead for the party we really need immediate inifile-update?
By the way: What happens if there are more instances which modify the ini (with inif.StringValue...)? Will always the last running instance be written on the disc?
ok, so we can use 'SDB.IniFile.StringValue("x", "y") = "z"' instead for the party we really need immediate inifile-update?
By the way: What happens if there are more instances which modify the ini (with inif.StringValue...)? Will always the last running instance be written on the disc?

Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
Re: Different ini-update-handling in MM 3.1?
Jiri, what does this change fix or improve that is important to break compatibility with existing scripts?
New script:
Last.FM Node Now with DJ Mode!
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page


Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page

Re: Different ini-update-handling in MM 3.1?
In 1212,jiri wrote:The only difference is when you use ini file object as a variable, e.g.
Set inif = SDB.IniFile
inif.StringValue...
inif.StringValue...
...
if you however use it as
SDB.IniFile.StringValue("x", "y") = "z"
then the change will be immediatelly written to disk.
Jiri
Is FALSE. Read/writing to the ini values do persist inbetween script instances, however the changes are NOT written until MM is closed.SDB.IniFile.StringValue("x", "y") = "z"
then the change will be immediatelly written to disk.
New script:
Last.FM Node Now with DJ Mode!
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page


Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page

Re: Different ini-update-handling in MM 3.1?
Yes, I can confirm that. I think it started in 1205. Anyway, the changes are correctly made within MM's internal memory so any scripts works correct. It's a bit unusual to not see the made changes in the ini file until MM is shut down.
Btw, if you use an alias or not is not an issue anymore, they are all treated the same. In fact, Jiri recommends to use alias:
http://www.mediamonkey.com/forum/viewto ... 07#p182207
Btw, if you use an alias or not is not an issue anymore, they are all treated the same. In fact, Jiri recommends to use alias:
http://www.mediamonkey.com/forum/viewto ... 07#p182207
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
-
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
Re: Different ini-update-handling in MM 3.1?
Nice Link Bex, secret MM business hey?
-
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: Different ini-update-handling in MM 3.1?


3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files