Jump to content
Sign in to follow this  
kaotkbliss

Run confusion

Recommended Posts

kaotkbliss

Where to start?

First, the program is in my sig and everything works fine. Except some programs/games seem to have a problem running properly with the Run() or ShellExecute() commands.

The program reads a shortcut in a text file in the format of "label=program path.exe"

it takes the program path.exe and assigns it to a variable, then Run($var).

Most programs run fine this way, but occassionally some programs start to run then the window pops up saying the program has errored and needs to close. (not an autoit window)

If I run the exe directly from the location, it works fine. If I create a shortcut on the desktop, it runs fine. If I add a shortcut to ListView in autoit and use the Run command the program errors and closes...

Is there a better way than Run or ShellExecute (I've used both with the same result) or perhaps an option or flag with either of those commands that would make it work?

It does not do it with most programs, just some of them.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
erik7426

Some things are picky about working directories. Have you tried specifying that in the run command?

Run($exe,$path)

Share this post


Link to post
Share on other sites
kaotkbliss

Thanks, it worked.

I had thought about the working dir for the program but since the only refrence was the full path saved in a txt and the fact that I suck with stringregexp still, I wasn't sure how to go about it since each program in the listview could be any number of sub directories into a drive.

Then I found _Pathsplit and was able to piece together the first 2 results of the array for a working dir.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.