roadrunner Posted November 10, 2004 Posted November 10, 2004 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 ?
Mr.Wizard Posted November 10, 2004 Posted November 10, 2004 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.
scriptkitty Posted November 10, 2004 Posted November 10, 2004 (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 & @crlfNot 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 November 10, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers.
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