Jump to content

Recommended Posts

Posted

Good morning and happy Sunday!

For the last week I've been trying to figure out how to get AI to open all files in my startup folder beginning with "0", with some AI code I found, but it doesn't work.

I also tried the way I would figure out with my own code, but, like d'uh, no go either :blink::P:lol:.

Here's what I found that supposedly should work, as far as I can tell from the original message (though I forgot to reference the URL so can't cite it here), but I've probably bungled it somewhere as it doesn't work:

#include <file.au3>

Local $array = _FileListToArray(@ScriptDir & "\Startup\", "0*.*", 1)


For $i = 1 To $array[0]
    ShellExecute($array[$i])
Next

The funny thing is that it references every file that has that starts with a "0" that Windows couldn't find the file it lists in each error box and to try again <lol>, which I find funny.  It can't find each file, but it lists each file by name <lol>.

I'm wondering if it's because I'm using ShellExecute but without referencing the app to open each file, as the files are all different types - run 2 or 3 apps, open some images (a PNG and JPG, or two), and URLs ... (?)

Anyway, any help appreciated!

:)

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
  • Recently Browsing   0 members

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