Page 1 of 1

GETFILE : "pre-fill"

Posted: Mon Jan 25, 2021 1:44 am
by AUGE_OHR
hi,

using PUTFILE() i can pass Parameter Filename but not when using GETFILE()
this is a Workaound

Code: Select all

   // Store Filename to Clipboard 
   System.Clipboard := SP_LSTPLIST()
   // Start Thread
   hb_threadDetach( hb_threadStart( HB_THREAD_INHERIT_MEMVARS, @FindOpenWin(), cTitle ) )
   // start GETFILE
   cPlayJVD := Getfile( aFilters, cTitle, zPath, .F., .F., 1 )

Code: Select all

PROCEDURE FindOpenWin(cTitle)
LOCAL hWndDlg := 0, iMax := 10*3

   DO WHILE EMPTY(hWndDlg) .OR. !EMPTY(iMax)
      iMax --

      hWndDlg := FindWindowEx(,,, cTitle )
      IF !EMPTY( hWndDlg)
         // focus is on "edit" so we can paste from Clipboard
         HMG_PressKey( VK_CONTROL, VK_V )
         EXIT
      ENDIF

      DO EVENTS
      hb_idleSleep( 0.1 )
   ENDDO

RETURN