User Tag List

Results 1 to 6 of 6

Thread: Ini and loop

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2011
    Location
    France
    Posts
    356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Ini and loop

    Hi !

    I met a little problem with my program. Got sevral objects in and a list and an ini file. Got also counters, and so on.
    In my ini file, I got a lot of groups named "Probe1" "Probe2" "Probe3", etc ... they are only increasing numbers that follow.
    Those groups are created by the user when he clicks on special butons. When the application starts, I want to load in the list all the informations of my ini files

    I have this :

    [Main]
    NP=3
    [Probe1]
    N=1
    A=0
    B=0
    [Probe2]
    N=2
    A=60
    B=45
    [Probe3]
    N=3
    A=90
    B=90

    And in my list I want to see that :

    Probe n°1 - A=0 B=O
    Probe n°2 - A=60 B=45
    ...
    ...

    The problem is when I want to load an item in a group, MMFD2 bugs.
    I try with this string :
    "Probe n°"+Str$(value( "Probe counter" )+1)+" - A="+GroupItemString$( "Ini", Global string H, "A") with H=Str$(value( "Probe counter" ))
    With this one also :
    "Probe n°"+Str$(value( "Probe counter" )+1)+" - A="+GroupItemString$( "Ini", Str$(value( "Probe counter" )), "A")
    What is underlined makes MMFD2 burned out.

    If anyone got an idea, he is welcome ! I can change groups name, I know it should be better to use loop but I never used this function.
    I hope my english is not so bad ... I tried to do my best.

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2011
    Location
    France
    Posts
    356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No one to help me ?
    Siouplait ! Aidez-moi !

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2011
    Location
    France
    Posts
    356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please !!! Help !

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    SoftWarewolf's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    941
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    i am not used to using groups, and have a hard time reading your expression, could you make a simple description of what you are trying to do here?
    iniloop.mfa
    i attached a quick mockup that saves and loads 10 values.
    value 0 is saved on the save event, and the load event loads saved values into global values
    it is saved to n1,n2...n10 it could easily be duplicated to also save/load a1,a2 and b1,b2 etc, skipping the groups.

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2011
    Location
    France
    Posts
    356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi ! Thank you for your answer ! I'm sorry if my explanation was not clear ... I'll try to explain in a better way.
    First of all, this application is developped for my customers. They use machines with probes, it works on the same way as the milling machines equiped with several tools.
    The difference is that they use these probes with different angles named A and B. One probe is defined by one angle A and one angle B.
    In a special window, they are allowed to create those probes, by specifying the angles. Like that, they create a list saved in an ini file. This file is structured as in my first post :

    [Main]
    NP=3
    [Probe1]
    N=1
    A=0
    B=0
    [Probe2]
    N=2
    A=60
    B=45
    [Probe3]
    N=3
    A=90
    B=90

    The group [Main] contains a string [NP] for the number of declared probes.

    When they start the application again, I want to load all these informations to put them in the same list that was used to create these probes. Like that I could allow them to modify a probe and not to restart from the beginning.

    I hope this explanation is clear ...
    Thanx one more time for your answer SoftWarewolf !

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    SoftWarewolf's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    941
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    To save some space, i would skip the groups and just save a1 b1; a2 b2... aN bN
    Anyway, at least skip N=# in each group, that shouldn't be necessary, since you already know which probe you are saving and loading from because of the group.

    So i created exactly what you specified, except i don't save NP (main) and the N on each probe:
    probes.mfa

    My example includes 5 probes, with a A and a B value

    It saves and loads from/to edit boxes, using ini with the following structure:

    [Probe1]
    A=0
    B=0
    [Probe2]
    A=60
    B=45
    [Probe3]
    A=90
    B=90
    .....
    (example values)

Similar Threads

  1. Replies: 7
    Last Post: 25th December 2012, 11:26 AM
  2. fast loop and loop index
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th May 2010, 01:43 AM
  3. Fast loop within fast loop - platform game
    By Safe in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 16th April 2010, 07:38 AM
  4. Loop AVI?
    By ducknet in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 24th October 2009, 04:23 PM
  5. Start loop "loop" 'Alterable Value A' times
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 9th May 2009, 07:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •