SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Oct 2007
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Start and pause option


    I am working on rational visual test 6.5 version. And i am creating one GUI using this. I have a requirement like Start running .mst files one by one (which i will give/specify in the dialog box) and then stop in the middle when user want to pause the execution.

    2. I want to log the result's which i had executed in particular location specified by user or in currdir. for this i need browse option. Can any body tell me how to get the browse button.

  2. #2
    Member
    Join Date
    Aug 2005
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Start and pause option

    Hi,

    1: In order to implement a "pause" button you're going to want to use the On...Call statement. For example we use

    <font class="small">Code:</font><hr /><pre>ON KeyPress("X", FCONTROL) CALL Stop_Script
    </pre><hr />
    in our VT programs. This causes our Stop_Script function to be called whenever the user presses ctrl-X. You can have it call whatever function you write to meet your needs.

    2. I'm not sure I understand your question, but it sounds like you are wanting to invoke the standard windows SHBrowseForFolder dialog when the use clicks a button in a complex dialog created with VT. Is that right? If so, use this:

    <font class="small">Code:</font><hr /><pre>'=========================================== =================
    ' BROWSEINFO (SHBrowseForFolder) Constants
    '================================================= ===========
    Const BIF_RETURNONLYFSDIRS = 1 'Only return file system directories
    Const BIF_DONTGOBELOWDOMAIN = 2 'Don't include folders below domain level in tree view
    Const BIF_BIFSTATUSTEXT = 4 'Include status area in the dialog box.
    Const BIF_RETURNFSANCESTORS = 8 'Only return file system ancestors
    Const BIF_BROWSEFORCOMPUTER = 4096 'Only return computers
    Const BIF_BROWSEFORPRINTER = 8192 'Only return printers
    Const BIF_BROWSEINCLUDEFILES = 16384 'Include files as well as folders

    const MAXPATH = 255
    const NUL = CHR$(0)

    '================================================= ===========
    'Type variables used with the SHBrowseForFolder and SHGetPathFromIDList functions.
    '================================================= ===========

    Type ****EMID
    cb as short
    abUD as short
    End Type

    Type ITEMIDLIST
    mkid as ****EMID
    End Type

    Type BROWSEINFO
    hwndOwner as long
    pidlRoot as long 'set to null or type ITEMIDLIST
    pszDisplayName as pointer to string * 1
    lpszTitle as pointer to string *1 'must be null terminated
    ulFlags as long
    lpfn as long 'set to null or this gets nasty
    lParam as long
    iImage as integer
    end type



    'Prototype the SHBrowseForFolder function from the shell32.dll file.
    declare function SHBrowseForFolder lib "shell32.dll" alias "SHBrowseForFolder" (lp as BROWSEINFO) as LONG
    'Prototype the SHGetPathFromIDList function from the shell32.dll file. This
    'function is used to return the path that SHBrowseForFolder gets. Returns
    'Nul (Chr$(0)) if the cancel button is selected.
    declare function SHGetPathFromIDList lib "shell32.dll" alias "SHGetPathFromIDList" (lp as long, lpstr as pointer to string) as long
    declare function BrowseForFolder as string

    '************************************************* ************************
    ' Function BrowseForFolder as string
    '
    ' Clint Vieira
    ' 3170 Camellia Ct. #B
    ' San Luis Obispo Ca. 93401
    ' Hacksaw@genesiscom.com
    '
    ' Description: Displays the BrowseForFolder dialog.and allows the user to
    ' make a selection.
    '
    ' Parameters: None
    '
    ' Dependencies: SHBrowseForFolder function from shell32.dll
    ' SHGetPathFromIDList function from shell32.dll
    '
    ' Returns: Path to folder selected or Nul if cancel button is pressed.
    '
    ' Last Updated: 11-18-98
    '
    ' TODO:
    '
    '************************************************* ************************
    Function BrowseForFolder as string

    DIM pidl as LONG
    DIM strbuffer as string * MAXPATH
    strbuffer = space$(254) + NUL
    DIM strrefbuffer as String
    strrefbuffer = strbuffer

    dim strDisplayName as string * MAXPATH
    dim strTitle as string * 40
    strTitle = "Select a directory." + NUL

    'Setup the structure
    dim Bffdn as BROWSEINFO

    Bffdn.hwndOwner = wGetActWnd(0)
    Bffdn.pidlRoot = null
    Bffdn.pszDisplayName = cptr(varptr(strDisplayName))
    Bffdn.lpszTitle = cptr(varptr(strTitle))
    Bffdn.ulFlags = BIF_RETURNONLYFSDIRS
    Bffdn.lpfn = null
    Bffdn.lParam = 0

    pidl = SHBrowseForFolder(Bffdn)
    SHGetPathFromIDList (pidl, cptr(varptr(strbuffer)))

    If pidl &lt;&gt; NULL then
    BrowseForFolder = strbuffer
    Else
    BrowseForFolder = NUL
    End if

    end function 'End of BrowseForFolder function </pre><hr />
    --- Hacksaw

  3. #3
    Junior Member
    Join Date
    Oct 2007
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Start and pause option *DELETED*

    Post deleted by MPC2010

  4. #4
    Junior Member
    Join Date
    Oct 2007
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Start and pause option

    [ QUOTE ]
    Hi
    thanks for ur replay
    Ur saying about the On call function for this we need to specify an key that user will use that key. that thing ok

    But i want to do is I have one dialog box which contain's Start,Stop,Pause. When i clicked on Start i want to start the script and when i clicked on pause i want the pause the script and script status remain's where the script paused and resume from their when release the pause button. and when i clicked stop button i want to stop the execution.


    For starting we have "Startscript" funtion
    For stopping we have "terminatescript" function
    But i didn't found ant pausing options here.




    One more thing is i am facing difficulties to link above function's to particular button's. because we need to kept the dialog box active entire the execution of the script. but when i pressed Ok dialog box closing.

    I had tried with dialog box procedure's but what problem is i not able to send the hwnd of particular button to Dlgproc.
    How to send this.



    [/ QUOTE ]

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 04:12 AM.

Copyright BetaSoft Inc.