GETFILE : "pre-fill"

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

GETFILE : "pre-fill"

Post 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
have fun
Jimmy
Post Reply