User Tag List

Results 1 to 6 of 6

Thread: Counter Value/Global Value into a Filename?

  1. #1
    No Products Registered

    Join Date
    Feb 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Counter Value/Global Value into a Filename?

    Hey everybody, I'm a relative beginner at this and just had a quick question -
    I'm making something where a user types into a Rich Edit Object and is able to save what they typed by clicking a button. My goal is to have it so when you click the button, the filename of the saved RTF is a number generated by the date (like a timestamp) so that in running the program and typing in the box on another day, the button would generate a new, separate file. The roadblock I've hit is that you don't seem to be able to draw from any alterable value or a counter in the expression calculator for the filename (and I also tried having a string draw from the value so I could have the filename draw from the string, but that didn't work out either) - I just get a Syntax Error.

    Can anyone come up with a way to make this work, or maybe an alternate solution that achieves the same goal (generating a filename for a saved text file based on the date the program is run)? Thanks for any help.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Just use "Convert number to string" (str$) in the system object expressions.

  3. #3
    No Products Registered

    Join Date
    Feb 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Excellent, thanks, I'll give that a try!

  4. #4
    No Products Registered

    Join Date
    Feb 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, I understand now how to exchange info between a value and string and I'm doing that fine. However, I'm still getting a syntax error in the expression calculator. What I've got right now is, when Button is clicked, Save Text "C:\Destination\Str$(value( "Counter 6" )).rtf". So, I want the file to be saved in the folder "Destination" with the current value of Counter 6 as the filename. Any idea what I still have wrong here?

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    Phi's Avatar
    Join Date
    Jan 2010
    Location
    England
    Posts
    1,964
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)
    You wrote it wrong. Use:
    "C:\Destination\"+Str$(value( "Counter 6" ))+".rtf"
    Or to save to the application's folder, use:
    Apppath$+Str$(value( "Counter 6" ))+".rtf"

  6. #6
    No Products Registered

    Join Date
    Feb 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah hah! Thanks for the help. Like I said, I'm still pretty new at this, but I'm learning new things all the time.

Similar Threads

  1. Global Counter Help!
    By Kolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 2nd December 2013, 09:51 AM
  2. [Request] Replace Counter by Global Value
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 10th February 2008, 05:22 PM
  3. Global counter
    By willy in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 27th September 2007, 07:18 PM
  4. Converting a long filename to a short filename
    By Brandon in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th April 2007, 11:31 AM
  5. global value equal to counter
    By rhoymand in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 23rd November 2006, 08:20 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
  •