Sign in to follow this  
Followers 0
brotherbbad

Newbie Question...

5 posts in this topic

Hi All,

Please forgive my ignorance, however... I've taken on a project that may be somewhat over my head, ok it is over my head. I can't seem to figure out how to read a dir (folder contents) and then display those contents in a combo drop down, (ie; chose file name from drop down). I'm using the example findfilefirstfile.au3 - that works great to a msgbox, but can't get it to work with drop down.

any help would be appreciated.

thx in advance.

brotherb

Share this post


Link to post
Share on other sites



Hey Valuater,

Not exactly what I had in mind.... BETTER!!! Thx a billion!

BBB

Share this post


Link to post
Share on other sites

Hi Again,

First off, thx tons for the help, new situation... the returned result displays full path (which is sometimes longer that the window size), not that big of a deal. I would like to truncate the path and dispaly just the file names or add a horizontal scrollbar (much like the vertical scrollbar = only visible when needed). Again I am somewhat new to the scripting scene and appreciate everyones help and advise.

Thx again!

Brotherb

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Something like....

$path = "C:\MyFolder\MooCow\Banana\OxinRules\file.txt"
$path = StringSplit($path,"\")
$filename = $path[$path[0]]
MsgBox(0,"File Name:",$filename)

And because I'm bored, as a function:

$path = "C:\MyFolder\MooCow\Banana\OxinRules\file.txt"
MsgBox(0,"File Name:",_GetFilename($path))

Func _GetFilename($path)
$path = StringSplit($path,"\")
Return $path[$path[0]]
EndFunc
Edited by Oxin8

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0