goss34 Posted April 23, 2010 Share Posted April 23, 2010 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 More sharing options...
veronesi Posted April 23, 2010 Share Posted April 23, 2010 Hi,try ShellExecute instead of Run!ShellExecute("C:\Program Files\This Software\This Software\RunMe.exe", "Client Javaw.exe Arg.umen.ts.System")RegardsVeronesi Link to comment Share on other sites More sharing options...
goss34 Posted April 23, 2010 Author Share Posted April 23, 2010 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 More sharing options...
zapperzme Posted May 29, 2010 Share Posted May 29, 2010 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.CheersDanFound 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 : " RemarksIf _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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now