Jump to content

Recommended Posts

Posted

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 ?

Posted

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.

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...