Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2003
    Posts
    163

    Whats the difference between LoadScript and RunScriptFile??

    hi! could anyone tell me whats the difference between application.loadscript and applicatoin.RunScriptFile please?

    and is it possible to load a encrypted txt file, decrypt it and execute the lua script in it?? (in "memory" without having to decrypt it to TEMP folder and execute it there and then delete it - or is there any other way to do it?)
    Last edited by SonG0han; 02-08-2006 at 07:14 AM.

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    In my understanding LoadScript will load the script to make it available to the project, where as RunScriptFile, will not only load but execute the code contained in the script file. As far as when I would use one over the other, I have used LoadScript to load a group of functions that are a core part of a project I have then the functions are available for the application to leverage. The run script I would use when I want the contents of the script available to the application but I want the script to actually perform its job at that time as well.

    On your second question, a couple of ways to do this would be to use the crypto plugin to encrypt and decrypt the file as approptriate. I have also used the LUA Compile file that was posted in the forum to convert my lua script to a binary file to help hide it contents.

    Tigg
    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

  3. #3
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    and is it possible to load a encrypted txt file, decrypt it and execute the lua script in it?? (in "memory" without having to decrypt it to TEMP folder and execute it there and then delete it - or is there any other way to do it?)
    I have found the Crypto.Blowfish actions to be very useful. If you intend to deliver pre-encrypted files with your application, you may need to write a separate program that will allow you to encrypt the files.

  4. #4
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    One might be interested in my offering here:

    http://www.indigorose.com/forums/sho...&highlight=RC4
    Intrigued

  5. #5
    Join Date
    Dec 2003
    Posts
    891
    Even the Crypto files have to be unencoded to some location before the app can use them.
    I unencrypt to an obscure temp location, have the app load the file (text, lua script, whatever) then immediately delete the file in the temp location in the very next line of code. I cannot even see the process if I watch the temp location. Maybe if it was a HUGE file, it would be available long enough for it to show in the temp location, but that would be a rare case. I have instances of decrypting, loading, and deleting the same file several times on a page. I haven't noticed a slow down or any of the files showing up in the temp location.
    Also, having just done a menu bar with lua script, one way to hide them is to put them in the audio, video, flash, or even button folders. Then build the project with the resource folder (AutoPlay) renamed. This will hide them pretty well in the dat01 folder.

  6. #6
    Join Date
    Dec 2003
    Posts
    163

    Thumbs up Thank you!

    @TJ_Tigger: Ah.., thanks!
    So LoadScript is only good for functions? If I load a script that.... opens a txt file or does anything else, nothwing would happen because it is not executed, right?

    an the LuaCompile.exe looks like the perfect solution!
    But do you know some kind of readme that explains the params more detailed? what does "process stdin" or "parse only"?

    @Intrigued: this one looks very good too, I will test it.

    @everyone else: Thanks for your suggestions.

  7. #7
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Quote Originally Posted by SonG0han
    an the LuaCompile.exe looks like the perfect solution!
    But do you know some kind of readme that explains the params more detailed? what does "process stdin" or "parse only"?
    I don't know much about the options other than what it tells you when you type the luacompile and it gives you the help menu. The option of process stdin allows you to type the lua code at the command prompt (in UNIX this is often referred to stdin or Standard In).

    As for Parse only, I don't know what it is designed to do.

    HTH Tigg
    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

  8. #8
    Join Date
    Dec 2003
    Posts
    163
    thanks
    then I will just try and play around with it.

  9. #9
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Quote Originally Posted by TJ_Tigger
    I don't know much about the options other than what it tells you when you type the luacompile and it gives you the help menu. The option of process stdin allows you to type the lua code at the command prompt (in UNIX this is often referred to stdin or Standard In).

    As for Parse only, I don't know what it is designed to do.

    HTH Tigg
    It will test the code for errors I believe.
    Intrigued

Posting Permissions

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