SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Jul 2000
    Location
    sanjose,ca,usa
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    opening notepad using SYS_EXECUTE

    Hi
    I have this code
    LIST OF STRING result
    SYS_EXECUTE("C:\cann\notepad", result)
    i beleive this should open a notepad for me but it is not,can anyone correct this basic code thanks
    srini


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

  2. #2
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: opening notepad using SYS_EXECUTE

    in a previous thread:


    3 ways:
    Way #1
    Declare the other application's main window. You can just record it as a DialogBox and switch it to MainWin, making sure you add the
    const sCmdLine = "commandline.exe"
    in the window declaration.
    This way you can start the app by saying (MainWindowIdentifier.Start ())
    Way #2
    MainWin("Caption of main window").Start("path and command line.exe")

    Way #3
    use 'bwcompat.inc'
    App_Start ("Command_line.exe")


    Don't try SYS_Execute () - It was designed originally for UNIX platforms.


    PS, Do a search before you ask. in over 10,000 posts, your question is most likely answered if not once, many times

    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

  3. #3
    Member
    Join Date
    Jul 2000
    Location
    sanjose,ca,usa
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: opening notepad using SYS_EXECUTE

    HI AJ
    Thanks,though it is a basic question i just want to correlate with other scenario what i am doing,i have posted two messages yesterday i am waiting replies for those
    Thank you very much
    sri

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

  4. #4
    Member
    Join Date
    Jul 2000
    Location
    sanjose,ca,usa
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: opening notepad using SYS_EXECUTE

    I have .inc file related to an application in swing(GUI),i am just using ExceptionHandlerED2000T.invoke ,i could not invoke it, is there any classpath i have to set,in real scenario this application is shown when i open command prompt and type "O:\DAF_NT\tools\nexphadle1" after 2 minutes this swing application(not in browser) is shown,i am confused how to go ahead

    [-] window MainWin ExceptionHandlerED2000T
    [ ] tag "[DialogBox]Exception Handler : ED2000T"
    [ ]
    [ ] // The working directory of the application when it is invoked
    [ ] const sDir = "O:\DAF_NT\tools"
    [ ]
    [ ] // The command line used to invoke the application
    [ ] const sCmdLine = "C:\jdk1.3.1\bin\java.exe -classpath .;O:\DAF_NT\shared\com\swingall.jar;O:\DAF_NT\shar ed\com\classes12.zip;O:\DAF_NT\ ExceptionHandler.ExceptionHandler"
    [ ]
    [ ] // The value of CLASSPATH when starting the Java Application
    [ ] const sClasspath = ".;C:\PROGRA~1\Segue\SilkTest\JavaEx\SilkTest_Java 2.jar;"
    [ ]
    [ ] // The first window to appear when the application is invoked
    [ ] // const wStartup = ?
    [ ]
    [ ] // The list of windows the recovery system is to leave open
    [ ] // const lwLeaveOpen = {?}


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

  5. #5
    Member
    Join Date
    Feb 2001
    Location
    New York, NY
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: opening notepad using SYS_EXECUTE

    int retval = SYS_Execute("start c:\test.bat" ,lsOutput)

    ------------------
    -Lev Aks
    lev_aks@in-nyc.com

  6. #6
    Member
    Join Date
    Oct 2001
    Posts
    93
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: opening notepad using SYS_EXECUTE

    Just to follow up on what AJ said.

    SYS_Execute will not work for starting an application before you test it as control is not passed back to the script until the process that is started by the SYS_execute fucntion has finished. This means that if you start your app this way, the script stops until the app is closed.

    Useful for running batch files, especially with the output parameter used.

    Paul

    ------------------
    Paul Tucker
    Merit AT
    www.merit-at.com

  7. #7
    Member
    Join Date
    Feb 2001
    Location
    New York, NY
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: opening notepad using SYS_EXECUTE

    Paul,
    Your comment is correct only if you do not use "start”. In the code example:

    int retval = SYS_Execute("start notepad.bat")

    the script will get control over the notepad or any application you wish to start. This method bypasses the Silk startup and recovery mechanism, but sometimes it is quicker to do it this way, especially if you never plan to do any unattended or overnight testing.



    ------------------
    -Lev Aks
    lev_aks@in-nyc.com

  8. #8
    Member
    Join Date
    Jul 2000
    Location
    sanjose,ca,usa
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: opening notepad using SYS_EXECUTE

    I have this senario
    1)Open command prompt and execute O:\DAF_NT\tools\ntexphdeler
    2)After 2 minutes I could see java swing application
    3)my test case needs after executing this statement how much time it took to display this swing application
    4).inc file is shown in the earlier mail above
    5)I used the following code and at stage *** my silk application get hanged after displaying swing application can anyone correct this code please

    [ ] STRING Totaltimetaken
    [ ] HTIMER Totaltimer
    [ ] Totaltimer=Timercreate()
    [ ] Timerstart(Totaltimer)

    SYS_Execute("start O:\DAF_NT\tools\ntexphdeler",ntexhandler)

    ***Upto this point command window is displayed and execute the procesess
    and then shown the swing application however it is hanged and
    never closed,
    [ ] if(ExceptionHandlerED2000T.exists())
    [ ] Timerstop(Totaltimer)
    [ ] Totaltimetaken=TimerStr(Totaltimer)
    [ ] Timerdestroy(Totaltimer)
    [ ] Print("The Total Time taken to open the window is: {Totaltimetaken} ")


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


    [This message has been edited by srireddi (edited 12-12-2001).]

 

 

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 02:27 AM.

Copyright BetaSoft Inc.