Jump to content

arrary list help


pcjunki
 Share

Recommended Posts

I need help with an array, (I'm hoping this is the way to go if not please point me in the right direction)

I'm trying to make a script that will create pdfs from a random name word file.

I have a vbs script that creates the pdf, and it's command line driven so I'm good on that part

at any given time, there will only be 1 word file in c:folder

this is what I have so far

#include <File.au3>
 #include <Array.au3>

$file =  _FileListToArray ( "c:\folder" , "*.doc" )
$file2 = _ArrayDisplay ($file, "" , "1:1")


ShellExecute("c:\folder\doc2pdf.vbs" , $file )


;~ Sleep(4000)
;~ FileDelete $file


;~ ShellExecute("notepad" , "\\webserver\main_site\pages\index.htm")
Link to comment
Share on other sites

  • Moderators

kaisies,

Please note _FileListToArray is troublesome at time

Some examples please - otherwise how can we improve it. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

What exactly is troublesome about _FileListToArray?

 

kaisies,

Some examples please - otherwise how can we improve it. ;)

M23

 

That's what I've read on these forums, to the effect of that _FileListtoArray() uses the windows search function, and doesn't always return expected results.  I could very well be mistaken, just trying to help :)

Link to comment
Share on other sites

  • Moderators

kaisies,

The only time I can remember there being any discussion about this matter was in this thread - which discussed why there were differences between the returns from _FileListToArray & _FileListToArrayRec (read the topic to find out ;)). These differences only arise when using pretty complicated wildcard filters where the standard Windows search used by _FileListToArray can indeed return results which appear not to match - although in the vast majority of cases the return is as expected. I added something to the Remarks section of both of these functions explaining that the user had to make a choice between speed and accuracy if the required filters were that complex. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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...