SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Dec 2002
    Posts
    98
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Invoking an application

    I have an app where I get a MessageBox before the application opens.

    I wrote an invoke routine in my main app window which looks like this.

    But for some reason (I propably am doing soemthing wrong) when I try to start the app, it executes App.Start line and brings up the MessageBox then never goes to 'if NTGroupDlgBox.Exists(1)' line and then goes back to Invoke method again and tries the start the application once more and brings up the 2nd NTGroupDlgBox messagebox and then dies.

    In my testcase all I am trying to do is start the application as follows,
    My NTGroupDlgBox looks like this,
    I am puzzled. I am not sure why this code is trying to start the application twice and not able to clik on the Messagebox.

    Please note the slight difference between the tag of the main app window and the messagebox window.

    Any help will be much appreciated.

    Thanks in advance.

    ------------------
    DJ



    [This message has been edited by djava (edited 04-03-2003).]
    DJ

  2. #2
    Member
    Join Date
    Dec 2002
    Posts
    98
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Invoking an application

    Thanks for your reply.

    I have following files in a directory structure that we need in place.

    *include.inc - has following lines
    *windowdec.inc - has the window declarations mentioned in my original post.

    *app.pln - has following lines,
    *apptestcases.t - has following lines
    In the Options -> Runtime - Use Files, I have
    <path>\Include.inc.

    My result file looks like this.

    I have tried removing the invoke. I still get 2 messageboxes. If I don't need to write the code for 'Invoke' routine, where can I handle the messageboxes since they come even before opening the application?

    I appreciate your help.

    Thanks

    ------------------
    DJ

    [This message has been edited by djava (edited 04-03-2003).]

    [This message has been edited by djava (edited 04-03-2003).]
    DJ

  3. #3
    Junior Member
    Join Date
    Jul 2001
    Location
    Roseville, CA USA
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Invoking an application

    Hi,

    I have found the same thing.
    The Start method is waiting for the MainWin application that Invoke was called on to appear before it exits as a success. If it doesn't find it, an error is logged and Start () is called again.

    To avoid this, (reason may be that you know that a window (DialogBox) will appear before the MainWin, you can call Start () in a do...except block. In the do block put in the call to MainWin.Start (sCmdLine, sDir, sExtensionReady, nInvokeTimeout)
    set the sExtensionReady param to "~ExtensionReady" . This will make Silk not wait longer than the timeout, which you can set in nInvokeTimeout. See the on-line help for Start () for more information.
    In the except block, put in the window that you expect to see. So when the error is thrown that MainWin blah-blah did not appear, it will go to the except block where you can handle the window that actually appeared.

    I hope that helps.

    Elizabeth



    ------------------

  4. #4
    Member
    Join Date
    Dec 2002
    Posts
    98
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Invoking an application

    You are right. do...except worked.

    Thank you very much to all who replied.



    ------------------
    DJ
    DJ

  5. #5
    Senior Member
    Join Date
    Aug 2000
    Posts
    192
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Invoking an application

    you shouldn't need to write your own invoke routine if you set up the frame for your application correctly.

    The default base state will automatically bring up your application.

    perhaps if you share some more details i could try to help you so more

    ------------------

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:29 AM.

Copyright BetaSoft Inc.