Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2003
    Posts
    49

    Sharing code between projects

    I have created many applications which are coded identically with the exception of some graphics, button layout, etc. I like to keep each application up-to-date, so when I make changes in one application I copy the changes from each action and paste them into my other applications, and then republish them.

    I recently played with the Application.LoadScript command which seems like it would work great. I can copy the updated scripts to the individual CD_Root\AutoPlay\Scripts folder and then republish each application. What I don't like about this is that when the application is published, the script files must be distributed in the AutoPlay\Scripts folder where everyone can read and enjoy. Is it possible for the scripts to be compiled right into the application?

    I read in the online help about Application.LoadScript, dofile, and require commands. What are the differences between them? Do I need to have a separate .lua files for each Object/Action? Is there an easier way to share code between projects?

    Is there an an external .lua script editor for APM5?

    Thanks much!
    Craig Booth

  2. #2
    Join Date
    Jan 2000
    Posts
    2,002
    You could even keep the scripts in the C:\Program Files\AutoPlay Media Studio 5.0 Professional\Gallery\Scripts folder and then they will appear available to all projects.

    Application.LoadScript would be the way to go for external scripts. Once loaded, you can call functions from the script.

    As far as security goes, you could always use the Crypto plugin to encrypt/decrypt the scripts before reading them in. Or, you could even store the scripts in a SQLite database and then include the databse in each project and load and extract the scripts form there. There are many ways to do that.

    As far as editing the scripts go, you can just edit them in a "dummy" project's Global Functions and then use the Advanced menu's save and load functions to handle the files.

  3. #3
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    What about using the Crypto plugin to encrypt the data and when the project starts decrypt the files and load the script.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  4. #4
    Join Date
    Jan 2000
    Posts
    2,002
    OR, here is something else:

    You can use the file LuaCompile.exe that is in the attached Zip file to compile a lua script file to lua opcode (binary) and then just use Application.LoadScript to load it in. It will be unreadable to someone browsing the folder but will still read the script into then engine properly (Application.Load automatically knows it is compiled opcodes).

    This is a console command line program so you will have to do it from a DOS window (Start > Run > Cmd.exe).
    Attached Files

  5. #5
    Join Date
    Oct 2006
    Location
    London, UK
    Posts
    351
    That is a great tool, but when you view the output file on a notepad some parts of the code is viewable which can taken.

    Is there any other way to make it more secure and unstealable?

Similar Threads

  1. The ? char code is not working
    By Marker0077 in forum Setup Factory 6.0
    Replies: 7
    Last Post: 06-21-2003, 04:04 PM
  2. ability to list code
    By intel352 in forum Setup Factory 6.0
    Replies: 7
    Last Post: 02-24-2003, 12:42 PM
  3. Software Unlock code autogeneration
    By kaylward in forum AutoPlay Media Studio 4.0
    Replies: 11
    Last Post: 02-07-2003, 12: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