User Tag List

Results 1 to 7 of 7

Thread: Help finding how many selected cells??

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help finding how many selected cells??

    Hi, just wondered, im either getting myself confused as im looking into this to much (and for to long now) or it is harder than what i thought...

    below is an image, using the datagrid, i am using this as it allows as default to select a group of cells. The problem is, you cant retrive anywhere what cells are selected, or how many which to me is daft but anyway.

    So as you can see, after i have selected cells, it have both coordinates. The 1st and the last but now i want to work out, how many cells are selected. How can i do this using the coordinates? Thanks Andy


  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help finding how many selected cells??

    first coordinates: X1,Y1
    second coordinates: X2,Y2

    Number of selected cells (0 based): (X2-X1)*(Y2-Y1)
    Number of selected cells (1 based): (X2-X1+1)*(Y2-Y1+1)

    Also, in your example, you've reverse X and Y: In fact when you write coordinates, you must write X first and then Y.
    (6,3) means 6 in X and 3 in Y.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help finding how many selected cells??

    Cheers sphax, also then, as i have got myself very confused over this, now ive got the number of cells, what sort of loop can i use to extract the data out of the cells into a list? Thanks
    Andy

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help finding how many selected cells??

    anyone know this?

    Cheers
    Andy

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help finding how many selected cells??

    Its ok, done it...

    Andy

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,734
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Help finding how many selected cells??

    Could you share your solution?

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help finding how many selected cells??

    Yeh sure, once you have the number of cells selected.

    You then do:

    Lets use sphax example : (X2-X1+1)*(Y2-Y1+1) = number of selected cells.

    Trigger action >> start loop X : (X2+1-X1+1)+1 //Number of selected cols
    on loop Xloop >> start loop Yloop : (Y2+1-Y1+1)+1 //Number of selected lines
    on loop Yloop >> add to list : text from cell > (value( "Y1" )+LoopIndex("Xloop"))-1,(value( "X1" )+LoopIndex("yloop"))-1 //Gets data from each cell every loop using the loop index as an increment each cell number

    If you get that?

    Andy

Similar Threads

  1. Xcode Cannot Run Using The Selected Device
    By Hazard159 in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 2nd October 2012, 02:01 PM
  2. Need help: 'Ammo' from selected source(s)
    By JohnJuba in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 16th March 2010, 05:05 AM
  3. Selected Objects
    By Jaffob in forum Extension Development
    Replies: 6
    Last Post: 29th March 2009, 12:55 AM
  4. Selected objects extension
    By stuckboy in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 31st December 2008, 12:30 PM
  5. Top condition always selected
    By Nick in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 24th January 2008, 08:34 PM

Posting Permissions

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