User Tag List

Results 1 to 6 of 6

Thread: Get Object Specify Line

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Get Object Specify Line

    I have a question about the get object. I have a plain text file on my website. I'm wanting to get information from the second line. The Get object seems to get the whole text file. Is there a way I can retrieve just the information on line 1 or just the information on line 2?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    No. The get object will retrieve all of it. You have two options:
    1: Retrieve it all, parse it in Fusion and only show the line you intend.
    2: Use a script on the server that returns the intended text.

    I can't recommend either 1 or 2 before knowing what you're trying to do here.

    In order to make a serverscript, you must have access to the serverside of the website. If your website support php, then you can create a php script that will return the text. The backside with this, is that it takes some time to learn, the positive side is that once you learn servercode, there are pretty much no end to the possibilities...

  3. #3
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm trying to make a basic update feature. I've purchased in the past the example file for an updater from the ClickStore. I'm wanting in the server side text file to have on the first line, the version number of the most current version of the software. On the second line, I want the URL to download the latest version. The way that the updater file has this, the update url (i.e. for the latest exe) is a finite URL (e.g. www.something.com/game.exe). I don't like calling files a generic name. I prefer to have the name of the file with a number (e.g. game24.exe if it's Game v2.4). I do this so that people won't get confused if they have an earlier version of the download on their hard drive.

    If the version of the software was less than the version on the first line of the text, then it would retrieve the URL from the second line. If this were local, then I could easily do this with an INI file. Unfortunately, with the INI object, you have to set the file before pulling info. I've tried setting the current file as http://www.whatever.com/update.txt. Unfortunately, it doesn't this way.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Ah. You can just download the whole thing then, since you kinda need everything anyway.
    In the file, instead of lines, I would just store the values like this:

    versionnumber:24|versiontext:v2.4|filepath:downloa ds/game24.exe

    When you retrieve the text with the get object, 2D split it using the String Tokenizer, with delimiters X='|' and Y=':".
    Now you can loop through the items in the string tokenizer to get the versionnumber and filepath.

    So yeah, you'll need to learn about fastloops if you don't yet know to use them (it's pretty simple stuff), and play around with the String Tokenizer a bit also.

    Tell me if you want a more concrete example.

  5. #5
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the suggestion. I am familiar with fastloops. I had seen the String Tokenizer object before, but never messed with it. After reading over the help file to see the syntax for the Element2D expression, I was able to get it going with one minor tweak. I changed the Y delimiter from : to ;. At first I was wondering why it kept coming up with only "http" then it clicked. The URL is http://.. Since : is the Y delimiter, it saw everything after that as a new set of data.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Right. You don't need to store the entire url inside the variable however, as I suppose all the links should at least start with "http://www.yourwebpage.com/". But glad you got it working!

Similar Threads

  1. Replies: 5
    Last Post: 10th November 2015, 05:35 PM
  2. Replies: 7
    Last Post: 10th October 2015, 06:33 AM
  3. Sentence by sentence or line by line movement in Rich Text object?
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 17th March 2013, 11:36 PM
  4. Save text to ini in "iOs Multiple Line Object" more than one line!
    By iamjot in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 1st February 2012, 02:16 PM
  5. Change List Object Line Color - One Line Only?
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 21st December 2008, 05:58 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
  •