Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Posts
    1

    Minimizing / hiding other windows outside of AMS

    I am testing AMS to manage some windows. For example, I want it to hide notepad on the click of a button and when I click it again to unhide it in a specific location. Please forgive me but I have read through the posts and I cant find much detail on how to do this. Also, I am not much of a programmer so that is why I am using ams due to its simplicity in other things.

    Thanks in advance for the help

  2. #2
    Join Date
    May 2000
    Location
    Indigo Rose Software
    Posts
    2,150
    You can minimize Notepad using the following code:

    Code:
    -- Get the titles and window handles of all open windows.
    windows = Window.EnumerateTitles();
    
    -- A variable containing text in the title you want to search for.
    window_name = "Notepad";
    
    -- Loop through the table of windows.
    for handle, title in windows do
    
        -- Check if the window title has the target text.
        result = String.Find(title, window_name, 1, false);
    
        -- if the string was found in the title, send the window a close message.
        if (result ~= -1) then
           Window.Minimize(handle);
        end
    end
    And then to restore

    Code:
    -- Get the titles and window handles of all open windows.
    windows = Window.EnumerateTitles();
    
    -- A variable containing text in the title you want to search for.
    window_name = "Notepad";
    
    -- Loop through the table of windows.
    for handle, title in windows do
    
        -- Check if the window title has the target text.
        result = String.Find(title, window_name, 1, false);
    
        -- if the string was found in the title, send the window a close message.
        if (result ~= -1) then
               Window.Restore(handle);
        end
    end
    Adam Kapilik

  3. #3
    Join Date
    Feb 2004
    Location
    Cowfields of Germany
    Posts
    617
    how could i send a command like Enter to that window? would it be like this
    Code:
    -- Get the titles and window handles of all open windows.
    windows = Window.EnumerateTitles();
    
    -- A variable containing text in the title you want to search for.
    window_name = "Notepad";
    
    -- Loop through the table of windows.
    for handle, title in windows do
    
        -- Check if the window title has the target text.
        result = String.Find(title, window_name, 1, false);
    
        -- if the string was found in the title, send the window a close message.
        if (result ~= -1) then
           Window.Enter(handle);
        end
    end

Similar Threads

  1. New Windows Fonts not available in AMS?
    By StealthFD in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 06-18-2004, 02:50 PM
  2. INFO: JET and MDAC (Complete) Runtime Notes
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 11-28-2003, 08:35 AM
  3. INFO: Setup Factory and the Windows Installer
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-22-2002, 10:38 AM
  4. HOWTO: Install Files to the Windows Directory
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 09-18-2002, 02:33 PM
  5. How can AMS uninstall a program in Windows
    By ph4824 in forum AutoPlay Menu Studio 3.0
    Replies: 2
    Last Post: 07-31-2001, 01:08 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