Jump to content

Run function


Recommended Posts

Is there a way to abuse the run function to make it find a program without the path?

because what if i want my GUI to be downloadable, and within my GUI im going to have a check RUN another program (within my .rar file will be multiple scripts) but I assume it wont work because the path i'll set in it wont be the same path for everyone,

is there a way to make the run function find the program regardless?

or maybe another way to go about this?

Link to comment
Share on other sites

Is there a way to abuse the run function to make it find a program without the path?

because what if i want my GUI to be downloadable, and within my GUI im going to have a check RUN another program (within my .rar file will be multiple scripts) but I assume it wont work because the path i'll set in it wont be the same path for everyone,

is there a way to make the run function find the program regardless?

or maybe another way to go about this?

Abuse of AutoIt run function will not be tolerated in these forums, I have reported you to a moderator and your topic will be locked in a short while.

Just kidding, you can enter the program name however you like as long as it's valid.

Like @ScriptDir & "program.exe" is the same as ".program.exe".

I believe using the program name only "program.exe" will attempt to run the program from the current working directory, windows directory and system directory...

Edited by THAT1ANONYMOUSDUDE
Link to comment
Share on other sites

Would it be something like this?

Run ( "ControlCenter" , "@ScriptDir") or Run ( "ControlCenter" , @ScriptDir)

more like the second one, the @ScriptDir string is a little group of characters that the autoit script interpreter will convert into the current script directory, if you enclose it in quotes, it will not be converted into... you know what I mean right?

Link to comment
Share on other sites

yeah I do, thank you both for your help. Still trying to get ahold of some autoit things and its quiet fun but also confusing at times when one answer to something confusing is just as confusing as the original problem lol.

So this should work?

Run ( "ControlCenter" , @ScriptDir)

Link to comment
Share on other sites

yeah I do, thank you both for your help. Still trying to get ahold of some autoit things and its quiet fun but also confusing at times when one answer to something confusing is just as confusing as the original problem lol.

So this should work?

Run ( "ControlCenter" , @ScriptDir)

try ShellExecute instead.

Also, that file you're trying to run is supposed to have .cpl at the end no?

If you keep asking these simple things instead of just trying it, you will get nowhere fast.

When writing the script, just hit [F5] to run it and see what happens.

It will give you a faster and more accurate answer than us.

I believe that using the run command is mainly intended for executing files that are, well, executable.

Edited by THAT1ANONYMOUSDUDE
Link to comment
Share on other sites

Yeah I hear ya, Got a lot going on today just got home not so long ago; trying to handle a grip of things so im just trying to soak up some information before im able to spend some time on this. Sorry if there simple and annoying questions just trying to understand the basics which you guys are surely helping me with,

Link to comment
Share on other sites

Yeah I hear ya, Got a lot going on today just got home not so long ago; trying to handle a grip of things so im just trying to soak up some information before im able to spend some time on this. Sorry if there simple and annoying questions just trying to understand the basics which you guys are surely helping me with,

Ah, you should see the questions and threads I would make when I was starting, no, wait, don't.

Anyway, here is a tip in case you were not aware.

When you find yourself staring down a function, not knowing enough information about it to continue confidently, click the function and hit [F1], if you did it right, the help file will magically pop up in front of your very eyes explaining to you (almost) every detail of the function, even giving you an example of how to use it.

Link to comment
Share on other sites

oo believe me ive created quiet the bit of things with autoit but mianly from basic knowledge and what not. I use the Help function A LOT but some times still fail to understand it, or theres times when I dont see things working the way they should (and when i try it it usually doesnt work) but i know the people on here usually got quiet the bit of experience so i figure it never hurts to ask.

But yeah im a huge fan of F1, F5, and Ctrl T ;)

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