coda
Junior Member
Posts: 65
|
Post by coda on Apr 28, 2021 11:03:14 GMT -5
I presume it may involve some API calls but does anyone know how to set the directory which a filedialog box will display immediately when opened?
|
|
|
Post by Walt Decker on Apr 28, 2021 11:16:58 GMT -5
filedialog "Open", DefaultDir$; "*.txt", fileName$
filedialog "Open", "c:\*.txt", fileName$
filedialog "Open", "c:\mybmp.bmp, fileName$
|
|
coda
Junior Member
Posts: 65
|
Post by coda on Apr 28, 2021 12:00:59 GMT -5
Wow! Much easier than I thought. I feel VERY silly for missing this. It is actually covered in the help files and although I read it twice before asking, I didn't see it... Thanks so much... *hangs head in shame*
|
|
|
Post by Walt Decker on Apr 28, 2021 13:14:05 GMT -5
I do that all the time.
To bad the help does not have a search feature.
|
|
|
Post by Brandon Parker on Apr 28, 2021 21:00:40 GMT -5
There are a couple of applications that were written a few years ago after Microsoft got rid of the Help system in response to a challenge on the old forum. I particularly enjoy Anatoly's version and it also has a search feature; I am sure he will repost the code if asked. {:0) Brandon Parker
|
|
|
Post by honkytonk on Apr 29, 2021 6:39:52 GMT -5
For fun: Put this code in a folder and run
NOMAINWIN mois$ = "Jan Fév Mar Avr Mai Jun Jui Aou Sep Oct Nov Déc" today$ = date$("mm/dd/yyyy") j = date$(today$) jsem$ = word$("Mar Mer Jeu x Ven Sam x Dim Lun",int((j/7-int(j/7))*10)+1) date$ = jsem$+" "+mid$(today$,4,2)+" "+word$(mois$, val(today$))+" "+left$(time$(),5)'right$(today$,4) jour$=jsem$+" "+mid$(today$,4,2)+" "+word$(mois$, val(today$)) do$="Mangeurs (créé ";jour$;")" result=mkdir(do$) fich$="Johnny Alex Anatholy Walt Gordon" fi$="We You Us All Why" for x=1 to 5 result=mkdir(do$;"\";word$(fich$,x)) next x n=5: dim info$(10,10) for x=1 to n for t=1 to n open do$;"\";word$(fich$,x);"\";word$(fi$,t);".txt" for output as #k print #k, "Hello ";word$(fich$,x) close #k next t next x WindowWidth=850: WindowHeight=300 UpperLeftX = 10: UpperLeftY = 20 GRAPHICBOX #h.gr, 5, 5, 835, 260 OPEN "Historique" FOR window_nf AS #h #h, "TRAPCLOSE [closehisto]" #h.gr, "down;fill darkgreen;color white;backcolor darkgreen" posx=10: posy=30: pofx=posx+100: pofy=posy files DefaultDir$+"\"+do$, "*.", info$() nbim$=info$(0,1):nbim=val(nbim$) for xa=1 to nbim a$=info$(xa, 1) filo$(xa)=a$ next xa dim fich$(50) for k=1 to 5 fina$=word$(filo$(k),1)+" "+word$(filo$(k),2) #h.gr, "place ";posx;" ";posy: #h.gr, "\ ";fina$ files DefaultDir$+"\"+do$+"\"+filo$(k), "*txt.", info$() nfi$=info$(0,0):nfi=val(nfi$) for xx=1 to nfi ab$=info$(xx, 0) p$=word$(ab$,3) for x=1 to len(ab$) if mid$(ab$,x,1)="." then xp=x: exit for next x pa$=left$(ab$,xp-1) print "pa$: ";pa$'************* #h.gr, "place ";pofx;" ";pofy: #h.gr, "\ ";pa$ pofx=pofx+100 next xx posy=posy+30: pofx=120: pofy=pofy+30 next k #h.gr, "place 10 200": #h.gr, "\ FOLDERS": #h.gr, "place 120 200": #h.gr, "\ FILES----->" wait [closehisto] CLOSE #h end
|
|
|
Post by tsh73 on Apr 29, 2021 13:09:05 GMT -5
Brandon, I vaguely remember doing something on this, but I pretty sure my entry was not so advanced. (was not able to find it so far)
|
|
|
Post by Brandon Parker on Apr 29, 2021 17:38:51 GMT -5
Hmmmm....
I could have sworn that was yours. Was it Rod?
I have a TKN file in my most commonly used repository, but not the BAS file. I will search for the BAS file tonight; maybe it will have the author's name in it.
{:0)
Brandon Parker
|
|
|
Post by metro on Apr 29, 2021 19:01:32 GMT -5
Hmmmm.... I could have sworn that was yours. Was it Rod? I have a TKN file in my most commonly used repository, but not the BAS file. I will search for the BAS file tonight; maybe it will have the author's name in it. {:0) Brandon Parker I have code from 4 authors, 2 work straight out of the box 2 need tweaking , maybe of help to someone
|
|
|
Post by metro on Apr 29, 2021 22:14:19 GMT -5
|
|
|
Post by Rod on Apr 30, 2021 4:06:37 GMT -5
Not mine. I never completed my entry. I was trying to be too ambitious and was coding an editor that had context sensitive help on the side. It still languishes in my incomplete projects folder. The editor was the hard bit.
|
|
|
Post by Walt Decker on Apr 30, 2021 15:46:17 GMT -5
I wrote an editor and object sensitive help for LB about 20 years ago. It was not in LB. I doubt I have it now; it is woefully out of date anyway.
|
|
|
Post by Brandon Parker on May 1, 2021 10:18:02 GMT -5
Yeah, I was pretty sure it is Anatoly's. I have not gotten a chance to check my other storage devices for the source code yet.
{:0)
Brandon Parker
|
|