Kaso Posted December 15, 2005 Share Posted December 15, 2005 FileInstall("C:\favorite.url", @FavoritesDir, 1) When I "Go" it installs the shortcut to the favorites directory. however when compling and running the exe it does not. I tried a txt file to install to see if it didn't like the .url file. But same result. Whats the explaination for it? Link to comment Share on other sites More sharing options...
Pakku Posted December 15, 2005 Share Posted December 15, 2005 it has to be: FileInstall("C:\favorite.url", @FavoritesDir & "favorite.url", 1) you forgot the "favorite.url" and to connect @FavoritesDir and "favorite.url" you need the & sign. you can just copy the one i made above, but i also like to explain why it has to be like that. suc6! How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
poisonkiller Posted December 15, 2005 Share Posted December 15, 2005 Mabye its wrong, but i think it has to be like this:FileInstall("C:\favorite.url", @FavoritesDir & "\favorite.url", 1) Link to comment Share on other sites More sharing options...
seandisanti Posted December 15, 2005 Share Posted December 15, 2005 Mabye its wrong, but i think it has to be like this:FileInstall("C:\favorite.url", @FavoritesDir & "\favorite.url", 1)That is correct, the macros that contain paths do not contain the backslash so it has to be concatenated in Link to comment Share on other sites More sharing options...
MHz Posted December 15, 2005 Share Posted December 15, 2005 FileInstall("C:\favorite.url", @FavoritesDir & "\", 1) The destination path with trailing backslash. Link to comment Share on other sites More sharing options...
seandisanti Posted December 15, 2005 Share Posted December 15, 2005 FileInstall("C:\favorite.url", @FavoritesDir & "\", 1) The destination path with trailing backslash.does it work with just the path and not the destination filename? i know the helpfile designates the second parameter as "The destination path with trailing backslash." but i've always used the filename too, just because of the example included for that function. I guess i could have just tested it, but i've already typed all of this up... Link to comment Share on other sites More sharing options...
MHz Posted December 15, 2005 Share Posted December 15, 2005 To my knowledge, I have never specified the filename. Works like a treat everytime. If you leave out the trailing backslash, then FileInstall fails. Link to comment Share on other sites More sharing options...
seandisanti Posted December 15, 2005 Share Posted December 15, 2005 To my knowledge, I have never specified the filename. Works like a treat everytime. If you leave out the trailing backslash, then FileInstall fails.neat, that'll save me 6-10 keystrokes per script... i'm waaaaay too lazy... Link to comment Share on other sites More sharing options...
Valuater Posted December 15, 2005 Share Posted December 15, 2005 I have always used a variable for my installs that way it can be used throught the script $Sound_lnk = @TempDir & "\Inst-lnk.wav" FileInstall("C:\Program Files\Radio\Notify.wav", $Sound_lnk) 8) Link to comment Share on other sites More sharing options...
Kaso Posted December 15, 2005 Author Share Posted December 15, 2005 wow soo many responses. I think this clears up alot for everyone. i will give those things a try. thanks Link to comment Share on other sites More sharing options...
Kaso Posted December 16, 2005 Author Share Posted December 16, 2005 (edited) I tried to compile the following FileInstall("c:\abc.url", @favoritesdir & "\", 1) and got this error error adding file: c:\abc.url I don't get it, the url file is in the root dir. any help would be appreciated. There is sooo much to Autoit. learning so much everyday Edit. Never Mind I figured it out. It had something to do with the way I made the shortcut. I deleted it and renamed it. All is well Edited December 16, 2005 by Kaso Link to comment Share on other sites More sharing options...
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