Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 14 of 14
  1. #1
    Join Date
    Apr 2006
    Posts
    2

    Smile List Box help needed (total newbie)

    Hello,
    I would like to run multiple quicktime movies from the list box. I used file.open and selected my movie and gave it a trial and it worked first time. After the initial trial I added several more movies and tested it again. Upon opening the second movie all that succeded it opened 1 after the other.

    I had a look at the basic script tutorial but didn't seem to grasp the concept at all scripts and actions are all new to me. If anyone can help with what I should do for the action and script for quicktime movies to open from a listbox, so that only the nominated movie I click on opens and how I should set it up for multiple movies, ie; Global functions or whatever? I might get the idea.

    I used buttons and quick action for the links no problems except I can open another movie while the current movie is still going and I don't what that to happen either. So ideally I want to open quicktime movies one at a time from the listbox and some script or action ? to stop further movies from being opened while a movie is allready running. So if anyone can give me guidelines on how I should go about this It might help a great deal for me to understand what to do.

    Thankyou,

    shepparddon4182
    Last edited by shepparddon4182; 04-15-2006 at 09:15 AM.

  2. #2
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020
    Shep,

    I felt the same way when I first used AMS. But at some points, I would definitely need to know how it works.

    So I set-up my own reference area. Try out some building blocks there. It is for starters.
    Newbie Examples
    ------> AMS 7.5 : amstudio.azman.info
    ----> AMS 6 & 5: www.azman.info/ams/
    ----> FB: facebook.com/GuideToWealth

    ----> Content Development Blog: www.AZMAN.asia

  3. #3
    Join Date
    Apr 2006
    Posts
    2

    Actions and Scripts

    Thanx Azmanar for the building blocks perhaps I missed something as I didn't see any Actions and Script examples for what I'm trying to do.
    In a List Box (Item text) I have several movies names listed, In (Item Data) I linked the files. I have 5 pages each a seperate categorie.

    So in step by step I need guidance on a sensible approach how to do this !
    Because there is so many movies for e.g Can I use a Global Function to get the movies to open and to stop other movies being opened while 1 is playing. If so what type of actions and scripts would I need to do this. If that is not a sensible or possible way what is.

    I looked through the search and found some info on List Box problems and some examples of what other people did to fix there problems and I employed there examples but none of them worked for me unfortunately. I must be missing some basic stuff so where do I start. == I used file.open action like it suggested and like I said before it worked fine on 1 movie but after I added more it opened them all so do I need boolean or if & and, On Select, On Double Click or WHAT ! to open only the selected movie.

    Can somebody please write a code example for me to try to do this as I noticed one guy was pulling his hair out and it wasn't until RoboBlue put an example code in that his problem was solved and then Worm gave another example that I didn't follow but was evidently a more correct way.

    Hoping for an example or direction on how to do this ...

    Thankyou,
    shepparddon4182

  4. #4
    Join Date
    Mar 2006
    Posts
    10
    Hello everyone this is my first post here. I think I've missed the boat along with shepparddon4182. I've searched the forum hoping to find a step-by-step guide on Listbox but to no avail. I have redesigned my project three times trying to work around my inexperience. The project I'm working on basically deals with PDF files. What needs to happen is when the equipment test form is selected from the right side listbox it can be printed once the print button has been selected. Also it has to have multiple selections because these people may be operating different pieces of equipment in one day. I will attach a part of this project hoping for guidance. Thank you for any help!
    Attached Files
    Last edited by MrSmith; 04-16-2006 at 11:02 AM.

  5. #5
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020
    It really depends on how 1 want my ListBox populated. I have to decide early. It could be dynamically populated from SQLite, File Folders, Combo Boxes, Input, Text Files and from other ListBoxes as well.

    If I want to populate my ListBox from a selected file folder, I need to create a button to look for folders. Once I selected the folder, it will populate my ListBox. In the OnClick of the button I put such script:
    Code:
    LB = "ListBox1";
    
    --Disable listbox Updating  
    ListBox.SetUpdate(LB, false);
    
    --Set default folder
    folder = Dialog.FolderBrowse("Open Folder", _DesktopFolder);
    --Set Default Extension
    if folder ~= "CANCEL" then
    
    	ListBox.DeleteItem(LB, -1); -- this will clear previous list
    	
    	-- tbSearchFiles = {"*.avi", "*.mpg", "*.dat"}; set your own file filters here
    	-- this one search all types of files
    	tbSearchFiles = {"*.*"};
    
    	for index,type in tbSearchFiles do
           file = File.Find(folder, type, false, false, nil);
           
           	if file ~= nil and file ~="CANCEL" then
    		
                  --do the following for each file:
                  for j,file_path in file do
                         --add the item to the listbox, with the name visible and path as data
                         tbFileParts = String.SplitPath(file_path);
                         sFile = tbFileParts.Filename..tbFileParts.Extension;
                         ListBox.AddItem(LB, sFile, file_path);                                      
                  end
           	end
    	end
    end
    
    --Allow the listbox to display the updated content
    ListBox.SetUpdate(LB, true);
    As for executing any file selected from a ListBox that I want to open in its default reader, I prefer putting scripts in the OnDouble Click Area of the ListBox.

    Code:
    LB = "ListBox1";
    -- Get the selected items
    tSelected = ListBox.GetSelected(LB);
    
    -- Only for single selection
    
    if tSelected then
    	-- There is an item selected, get the data!
    	sFileToOpen = ListBox.GetItemData(LB, tSelected[1]);
    	File.Open(sFileToOpen, "", SW_SHOWNORMAL);
    else
    	-- Display an error message
    	Dialog.Message("Error", "There is no item selected.");
    end
    The codes are just hacks from my sample called : ListFiles.apz .
    Of course, we just dont populate ListBoxes, we also need to edit, delete, save and etc.

    For dealing with Media Player, you need to download and hack all 3 samples I have.

    I can help only upto this point. Hope it is useful.
    Last edited by azmanar; 04-16-2006 at 12:39 PM.
    Newbie Examples
    ------> AMS 7.5 : amstudio.azman.info
    ----> AMS 6 & 5: www.azman.info/ams/
    ----> FB: facebook.com/GuideToWealth

    ----> Content Development Blog: www.AZMAN.asia

  6. #6
    Join Date
    Mar 2006
    Posts
    10
    Hello again,

    I have a listbox with 14 listbox items. How do I set up the listbox to display a PDF file once it's double clicked on. I can get one PDF file to display but once I double-click on any of the other selections the same PDF file displays. Or both files appear the same time, what am I doing wrong?

  7. #7
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020
    Alo Mr Smith,

    Go to this sample site and search for
    AMS 6 [ Dynamic List Box ] Examples:
    > Dynamically list Files from chosen Folder into a List Box.

    Download the APZ file.

    Place all your PDF files in 1 folder anywhere. Open it with the sample AMS app. Double click and check the behaviour whether you face the same problems.

    If not, you can checkout the method I used that might be useful for your purpose.
    Newbie Examples
    ------> AMS 7.5 : amstudio.azman.info
    ----> AMS 6 & 5: www.azman.info/ams/
    ----> FB: facebook.com/GuideToWealth

    ----> Content Development Blog: www.AZMAN.asia

  8. #8
    Join Date
    Mar 2006
    Posts
    10
    azmanar

    Thank you for your examples, just what I needed.

  9. #9
    Join Date
    Mar 2006
    Posts
    10
    Hello again more questions, Lets say I have a listbox with more the twenty PDF selections. How can I select more the one file at once and files I've selected be Highlighted showing I've selected them for printing? Thanks

  10. #10
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    From the help file:

    Options
    MultipleSelection
    Enable multiple listbox items to be selected at one time. Choose from:

    True
    Multiple items can be selected in the object at one time.

    False
    Only one listbox item can be selected at one time.

    Hope that helps

    Yossi

  11. #11
    Join Date
    Mar 2006
    Posts
    10
    Yes I've read that topic in the Help file, but No-Go! "True = Multiple items can be selected in the object at one time". That is my current sitting.

  12. #12
    Join Date
    Dec 2003
    Posts
    891
    Not knowing how experienced you are in windows operations, I will make a suggestion you may already know.
    When making multiple selections in the List box, you must either use Ctrl + click to select individual lines, or Shift + click to select several consecutive lines.

  13. #13
    Join Date
    Aug 2006
    Posts
    28
    My god you guys are pure genius.
    I dunno where i would be without this place.
    I like to try and spend 48 hours smashing my head on the keyboard
    before I come in here.
    But the people here are real cool and nothing is a problem.
    azmanar ....i could just kiss you sometimes...( not really, but..)

  14. #14
    Join Date
    Mar 2009
    Location
    -31.9554,115.85859
    Posts
    282

    Grin

    Error post
    Attached Images
    Last edited by boku; 08-30-2009 at 06:41 AM.

Similar Threads

  1. List Box problem
    By TonyTJ in forum AutoPlay Media Studio 6.0
    Replies: 3
    Last Post: 02-25-2006, 07:22 AM
  2. List Box Object Frustration
    By Firenegn in forum AutoPlay Media Studio 4.0
    Replies: 11
    Last Post: 10-04-2004, 05:53 PM
  3. dynamic list box, part 2
    By intel352 in forum Setup Factory 6.0
    Replies: 10
    Last Post: 01-27-2003, 10:33 PM
  4. HOWTO: Set up an MP3 Playlist
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-24-2002, 11:57 AM
  5. HOWTO: Display Conditional Text Based Upon a List Box Selection
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-15-2002, 10:54 AM

Posting Permissions

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