playMaker

Author Topic: I need a way of reading ini files  (Read 3337 times)

Maart

  • Junior Playmaker
  • **
  • Posts: 88
I need a way of reading ini files
« on: July 23, 2013, 06:35:32 AM »
I need a way of reading ini files with playmaker? has anyone got experience with this?


edit:
Haha, Ive found the answer in using wwwobject with file://c:/test.ini as the url works! now I can save it as a string! the problem I'm having is that it only saves the first line of the ini/text file.
« Last Edit: July 23, 2013, 07:21:59 AM by maart »

FractalCore

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 100
Re: I need a way of reading ini files
« Reply #1 on: July 23, 2013, 05:41:30 PM »
This is cool. I didn't know it would do that. But I had to reverse a / before it would work... "file://c:\test.ini"

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: I need a way of reading ini files
« Reply #2 on: July 28, 2013, 10:35:25 AM »
Hi,

 Are you all good then?

bye,

 Jean

Maart

  • Junior Playmaker
  • **
  • Posts: 88
Re: I need a way of reading ini files
« Reply #3 on: August 04, 2013, 05:09:26 PM »
not yet, I would love to be able to read multiple lines of the ini file.
then I could split the text to array list, and access the lines individually.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: I need a way of reading ini files
« Reply #4 on: August 05, 2013, 03:22:36 AM »
Hi,

the manual way would be to do the following:

1:split your ini content per line and put it in an array:
2: go through each line and split it using "=", put the first item as a key and the second as value in a hastable.

does that make sense?

bye,

 Jean