Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 15 of 53
  1. #1
    Join Date
    Apr 2010
    Posts
    80

    Global search funcion...

    I was hoping AMS 8 would of had this feature but I am not seeing it. Basically what I want to do is provide a search function on the main page, the first page that is always shown, that searches all pages and all object names. I searched on the AMS 7 forums and found talk about using a script called "Dynamically Automatic Keywords" however I never got it to work and I could not get any help from the creator via PM. I know AMS has Dialog.PageSearch but that is limited to that page and does not search for object names to my understanding.

    Does anyone know of an alternative or another way I can approach this? Any ideas?

    Thanks a bunch!

  2. #2
    Join Date
    Apr 2010
    Posts
    80
    No one has any ideas huh? Some kind of code or script that could help me out with this? No one ever wanted to be able to search a whole project by object names? I think it would be an awesome addition.

    If anyone gets any ideas let me know!

    Thanks

  3. #3
    Join Date
    Apr 2010
    Posts
    80
    Trying to keep this post alive and kickin. So again, looking for a way to search the whole project not just on page. Anybody?

  4. #4
    Join Date
    Feb 2007
    Location
    Como, Italy
    Posts
    1,314
    No one has already answered because, again, you demostrate not to read the help file.

    Otherwise, you could easily find the Application.SearchKeywords function, just typing "search" in the "search" fild of the help interface.

    As you can see, if you don't "search", you can not find!

  5. #5
    Join Date
    Apr 2010
    Posts
    80
    Cybergraph,

    I appreciate your reply. However I had this post going back to AMS 7.5 and everyone had a difficult time figuring out how to do this as apparently it was not an easy task back in AMS 7.5. I tried what you said and from what I can tell it searches only the word that is in the code like "Target." It does not allow the user to type in their own words and perform a search on the project. Here is what I have so far...

    Code:
    tbSearchProps = {DialogTitle="Search Catalog", SearchForLabel="Search catalog for:, Click"};
    Dialog.PageSearch(tbSearchProps);
    The above code does everything I want it to do except search all pages for keywords/object names as it only searches for the descriptions of the pages and nothing else. It provides an easy to use UI and you can double click on the page that it finds and it takes you right to it.

    The code

    Code:
    tbSearchResults = Application.SearchKeywords("target", true, true);
    
    if (tbSearchResults) then
        strTempString = "";
        for page_index, page_table in pairs(tbSearchResults) do
            for key_index, key_value in pairs(page_table) do
                strTempString = strTempString .. page_index.." - "..key_index..": "..key_value.."\r\n";
            end
        end
    
        Dialog.Message("Search Results", strTempString);
    end
    does not allow the user to input their own data and does not provide a UI. Now is there some way I could take the best of the two and combined them?

  6. #6
    Join Date
    Apr 2010
    Posts
    80

    Alright...

    Just to let everyone know I have spent hours reading over the user manual searching for keywords "search", "application search", "find", "page search" and so on looking for more help on my question, like I did before I posted here, and I cannot find anything that pertains to what I am looking for except if I was able to somehow combined the best of these two codes...

    Code:
    tbSearchProps = {DialogTitle="Search Catalog", SearchForLabel="Search catalog for:, Click"};
    Dialog.PageSearch(tbSearchProps);
    Tho above provides a nice UI with a click-able interface where as...

    Code:
    tbSearchResults = Application.SearchKeywords("target", true, true);
    
    if (tbSearchResults) then
        strTempString = "";
        for page_index, page_table in pairs(tbSearchResults) do
            for key_index, key_value in pairs(page_table) do
                strTempString = strTempString .. page_index.." - "..key_index..": "..key_value.."\r\n";
            end
        end
    
        Dialog.Message("Search Results", strTempString);
    end
    this code allows for searching object names/keywords. I have been reading posts and people are really getting angry at people that ask advanced questions on this forum when obviously it is over their head and I have been starting get get nasty posts myself like "No one has already answered because, again, you demostrate not to read the help file." I do not believe this search function is too advanced for me to understand it as it is just that I am having trouble finding help in the user manual for what I am asking. If no one is posting answers because this is very easy and if I read the manual I could solve my problem then please tell me and reference a page number! If what I am asking for is too advanced and no one knows how to do it then tell me so I can re-evaluate the situation. Otherwise I will just keep asking for help about it meanwhile I will keep reading the manual every couple hours when I can and try to find some answers. I am not spamming, simply I am posting questions on a forum in order to get assistance from others. That is what a forum is used for...thank you.

  7. #7
    Join Date
    Feb 2007
    Location
    Como, Italy
    Posts
    1,314
    Just to let everyone know I have spent hours reading over the user manual searching for keywords "search", "application search", "find", "page search" and so on looking for more help on my question, like I did before I posted here, and I cannot find anything that pertains to what I am looking for except if I was able to somehow combined the best of these two codes...
    Ok, open the help file, go to "Page menu" chapter, then "Pages", then "Pane"; read the page and you will find this phrase:
    Keywords
    A comma-delimited list of keywords you want to store for this page. These can be used to allow the user to search your application at runtime for pages containing keyword text. See the Dialog.PageSearch action for displaying a search dialog in your application, and the Application.MakeKeywordIndex and Application.SearchKeywords actions for manually working with the keyword index in your project.
    Also, for Object names in a page, they can be enumerated using the function "Page.EnumerateObjects ()". Reference for this function in the manual can be found under "Action reference" chapter -> Page -> Page.EnumerateObjects

  8. #8
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,508
    You can set keywords on each page (in the properties pane) and then use the Application.SearchKeywords() function to find the page in which the keyword is stored.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  9. #9
    Join Date
    Aug 2003
    Posts
    2,388
    Quote Originally Posted by Cybergraph View Post
    Also, for Object names in a page, they can be enumerated using the function "Page.EnumerateObjects ()". Reference for this function in the manual can be found under "Action reference" chapter -> Page -> Page.EnumerateObjects
    A small point but anyway.... Since the question is about how to search globally Page.EnumerateObjects would be of no use would it. It returns information only about the current page.

  10. #10
    Join Date
    Feb 2007
    Location
    Como, Italy
    Posts
    1,314
    A small point but anyway.... Since the question is about how to search globally Page.EnumerateObjects would be of no use would it. It returns information only about the current page.
    Sorry, but I don't agree.
    If I had the need to search keywords in all pages, I could do something like this:

    1- start the app as "hidden",
    2- create a table destinate to contain all app keywords (and one that will contain object names);
    3- parse the keywords (and object names) in the first page and add them to the tables;
    4- jump to page 2;
    5- make the same at points 3 & 4 for all other pages;
    6- after the last page, make the app reappear.

    Obviously, it is necessary to check if the number of pages (so the speed of the process) allow these operations. Anyway, for small projects it could be surely possible.

  11. #11
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,508
    Better yet, I'd use the Project plugin and use

    Code:
    local bIsCompiled = Project.IsCompiled();
    
    if not  bIsCompiled then
    --write the objects for each page upon page load to a text file (that is overwritten at the start of the program to "").
    elseif bIsCompiled then
    --read this ini/text file to a table where you search with your global search function.
    end
    Now, search that table at your leisure for your objects; you could even use ini functions to list them by page. Easy fix.
    Last edited by Centauri Soldier; 09-03-2010 at 05:41 PM.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  12. #12
    Join Date
    Sep 2010
    Posts
    8
    Hi, is the first time I use AutoPlay Media Studio.
    I need to create a search page that looks for other project pages in the ListBox, and clicking on items in the listbox opens the requested page.
    Kindly can you give me some examples and tell me all the steps (eg what to put in the buttons in the listbox, which measures to use, add keywords, etc..) To get the final result?
    Many thanks in advance

    In this link are pages that I create: http://projectautoplay.weebly.com
    Last edited by shogoman; 09-08-2010 at 03:17 PM.

  13. #13
    Join Date
    Jun 2007
    Location
    London
    Posts
    700
    Hello shogoman, welcome to the forum
    Is this what you're looking for?
    Attached Files

  14. #14
    Join Date
    May 2006
    Posts
    5,291
    You lot are slack!

    Has no-one stopped to think about the project XML file ?

    No-one with me!, remember, everything in your project is stored in the project XML, AMS has a set of XML functions..... use them!

    Build a tool to add your keywords, recurs the project xml and extract all the object names and add them to each pages keyword section in one foul swoop before you compile your final app.

    Where's all of the 'Out-Of-The-Box' thinking gone guys!

  15. #15
    Join Date
    Sep 2010
    Posts
    8
    Hi Tone, thanks for the reply.
    However, I need to create a kind of search engine to search for project internal pages within the same project .. I do not know, maybe by using application keywords .. I try to siege better. inputobject search through the project pages that are displayed in a listbox .. then click on the result in the listbox to open the page that interests me ..

    Kindly help me with step by step examples and explanations. if possible I want to avoid using xml, html or otherwise.

    Thanks a lot

+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast

Posting Permissions

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