Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2006
    Location
    Somewere over the rainbow
    Posts
    314

    ''backup'' menu help

    i want to create a menu wich you can drop on a cd/dvd with other files like zip rar exe mp3. now i got the app to search for all files within the root and add them to a listbox but i cant get them to open on double click *within the LB*
    everytime i try to open a file is displays the root folder in the explorer....

    now i think the problem im having is that the file location is transported properly
    so i tried a bunch of different ways but it still doesn't work..

    there may be useless code in this project..

    any help is welcome

    Regards tristan,
    Attached Files

  2. #2
    Join Date
    Mar 2004
    Location
    Toronto, ON CANADA
    Posts
    696
    In your Global Functions you have the function called 'RunLBFile()'. The first line is 'Item = ListBox.GetSelected("ListBox1")' which returns a table of values so you will need to step through the results to perform actions on the results. Something like:

    Code:
    function RunLBFile()
    Item = ListBox.GetSelected("ListBox1");
    for index in Item do
         Item_Data = ListBox.GetItemData("ListBox1", Item[index]);
         Item_Name = ListBox.GetItemText("ListBox1", Item[index]);
    ...
    ...
    ...
    That should get you started.

  3. #3
    Join Date
    Oct 2006
    Location
    Somewere over the rainbow
    Posts
    314
    the location of the file is supposed to be set as the item data.. i figured getting the item data of the item double clicked on in the listbox would return the location of the file.. so it could be used for the file.open action..

    am i missing something here?

  4. #4
    Join Date
    Mar 2004
    Location
    Toronto, ON CANADA
    Posts
    696
    You are right but that wasn't what I was pointing out. The contents of the 'Item' that you use to get the selected item in the listbox returns a table, not a string. You need to step through these results in the 'Item' table to know which one was selected before you can get the item data.

    An example is here on the online help:
    http://www.indigorose.com/webhelp/am...d_Examples.htm
    Last edited by Tek; 02-16-2007 at 09:50 AM.

  5. #5
    Join Date
    Oct 2006
    Location
    Somewere over the rainbow
    Posts
    314
    ahhh , now i get it... i didn;t quite understand you before but now i do, i will take a look into it and see if i can come up with some results, Thanks

  6. #6
    Join Date
    Mar 2004
    Location
    Toronto, ON CANADA
    Posts
    696
    Cool. Post a new project if you get stuck again and we'll see where we can help.

  7. #7
    Join Date
    Oct 2006
    Location
    Somewere over the rainbow
    Posts
    314
    could someone tell me why i get the error Attempt to call field extract(a nil value) with this?

    Code:
    function RunLBFile()
    selected_items = ListBox.GetSelected("ListBox1");
    if (selected_items ~= nil) then
        output = "";
        for index, item in selected_items do
            output = output..item.."\r\n";
        end
        Loc = ListBox.GetItemData("ListBox1", output);
        tbSplit = String.SplitPath(Loc);
        
        	if tbSplit.Extension == ".zip" then
        	folderr = Dialog.FolderBrowse("Please select a folder where the files should be extracted", "_SourceFolder");	
    		Zip.Extract(Loc, {"*.*"}, folderr, true, true, "", ZIP_OVERWRITE_ALWAYS, nil);
    			else
    			end
        	else
        	File.Open(Loc, "", SW_SHOWNORMAL);
        	end
        	
    end

  8. #8
    Join Date
    Mar 2004
    Location
    Toronto, ON CANADA
    Posts
    696
    I don't see any reference in that code to a string called 'extract'.

    Maybe post your project file as the error is probably somewhere else.

  9. #9
    Join Date
    Oct 2006
    Location
    Somewere over the rainbow
    Posts
    314
    thats the problem im having with ams for a while now.. it points to the zip.Extrac action and i dont know why...

Similar Threads

  1. Article: Adding a Menu Bar System
    By Brett in forum AutoPlay Media Studio 7.5 Examples
    Replies: 5
    Last Post: 12-04-2006, 07:31 PM
  2. More Menu Bar Examples
    By Roboblue in forum AutoPlay Media Studio 7.5 Examples
    Replies: 5
    Last Post: 02-28-2006, 08:58 AM
  3. 2 Problems creating a backup menu!
    By frim in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 02-27-2004, 01:26 PM
  4. TUTORIAL: Showing and Hiding Objects in AutoPlay Menu Studio 3.0
    By Support in forum AutoPlay Menu Studio 3.0
    Replies: 0
    Last Post: 10-10-2002, 02:39 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