Page 3 of 7
Re: HMG Easy Build
Posted: Sat Sep 06, 2014 2:51 pm
by esgici
Hi Claudio
Wonderful
This isn't only "builder" but a File Manager
bpd2000 wrote:I suggest to open last visited directory / location by "HMG Easy Build"
+1
My two cent :
Code: Select all
*-----------------------------------------------------------------------------*
PROCEDURE Grid1OnChange()
*-----------------------------------------------------------------------------*
LOCAL cFileName := aFiles [This.CellRowFocused, 5 ]
LOCAL cFileExtn := UPPER( SUBSTR( cFileName, RAT( ".", cFileName ) + 1 ) )
Form_1.StatusBar.Item(1) := cFileName
Form_1.Button_6.Enabled := cFileExtn $ "HBPPRG"
RETURN // Grid1OnChange()
Re: HMG Easy Build
Posted: Sat Sep 06, 2014 8:49 pm
by danielmaximiliano
esgici wrote:
My two cent :
Geniooooo !!!!

Re: HMG Easy Build
Posted: Sat Sep 06, 2014 8:51 pm
by srvet_claudio
esgici wrote:My two cent :
Code:
ON CHANGE Grid1OnChange() ;
Code:
*-----------------------------------------------------------------------------*
PROCEDURE Grid1OnChange()
*-----------------------------------------------------------------------------*
LOCAL cFileName := aFiles [This.CellRowFocused, 5 ]
LOCAL cFileExtn := UPPER( SUBSTR( cFileName, RAT( ".", cFileName ) + 1 ) )
Form_1.StatusBar.Item(1) := cFileName
Form_1.Button_6.Enabled := cFileExtn $ "HBPPRG"
RETURN // Grid1OnChange()
Very nice Friend !
Re: HMG Easy Build
Posted: Sat Sep 06, 2014 8:55 pm
by srvet_claudio
Re: HMG Easy Build
Posted: Sat Sep 06, 2014 9:14 pm
by esgici
Congrats amigo !
I wish you thousands 1000 posts
Because you are continuously working for HMG community and all your works are always extremely useful and educative for us
Happy HMG'ing

Re: HMG Easy Build
Posted: Sat Sep 06, 2014 9:20 pm
by esgici
danielmaximiliano wrote:Geniooooo !!!!

srvet_claudio wrote:
Very nice Friend !
Gracias amigos
But
isn't good
instead
Code: Select all
( cFileExtn == "HBP") .OR. ( cFileExtn == "PRG")
is better.
Happy HMG'ing

Re: HMG Easy Build
Posted: Sat Sep 06, 2014 9:29 pm
by pctoledo
esgici wrote: Form_1.StatusBar.Item(1) := cFileName
With that my search function will not work properly then follows a small change:
Code: Select all
****************************************************
PROCEDURE SEARCH_OPEN()
*********************************************************
LOCAL Key_Search, Url_Search := URL_FORUM
LOCAL cPath := UPPER(Form_1.Tree_1.Cargo (Form_1.Tree_1.Value))+"\", cPath_
IF UPPER(cFolderHMG+"\SAMPLES\") $ cPath
cPath := StrTran(cPath,UPPER(cFolderHMG)+"\SAMPLES\","")
IF !EMPTY(cPath)
Key_Search := ""
DO WHILE AT("\",cPath)>0
cPath_ := LEFT(cPath,AT("\",cPath)-1)
IF !(cPath_ $ [ADVANCED|APPLICATIONS|BASICS|CONTROLS|EVENTS|FUNCTIONS|HFCL|HPDF|MISCELLANEOUS|UNICODE])
IF IsDigit(RIGHT(cPath_,1))
cPath_:=LEFT(cPath_,RAT("_",cPath_)-1)
ENDIF
IF !(cPath_ $ Key_Search)
Key_Search += "+"+cPath_
ENDIF
ENDIF
cPath := SUBS(cPath,AT("\",cPath)+1)
ENDDO
IF !EMPTY(Key_Search)
Url_Search := URL_FORUM + "/search.php?keywords="+Key_Search+"&ch=300"
ENDIF
ENDIF
ENDIF
URL_OPEN ( Url_Search )
RETURN
Re: HMG Easy Build
Posted: Sat Sep 06, 2014 9:39 pm
by esgici
pctoledo wrote:
With that my search function will not work properly then follows a small change:
Thanks Toledo

Re: HMG Easy Build
Posted: Sat Sep 06, 2014 10:20 pm
by srvet_claudio
esgici wrote:
Congrats amigo !
I wish you thousands 1000 posts
Because you are continuously working for HMG community and all your works are always extremely useful and educative for us
Happy HMG'ing

Thank you very much Friend, as always you're very kind

Re: HMG Easy Build
Posted: Sat Sep 06, 2014 10:26 pm
by srvet_claudio
Esgici and Toledo:
I adapted the functions of you and works Ok for me.
Code: Select all
*-----------------------------------------------------------------------------*
PROCEDURE Grid1OnChange()
*-----------------------------------------------------------------------------*
LOCAL cFullName := aFiles [This.CellRowFocused, 5 ]
LOCAL cExt
HB_FNameSplit (cFullName, NIL, NIL, @cExt, NIL)
Form_1.StatusBar.Item(1) := cFullName
Form_1.Button_6.Enabled := HMG_UPPER(cExt) $ ".HBP|.PRG"
RETURN
Code: Select all
***********************************************************************************
PROCEDURE SEARCH_OPEN()
***********************************************************************************
LOCAL Key_Search, Url_Search := URL_FORUM
LOCAL cPath := HMG_UPPER (Form_1.StatusBar.Item(1))+"\", cPath_
IF HMG_UPPER (cFolderHMG+"\SAMPLES\") $ cPath
cPath := STRTRAN (cPath,HMG_UPPER(cFolderHMG)+"\SAMPLES\","")
IF !EMPTY(cPath)
Key_Search := ""
DO WHILE HB_UTF8AT ("\",cPath)>0
cPath_ := HB_ULEFT(cPath,HB_UTF8AT("\",cPath)-1)
IF !(cPath_ $ [ADVANCED|APPLICATIONS|BASICS|CONTROLS|EVENTS|FUNCTIONS|HFCL|HPDF|MISCELLANEOUS|UNICODE])
IF HMG_ISDIGIT (HB_URIGHT(cPath_,1))
cPath_:= HB_ULEFT (cPath_,HB_UTF8RAT("_",cPath_)-1)
ENDIF
IF !(cPath_ $ Key_Search)
Key_Search = Key_Search + "+" +cPath_
ENDIF
ENDIF
cPath := HB_USUBSTR (cPath,HB_UTF8AT("\",cPath)+1)
ENDDO
IF !EMPTY(Key_Search)
Url_Search := URL_FORUM + "/search.php?keywords="+Key_Search+"&ch=300"
ENDIF
ENDIF
ENDIF
URL_OPEN ( Url_Search )
RETURN