Jump to content

Newbie Question...


Recommended Posts

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

Link to comment
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

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...