text?

Just starting out? Need help? Post your questions and find answers here.
spioner
User
User
Posts: 25
Joined: Tue Nov 07, 2006 8:02 am
Location: russia

=

Post by spioner »

del
Last edited by spioner on Wed Dec 21, 2011 5:33 pm, edited 1 time in total.
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

is this what you are looking for?

Code: Select all

file.s = OpenFileRequester("Select File", "", "Text Files|*.txt", 0)
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
User avatar
unhappy
User
User
Posts: 19
Joined: Sat Dec 10, 2005 6:58 am
Location: Prague, Czech Republic

Post by unhappy »

spioner
Well.
Task: get short file names (MS-DOS) from long names (windows);
Right?
But: are u sure what for compleating this task you need PureBasic? May be you do it with cmd.exe or WSH?
And also i dont understand - what target of this operation?

may be you press WIN+R, type CMD.EXE and type there

Code: Select all

DIR /?
or, if you dont want to read help, you may type

Code: Select all

DIR c:\docume~1 /S /X
.
I think, what it give you some happy seconds )
Last edited by unhappy on Fri Nov 10, 2006 3:06 pm, edited 7 times in total.
--- no signal
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

(if people have trouble reading unhappy's post, change the page encoding to Cyrillic (windows))

EDIT: or unicode (utf-8 )..... it changed after the edit for some reason.....

i bet u use internet explorer dont u unhappy?
Last edited by lexvictory on Fri Nov 10, 2006 2:48 pm, edited 2 times in total.
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
spioner
User
User
Posts: 25
Joined: Tue Nov 07, 2006 8:02 am
Location: russia

del

Post by spioner »

del
Last edited by spioner on Wed Dec 21, 2011 5:34 pm, edited 1 time in total.
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

like this?

Code: Select all

Result$ = GetPathPart(OpenFileRequester("Select File", "", "Text Files|*.txt", 0))
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: =

Post by PB »

> Name - known. File exist - known. Path - unknown. Task - get path.

See my old tip here: http://www.purebasic.fr/english/viewtopic.php?t=3659
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
unhappy
User
User
Posts: 19
Joined: Sat Dec 10, 2005 6:58 am
Location: Prague, Czech Republic

Post by unhappy »

lexvictory wrote:(if people have trouble reading unhappy's post, change the page encoding to Cyrillic (windows))

EDIT: or unicode (utf-8 )..... it changed after the edit for some reason.....

i bet u use internet explorer dont u unhappy?
yes. i use IE.
what codepage you recommend for me?
--- no signal
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

unhappy wrote:
lexvictory wrote:(if people have trouble reading unhappy's post, change the page encoding to Cyrillic (windows))

EDIT: or unicode (utf-8 )..... it changed after the edit for some reason.....

i bet u use internet explorer dont u unhappy?
yes. i use IE.
what codepage you recommend for me?
well, i think firefox rules! :lol:
its just IE doesnt handle other languages very well sometimes..... (especially not when typing in Kirilica/Cyrillic)

with firefox, when u type in Cyrillic, it converts it to special html codes.....
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
spioner
User
User
Posts: 25
Joined: Tue Nov 07, 2006 8:02 am
Location: russia

del

Post by spioner »

del
Last edited by spioner on Wed Dec 21, 2011 5:34 pm, edited 1 time in total.
User avatar
unhappy
User
User
Posts: 19
Joined: Sat Dec 10, 2005 6:58 am
Location: Prague, Czech Republic

Post by unhappy »

lexvictory wrote:with firefox, when u type in Cyrillic, it converts it to special html codes.....
i dont like firefox. its so complex for me. i like Maxthon - its very handy.
i rewrote my previous message in english (sorry for its roughness).
--- no signal
spioner
User
User
Posts: 25
Joined: Tue Nov 07, 2006 8:02 am
Location: russia

Re: =

Post by spioner »

del.
Last edited by spioner on Wed Dec 21, 2011 5:34 pm, edited 1 time in total.
User avatar
unhappy
User
User
Posts: 19
Joined: Sat Dec 10, 2005 6:58 am
Location: Prague, Czech Republic

Re: Result$ = GetPathPart(OpenFileRequester("Select Fil

Post by unhappy »

spioner wrote:Result$ = GetPathPart(OpenFileRequester("Select File", "", "Text Files|*.txt", 0))
This persons seek... I want Computer itself seek.
what you think about this: http://www.purebasic.fr/english/viewtop ... 025#170025 ?
i think you may parse file received by this way.
--- no signal
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: =

Post by PB »

> Do not work

Yes it does. Are you using the full version of PureBasic, or the demo? Try this:

Code: Select all

path$=Space(999) : r=SearchTreeForFile_("c:\","iexplore.exe",path$)

If r=0
  MessageRequester("Error","File not found...",0)
Else
  MessageRequester("Location",GetPathPart(path$),0)
EndIf
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
spioner
User
User
Posts: 25
Joined: Tue Nov 07, 2006 8:02 am
Location: russia

del

Post by spioner »

del
Last edited by spioner on Wed Dec 21, 2011 5:35 pm, edited 1 time in total.
Post Reply