Sign in to follow this  
Followers 0
oompah

Run Frustration

8 posts in this topic

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

Share this post


Link to post
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)

Share this post


Link to post
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.)

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites

The ' in Karen's is terminating the string too early.

Share this post


Link to post
Share on other sites

The ' in Karen's is terminating the string too early.

Ah-ha. Tried Karen''s (two apostrophes), and it works. Thanks.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

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

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  
Followers 0