Announcement

Collapse
No announcement yet.

How do I do a dropdown menu of Videos to Play and PDFs to read?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cybergraph
    replied
    Originally posted by judgedredd View Post
    If I check all the boxes to 'clean' the folders, does that erase the original files?
    If the files have not a reference in the code or in object properties, they will be erased.

    I repeat you to post the APZ of the program because errors you complain look very strange. probably there are other problems with your code and/or variables.

    EDIT

    File.Open(ComboBox.GetItemData("Video - Tesla's Longitudinal Electricity", ComboBox.GetSelected(LongitudinalElectricity.mov)) ), "", SW_SHOWNORMAL);

    It is totally wrong. Use my code as is.
    Last edited by Cybergraph; 04-07-2011, 10:57 AM.

    Leave a comment:


  • judgedredd
    replied
    If I check all the boxes to 'clean' the folders, does that erase the original files?
    Last edited by judgedredd; 04-07-2011, 10:45 AM.

    Leave a comment:


  • judgedredd
    replied
    I was originally using Divx, avi and flv type videos, but when I saw that there was an ability to use the embedded QuickTime movie player I converted all files to .mov type (took me forever).

    Only problem is I can't use dropdown menus with the way the AMS is set up. So when I get this menu thingy working I will use all the original file types. I actually want the user to be able to choose a video from the drop down menu and have his/her VLC player play the videos as this player can play all file types that I have inj this project. If the user does not have VLC there will be a link where the user can install the player from the DVD I am creating (for Mac and PC).

    I have found that using this version of AMS is a lot harder than the old AMS 3/4/5. I onyl wish that the company had not made it so complicated to use.

    Leave a comment:


  • Cybergraph
    replied
    Could you please post the APZ of your app? (File -> Export).

    This is certainly not a program that does what IR say
    Sorry but I have firmly to disagree with you, expecially because this phrase comes from a beginner who has just started to use the program and ignores all its potential (and its functions).
    Give a look to the Showcase section and see what AMS can do.

    I can say that AMS already has some limitations or problem, but certainly these limitations comes when you are trying to create ver very complex programs, but certainly not when you try to index some files in a Combo.

    Anyway, If you want, post here the APZ and I will continue to help you, at least to demonstrate you are wrong with you opinion.

    Cheers.

    Leave a comment:


  • judgedredd
    replied
    Hi All,

    I put this code (actual code) in place of the example given by cybergraph:

    File.Open(ComboBox.GetItemData("Video - Tesla's Longitudinal Electricity", ComboBox.GetSelected(LongitudinalElectricity.mov)) ), "", SW_SHOWNORMAL);

    This does not work as when I click ok it comes up with error message

    Line=1: unexecpected symbol near ','

    Looking at the code from cybergraph I noticed that the closing brackets didn't match the number of opening brackets (actually they did - my mistake) so I added one. But when I took it out again the code seemed to be ok. I also had to add the quote marks around the name of the video as seen in the 'Item text' area otherwise it would throw up a long error.

    When previewing (I didn't remove all the other code) an error came up thusly:-
    ---------

    Error: attemp to index global 'LongitudinalElectricity' (a nil value)

    Stack traceback:

    1: [Page 2 -> ComboBox1 -> On Select] Line: 1 in main chunk

    -------

    This is certainly not a program that does what IR say. But thank you for helping those who are posting.

    PS. For the moderators: I can't seem to use Quick Reply/Post.
    Last edited by judgedredd; 04-07-2011, 10:25 AM.

    Leave a comment:


  • Cybergraph
    replied
    @judgedredd
    First, you have to set correctly the content of the ComboBox, where the item text is what the user will see in the combo and the item data that will be invisible but useful to get the result you need.

    So, for the first item, the text will be "Tesla's Longitudinal Electricity", and its associated data will be "AutoPlay\\Videos\\LongitudinalElectricity.div x".

    And so on for all other files.

    In the "On Select" script of the ComboBox, add this line of code:

    Code:
    File.Open (ComboBox.GetItemData(this, ComboBox.GetSelected(this)), "", SW_SHOWNORMAL);
    That's all.

    @Tone
    It is totally unuseful and confusing giving wrong indications to a user already in difficult.
    It would be better you don't reply if you are not able to give a valid help.

    Leave a comment:


  • Tone
    replied
    I was waiting for him to come back so i could start a dialogue with him Ulrich

    As i know you can see there are other errors too.

    Leave a comment:


  • Ulrich
    replied
    Since when is "Tesla's Longitudinal Electricity" a valid filename?

    Ulrich

    Leave a comment:


  • Tone
    replied
    ComboBox Properties ComboBox1;

    Settings / Item Text;

    1 Tesla 1
    2 Tesla 2

    Script;
    Code:
    combo_text = ComboBox.GetText("ComboBox1");
    
    if (combo_text == "Tesla 1") then
    File.Open("Tesla's Longitudinal Electricity", "AutoPlay\\Videos\\LongitudinalElectricity.div x", "", SW_NORMAL);
    
    elseif (combo_text == "Tesla 2") then
    File.Open("Tesla's Race to Zero Point Energy", "AutoPlay\\Videos\\RacetoZeroPointFreeEnergy.f lv", "", SW_NORMAL);
    
    end

    Leave a comment:


  • How do I do a dropdown menu of Videos to Play and PDFs to read?

    I have tried using a combobox to contain 11 files - 7 video files and 4 pdf files.

    In the script area of the combobox properties I have this code:


    File.Open("Tesla's Longitudinal Electricity", "AutoPlay\\Videos\\LongitudinalElectricity.div x", "", SW_NORMAL);
    File.Open("Tesla's Race to Zero Point Energy", "AutoPlay\\Videos\\RacetoZeroPointFreeEnergy.f lv", "", SW_NORMAL);
    File.Open("The World of Free Energy", "AutoPlay\\Videos\\TheWorldofFreeEnergy.avi", "", SW_NORMAL);
    File.Open("The Free Neregy Secrets of Cold Electricity", "AutoPlay\\Videos\\TheFreeEnergySecretsofColdElect ricity.avi", "", SW_NORMAL);
    File.Open("Peter Lindemann - Electric Motor Secrets", "AutoPlay\\Videos\\ElectricMotorSecrets.divx", "", SW_NORMAL);
    File.Open("The History of The E. V. Gray Motor", "AutoPlay\\Videos\\EVGrayMotor.avi", "", SW_NORMAL);
    File.Open("AutoPlay\\Docs\\Complete_Patents_Nikola _Tesla.pdf", "", SW_NORMAL);
    File.Open("AutoPlay\\Docs\\The_Inventions_Research es_and_Writings_of_Nikola-Tesla.pdf", "", SW_NORMAL);
    File.Open("AutoPlay\\Docs\\the_boy_electrician.pdf ", "", SW_NORMAL);
    File.Open("AutoPlay\\Docs\\The World Of Free Energy.pdf", "", SW_NORMAL);
    File.Open("AutoPlay\\Docs\\ColdElectricity.pdf", "", SW_NORMAL);

    It is not working correctly as when one clicks on any of the files all the pdf files open at the same time. The video files do not open. I am trying to get the video files to just open and allow the user's computer to choose the appropriate application.

    I would like to say that this program is a lot more difficult to use than the earlier ones.

    (I will also have a button to install the application from the disk if they don't have the correct one).
Working...
X