Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2007
    Posts
    160

    Grin OnTimer Question

    I have several things that I search for (Registry entries, files, etc.) as a prerequisite for enabling a button to install our software, let's say. If something is missing, I go to a requirements page, which shows what is missing. I also have the searches in an OnTimer script, which will refresh the requirements page once a requirement has been installed (registry entry, file, etc. now found so the requirements page indicates this is now OK).

    All works fine, but I saw a small glitch, if you want to call it that, when running this on a 64-bit system. I don't know if being 64-bit has anything to do with it, but as the requirements page of my browser is displayed, and the OnTimer events are running/searching, I see a small command window, minimized on the taskbar, flashing.

    What happens then is that, when trying to install a requirement, the focus seems to switch quickly between my requirement install and the minimized flashing command window. So, as a result, you have to quickly click several times to get desired button click responses on the process that should really have focus (installation of a requirement).

    Has anyone else seen this? I haven't seen or noticed this behavior on any other systems and haven't heard about it from QA at all.

    Any info is appreciated!


  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    What are you executing within the On Timer event that opens that command window?

  3. #3
    Join Date
    Mar 2006
    Posts
    61
    Little of topic here.

    But the OnTimer event of AMS6 is actually, in my opinion, a waste of an event because it doesn't even act like a normal timer event as seen in other languages.

    I understand that Lua is not a multi thread-able language, just coroutines which aren't threaded anyway. Anyway, the OnTimer event is only good if you need to start a piece of code in a delay. A good thing would be to have the OnTimer event a separate thread so that the code can run along side every thing else and not be slowed due to having to wait for the next coroutine.yield.

    Back on topic:
    If you call anything with the File.Run or Shell.Execute function in AMS6 it will temporarily open a command window as the command is executed.

    I haven't personally seen the type of behavior you are talking about with any other function call. As Worm says, what are you executing in the OnTimer Event?

  4. #4
    Join Date
    Jan 2007
    Posts
    160
    Here's my OnTimer script for my prerequisites page:

    --added to check if install button can be enabled to proceed
    allok = 1

    if Registry.DoesKeyExist(HKEY_CURRENT_USER, "Software\\Synergis\\Adept7.0\\DOMAINS") then
    --Label.SetVisible("AdeptOK", true);
    Image.SetVisible("AdeptCheck", true);
    --Label.SetVisible("AdeptNeeded", false);
    Image.SetVisible("AdeptX", false);
    else
    allok = 0
    end

    result = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\InetStp", "MajorVersion", true);
    if result == "5" or result == "6" or result == "7" then
    --Label.SetVisible("IISOK", true);
    Image.SetVisible("IISCheck", true);
    --Label.SetVisible("IISNeeded", false);
    Image.SetVisible("IISX", false);
    Button.SetEnabled("IISButton", false);
    else
    allok = 0
    end

    if Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\.NETFramework\\policy\\v2.0" ) then
    --Label.SetVisible("NETOK", true);
    Image.SetVisible("NETCheck", true);
    --Label.SetVisible("NETNeeded", false);
    Image.SetVisible("NETX", false);
    Button.SetEnabled("NETButton", false);
    else
    allok = 0
    end

    --Changed Java Runtime test as it seems uninstall was not removing test key. If previously installed
    --then removed, requirement may not be evaluated properly
    --if Registry.DoesKeyExist(HKEY_CURRENT_USER, "Software\\JavaSoft\\Java Runtime Environment") then
    ----Label.SetVisible("JavaOK", true);
    --Image.SetVisible("JavaCheck", true);
    --Label.SetEnabled("JavaDownload", false);
    --Label.SetText("JavaDownload", "No Download Needed!");
    ----Label.SetVisible("JavaNeeded", false);
    --Image.SetVisible("JavaX", false);
    --else
    --allok = 0
    --end

    File.Run("java", "-fullversion", "", SW_MINIMIZE, false);
    err = Application.GetLastError();
    if err > 0 then
    -- no java
    allok = 0
    else
    Image.SetVisible("JavaCheck", true);
    Label.SetEnabled("JavaDownload", false);
    Label.SetText("JavaDownload", "No Download Needed!");
    Image.SetVisible("JavaX", false);
    end

    if allok == 1 then
    Label.SetVisible("BackLabel", false);
    Button.SetEnabled("BackButton", false);
    Button.SetVisible("BackButton", false);
    Label.SetVisible("InstallLabel", true);
    Button.SetEnabled("InstallButton", true);
    Button.SetVisible("InstallButton", true);
    end

    This will run and here is what can be executed if any requirements are lacking....

    If the Java Runtime is lacking, there is a quick link to http://www.java.com/en/download/index.jsp where they can download and install the runtime. I don't know that the behavior is exhibited here.

    If IIS is lacking, there is a button scripted with
    File.Run("control", "appwiz.cpl,,2", "")

    If .NET Framework is lacking, there is a button scripted with result = File.Run("AutoPlay\\dotnetfx.exe", "", "", SW_SHOWNORMAL, true);

    I guess I may have to update my Prerequisites page in real time in some other way. Maybe I'll have to do away with the OnTimer scripted stuff and possibly update the page (change an image from a red X to a green OK when the install of the item is finished and the search completes successfully) when the individual install items finish successfully.

    Any suggestions welcomed!!

  5. #5
    Join Date
    Jan 2007
    Posts
    160
    This helped...

    I increased the timer form (100) to (10000). This way the OnTimer checks only run every 10 seconds, which works fine for our useage. This virtually eliminates the problem. That was simple!!


Similar Threads

  1. Math.RandomSeed() question
    By stickck in forum AutoPlay Media Studio 6.0
    Replies: 8
    Last Post: 06-09-2006, 09:42 AM
  2. Kiosk Mode Window Manipulation Question
    By travisperkins in forum AutoPlay Media Studio 6.0
    Replies: 13
    Last Post: 03-06-2006, 07:40 AM
  3. Random question
    By tzkennedy in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 04-09-2005, 12:08 AM
  4. Question on VB and AMS5
    By Martin_SBT in forum AutoPlay Media Studio 5.0
    Replies: 1
    Last Post: 12-11-2003, 08:22 AM
  5. question about sound mp3
    By Rapido78840 in forum AutoPlay Media Studio 4.0
    Replies: 4
    Last Post: 10-10-2003, 11:19 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