Jump to content

Run Frustration


Recommended Posts

I give up. How do you open this file in this program?

C:\Program Files\Karen's Replicator\Replicator-log.txt

C:\Program Files\Windows NT\Accessories\wordpad.exe

Tried maybe 15 variations with the Run command. All result in

Run(...Karen's Replicator^ERROR

Error: Unable to parse line

Link to comment
Share on other sites

Win 9x

run(@comspec & " /c start "C:\Program Files\Karen's Replicator\Replicator-log.txt","",@sw_hide)

Win2000

run(@comspec & " /c start "" "C:\Program Files\Karen's Replicator\Replicator-log.txt","",@sw_hide)

Link to comment
Share on other sites

Win 9x

run(@comspec & " /c start "C:\Program Files\Karen's Replicator\Replicator-log.txt","",@sw_hide)

Win2000

run(@comspec & " /c start "" "C:\Program Files\Karen's Replicator\Replicator-log.txt","",@sw_hide)

The question is, How do you open the file in wordpad.exe? (In WinXP.)
Link to comment
Share on other sites

$Parm = '"C:\Program Files\Karen's Replicator\Replicator-log.txt"'

$File = '"C:\Program Files\Windows NT\Accessories\wordpad.exe"'

Run($File & " " & $Parm)

Lar.

"Unable to parse line."

BTW, this works in AutoIt v2:

Run, "C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe" "C:\\Program Files\\Karen's Replicator\\Replicator-log.txt"

And this works in a Desktop shortcut:

"C:\Program Files\Windows NT\Accessories\wordpad.exe" "C:\Program Files\Karen's Replicator\Replicator-log.txt"
Link to comment
Share on other sites

If you let us see exactly what you have tried, it would help :D

The general solution would be along the lines of:

Run("""Editor Name.EXE"" ""Data File.txt""")

.. this would take care of embedded apostrophes

Link to comment
Share on other sites

If you let us see exactly what you have tried, it would helpĀ  :D

The general solution would be along the lines of:

Run("""Editor Name.EXE"" ""Data File.txt""")

.. this would take care of embedded apostrophes

Trids, this is working fine:

Run('C:\Program Files\Windows NT\Accessories\wordpad.exe "C:\Program Files\Karen''s Replicator\Replicator-log.txt"')

Thanks everyone.

Edit: Oh! I see what you've done now. Good.

Edited by oompah
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...