Sign in to follow this  
Followers 0
roadrunner

notepad trouble

3 posts in this topic

Hi here a simple problem to someone who knows.

when i run these two lines why is it that notepad can't fine the file ?

notepad can't find the path specified

; the variable $installdrive is the drive letter ie c:

$varwin = @WindowsDir

Run($varwin & "\Notepad.exe $installdrive & \Program Files\Webroot\Spy Sweeper\readme.txt ","", @SW_MAXIMIZE)

any idears ?

Share this post


Link to post
Share on other sites



Your installdrive variable is inside the string, it should be something like

Run($varwin & "\Notepad.exe " & $installdrive & "\Program Files\Webroot\Spy Sweeper\readme.txt ","", @SW_MAXIMIZE)


I have a catapult. Give me all the money or I will fling an enormous rock at your head.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

remember, strings are in quotes, variables and @macros are not, concatinate with &

Good:

$variable

"Quote"

"c:\mydrive"

@Mday

@crlf

$variable & "Quote" & "c:\mydrive" & @Mday & @crlf

Not so good

"$variable & Quote" & "@Mday c:\mydrive"

c:\mydrive & "$variable @Mday"

ExpandEnvStrings and ExpandVarStrings options change the rules a bit, but get in the habit of doing it the normal way.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

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