Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2009
    Location
    Athens, Greece
    Posts
    31

    Arrow Automatic Keyword Creation for all pages in the project according to button names

    Here is the deal. I have built a project containing about 50 pages. Then i decided to create a keyword index using the Application.MakeKeywordIndex built-in functionality. But to my surprise i had forgotten to manually enter info in the keyword field of the pages.

    So ultimately i am trying to automate the process of initialising all keyword fields
    at runtime. I want the keywords for each page to be the text displayed on the buttons of that page.

    #############Solution 1###########to no avail

    One roadpath that so far has been to no avail, due to not being able to reference other pages from within a page, is discussed in this thread:
    Thread title: "How to reference buttons or other objects, in other pages?"
    http://www.indigorose.com/forums/showthread.php?t=26692

    The pseudocode of this roadpath is the following:

    loop_though_all_pages_of_the_project();
    for each page
    do
    -find all button objects and retrieve their text value
    -store the result to a variable
    -initialise the keyword field of the page with our variable above


    #############Solution 2###########????
    Has anybody something to propose?

  2. #2
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    Please don't open MULTIPLE posts for the SAME question.

    It also makes it more difficult to get help as well.

  3. #3
    Join Date
    Mar 2009
    Location
    Athens, Greece
    Posts
    31
    I apologise for creating a new thread of my accord.
    I thought it would help things conceptually.

  4. #4
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778
    Here's some things off the top of my head that may or may not give you ideas...

    I don't know how effective it would be, but using the global variable [_NoExitScriptOnPageJump=true] it may be possible to navigate through each page to extract what you need using a startup global function...?
    This may cause some goofy effects, but may give you some other ideas.

    Another possibility would be to build a stand-alone program to access the information from the XML based .am7 source code and write it to output media, then read into your project module...?

    hth

  5. #5
    Join Date
    Mar 2009
    Location
    Athens, Greece
    Posts
    31
    Quote Originally Posted by holtgrewe View Post
    I don't know how effective it would be, but using the global variable [_NoExitScriptOnPageJump=true] it may be possible to navigate through each page to extract what you need using a startup global function...?
    This may cause some goofy effects, but may give you some other ideas.
    This doesn't seem as an option at all to me to be honest. Firstly will mess up other scripts and secondly it defeats the point of not having to navigate through each page.
    Didn't know about this variable though, so still a good try.

    Quote Originally Posted by holtgrewe View Post
    Another possibility would be to build a stand-alone program to access the information from the XML based .am7 source code and write it to output media, then read into your project module...?
    This seems to be a really good idea that i hadn't even considered. I'll give it a try (if it doesn't get too complicated and time consuming) and i'll post back to let you know what happens.

  6. #6
    Join Date
    Mar 2009
    Location
    Athens, Greece
    Posts
    31

    Smile Solved

    A big thanks to <<holtgrewe>> for the xml idea...

    I have created 4 different versions, each of them is described below and
    can be downloaded at http://rapidshare.com/users/H142QA


    **P.s. By downloading the files i have uploaded at rapidshare,
    you help me get some extra points. This is the best way to thank me
    **


    Dynamically_Automatic_Keywords

    --This Script automatically initiates each page's keywords according to the button names that the page contains.
    --#***Important***#: If the pages contain already some keywords that have been entered manually these keywords will NOT be available!
    --Created by hliobasilema...hliobasilema in greek means sunset.
    --Tested and found to be working flawlessly in IndigoRose AutoPlay Media Studio 7.5.100.4.0
    --Will work only with those versions that have the same XML structure inside MyProject.am7 file.
    --To be used in conjuction with Dialog.PageSearch feature of Autoplay Media Studio, for realise the script effect.

    --####USAGE###:
    --Load the script on the preload event of the page you want to use it on.
    --Application.LoadScript("HERE GOES THE PATH TO THE LOCATION YOU HAVE STORED AutomaticKeywords.lua file");


    Dynamically_n_Manually_Automatic_Keywords

    Only Difference with above: --#***Important***#: If the pages contain already some keywords that have been entered manually these keywords will aso be availabe


    The following are for those of you that don't want to increase the system footprint/ memory load/ speed of your application


    New_Project_with_Dynamically_Automatic_Keywords


    --This Script creates a new project file with each page's keywords initiated according to the button names that the page contains.
    --#***Important***#: If the pages contain already some keywords that have been entered manually these keywords will NOT be available!
    --#ATTENTION#: Make sure that any of the variables in the script don't match with any other Global variables you might have. If that's the case either rename your variables or edit the script and declare the variables to be local.
    --Created by hliobasilema...hliobasilema in greek means sunset.
    --Tested and found to be working flawlessly in IndigoRose AutoPlay Media Studio 7.5.100.4.0
    --Will work only with those versions that have the same XML structure inside MyProject.am7 file.


    --####USAGE###:
    --Load the script on the preload event of the page you want to use it on.
    --Application.LoadScript("HERE GOES THE PATH TO THE LOCATION YOU HAVE STORED the script file");

    --After you obtain new project file, load it but REMEMBER TO DELETE THE Application.LoadScript line that you created before.


    New_Project_with_Dynamically_n_Manually_Automatic_ Keywords

    Only difference with above: --#***Important***#: If the pages contain already some keywords that have been entered manually these keywords will also be available!

  7. #7
    Join Date
    Mar 2009
    Location
    Athens, Greece
    Posts
    31
    Files have been re-uploaded.

    If you have liked my solution then please download it again to help me get some points.

    Some extra nice pics are also included.


    --By the way if you have any code improvements or any other idea let me know.

  8. #8
    Join Date
    Mar 2009
    Location
    Athens, Greece
    Posts
    31
    I just want to say thank you for the interest this thread has generated and to all those who have found my solution helpful and downloaded the files i have provided.


    Though not anybody has posted a more efficient solution yet! By looking at more efficient ways of coding it is the only way to improve my coding. So if anybody has any ideas just drop it off.

  9. #9
    Join Date
    Apr 2010
    Posts
    80

    This is perfect!

    Only I have no idea how to use it . Haha. Anyway to include instructions? I see all these scripts but no instructions on how to use them, where to put them and so forth. Thanks

    P.S. Nice pics of the Greek Islands.

  10. #10
    Join Date
    Apr 2010
    Posts
    80

    Bah never mind

    Stupid me. I did not read enough to see the instructions are already there. My bad. Thanks for the hard work.

  11. #11
    Join Date
    Apr 2010
    Posts
    80

    Update

    Ok apparently I am not quite getting the hang of this. Here is the setup...

    1. I put the Dynamically n Manually Automatic Keywords.lua in the scripts folder.
    2. I then put Application.LoadScript("\\AutoPlay\\Scripts\\Dynam ically n Manually Automatic Keywords.lua"); on the "PRELOAD" tab on the MAIN page, the page that you always see first when the project is launched.
    3. I have a picture of a magnifying glass on the MAIN page with tbSearchProps = {DialogTitle="Search Catalog", SearchForLabel="Search catalog for:"};
    Dialog.PageSearch(tbSearchProps); on the "On-click" section which when I click the image I get a pop-up window called "Search Catalog".
    4. I run the project and still can only get searches out of the keywords I manually typed in for each page in the project. It does not look like it made any new keywords based on button/image names.

    I also tried putting Application.LoadScript("\\AutoPlay\\Scripts\\Dynam ically n Manually Automatic Keywords.lua");

    tbSearchProps = {DialogTitle="Search Catalog", SearchForLabel="Search catalog for:"};
    Dialog.PageSearch(tbSearchProps); on the magnifying glass image and still nothing changes.

    Any idea what I am doing wrong? Thanks

  12. #12
    Join Date
    Apr 2010
    Posts
    80
    Quote Originally Posted by ComputerNerd View Post
    Ok apparently I am not quite getting the hang of this. Here is the setup...

    1. I put the Dynamically n Manually Automatic Keywords.lua in the scripts folder.
    2. I then put Application.LoadScript("\\AutoPlay\\Scripts\\Dynam ically n Manually Automatic Keywords.lua"); on the "PRELOAD" tab on the MAIN page, the page that you always see first when the project is launched.
    3. I have a picture of a magnifying glass on the MAIN page with tbSearchProps = {DialogTitle="Search Catalog", SearchForLabel="Search catalog for:"};
    Dialog.PageSearch(tbSearchProps); on the "On-click" section which when I click the image I get a pop-up window called "Search Catalog".
    4. I run the project and still can only get searches out of the keywords I manually typed in for each page in the project. It does not look like it made any new keywords based on button/image names.

    I also tried putting Application.LoadScript("\\AutoPlay\\Scripts\\Dynam ically n Manually Automatic Keywords.lua");

    tbSearchProps = {DialogTitle="Search Catalog", SearchForLabel="Search catalog for:"};
    Dialog.PageSearch(tbSearchProps); on the magnifying glass image and still nothing changes.

    Any idea what I am doing wrong? Thanks
    I also tried using Dialog.PageSearch in substitute of tbSearchProps = {DialogTitle="Search Catalog", SearchForLabel="Search catalog for:"};
    Dialog.PageSearch(tbSearchProps); and problem still persists.

    UPDATE

    And if I use Dynamically_Automatic_Keywords in place of the other one I can still search and see pages that have manual keywords in it so I must not be doing something right.
    Last edited by ComputerNerd; 04-07-2010 at 05:00 PM.

Similar Threads

  1. HELP! still 16 pages, 167 kbs in images = 30 meg project?
    By publishers in forum Autorun MAX! 2.1 Discussion
    Replies: 5
    Last Post: 09-08-2006, 07:10 PM
  2. Example: Creating an on/off button to toggle background audio
    By Jonas DK in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 07-10-2004, 02:54 PM
  3. HOWTO: Open a Version 3.0 Project in Version 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-30-2002, 02:09 PM
  4. HOWTO: Create a Project Template
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-28-2002, 01:49 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