[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 580: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 636: sizeof(): Parameter must be an array or an object that implements Countable
emuControlCenter • New scripting options
Page 1 of 1

New scripting options

Posted: 21 Aug 2012, 20:55
by DerMicha75
Hi ECC2 user,

Today I did a decision. I will not continue to do the same scripting behaviour than ECC1. But not totally different...

- I will write a eccScriptRom.dat as ECC1 does
- But there will be other keys for the rom values. The current keys are not good for me. I will generate some values, that now are calculated in eccScriptSystem.au3, I will add some new and I will remove some (in opinion) useless keys.
- I have to modify the eccScriptSystem.au3 too, so this will read the new dat and generates new global variables

So the scripts are not compatible, but can converted easily.

As an addition, ECC2 now supports key/value pairs that can be edited for each game (and defaults for each platform).

Stay tuned

Micha

Re: New scripting options

Posted: 21 Aug 2012, 20:58
by Phoenix
Hi Micha,

Let's see what you can "cook up" :rolleyes: , and i'll check ECC scripting...maybe we can make it compatible somehow :detective:

Re: New scripting options

Posted: 22 Aug 2012, 21:25
by Vicman
:clap:

Re: New scripting options

Posted: 23 Aug 2012, 20:34
by DerMicha75
So here comes the news. You can enter key/value pairs in the platform option dialog:
keyvalue1.png
Then you can enter key/value pairs in the game meta edit dialog:
keyvalue2.png
The resulting section in the datfile is:
[KEY_VALUE]
key_test = "overwritetest"
key_test4 = "newkeytest"
key_test2 = "testvalue2_platform"
key_test3 = "testvalue3_platform"
So we need a flexible method to read in all keys in one section with AutoIT. I'm sure this is easy, but I have to study the documentation. (or maybe phoenix knows the trick).

ATM I'm working on correct writing the other values (same results with packed/not packed games and so on)

Micha

Re: New scripting options

Posted: 23 Aug 2012, 20:45
by Phoenix
Hi Micha,

In this case i suggest using IniReadSection : http://www.autoitscript.com/autoit3/doc ... ection.htm

Example:

Code: Select all

Local $var = IniReadSection("C:\Temp\myfile.ini", "section2")
If @error Then
    MsgBox(4096, "", "Error occurred, probably no INI file.")
Else
    For $i = 1 To $var[0][0]
        MsgBox(4096, "", "Key: " & $var[$i][0] & @CRLF & "Value: " & $var[$i][1])
    Next
EndIf
Where:
$var[0][0] = Key/Value count in section
$var[$i][0] = Key
$var[$i][1] = Value