Jump to content

Run a program with required arguments


Recommended Posts

Hi Guys,

I am hoping someone can point me to the fix here or at least the right direction.

I am trying to use the Run function to launch a program, i am hitting issues because of the file path and the fact the app requires arguments to be specified also to run properly.

Here is the properties of the shortcut i need to launch -

"C:\Program Files\Experian Payments\Experian Payments Gateway\RunClient.exe" Client Javaw.exe uk.co.eiger.epg.ui.MainFrame

So i am putting in -

Run("C:\Program Files\This Software\This Software\RunMe.exe" Client Javaw.exe Arg.umen.ts.System)

I didnt expect this to work but cant find anything in the help files to let me specify the arguments on the end of the application.

Can anyone help?

Cheers

Dan

Link to comment
Share on other sites

Thanks Veronesi,

That worked great, and ideas how i delete a line from a text file?

I have a script where you click a button and it writes some configuration info to a text file. It then runs an application using that info.

The same file is written to with another button but the problem is it just appends to the bottom of the existing text. I either need to clear the text file or delete the top 7 lines and then write the 7 lines again after the next button press.

Im using FileWriteLine, I have tried deleting using _FileWriteToLine but it leaves me a blank line at top after the button press and each press moves the configuration info further down the text file - it will grow forever if i leave it like that.

Any help appreciated.

Cheers

Dan

Link to comment
Share on other sites

  • 1 month later...

Thanks Veronesi,

That worked great, and ideas how i delete a line from a text file?

I have a script where you click a button and it writes some configuration info to a text file. It then runs an application using that info.

The same file is written to with another button but the problem is it just appends to the bottom of the existing text. I either need to clear the text file or delete the top 7 lines and then write the 7 lines again after the next button press.

Im using FileWriteLine, I have tried deleting using _FileWriteToLine but it leaves me a blank line at top after the button press and each press moves the configuration info further down the text file - it will grow forever if i leave it like that.

Any help appreciated.

Cheers

Dan

Found the solution yet dan?

Here's some help if you didn't.. So, first off

- Open SCITE (or your .au3);

- Press F1 (that's the AutoIt Help file-quite magic- also found on the Help button, Menu bar );

- Click on Search (3rd tab in the left panel);

- Write the following Function to Search for : _FileWriteToLine (I believe you actually tried working with this right?fun part is not over);

- And now, the solution, it says :

" Remarks

If _FileWriteToLine is called with $fOverWrite as 1 and $sText as "", it will delete the line. "

Yay, you got the line you wanted deleted, not a empty line to stack up. Good luck.

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