Demon777 Posted November 30, 2007 Posted November 30, 2007 Hi all I need help with Autoit. I tryed to create some progs and when i wanted to Rename file with Comannd i havent founded Rename function. Can u plz tell me where can i find this function ? And 1 more problemm I made programm that create some new dir's on Disk C. And i wanted to do so : If you start this programm it will copy urself to another dir that was created. And also i founded nothing about it ! There is no Command for it or tell me how to do it Thx.
PsaltyDS Posted November 30, 2007 Posted November 30, 2007 Hi all I need help with Autoit. I tryed to create some progs and when i wanted to Rename file with Comannd i havent founded Rename function. Can u plz tell me where can i find this function ?FileMove()?And 1 more problemm I made programm that create some new dir's on Disk C. And i wanted to do so : If you start this programm it will copy urself to another dir that was created. And also i founded nothing about it ! There is no Command for it or tell me how to do it DirCopy()? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Demon777 Posted November 30, 2007 Author Posted November 30, 2007 1) Thx for 1st 2) U didnt understand what i mean. I mean when some one will start my script at his/her PC, this script should copy urself (this file) in another Folder. But how it ll know where this guy/girl downloaded this script ? What code should i write ? It should know from where to copy this script to another Folder ! this is my prob
Bowmore Posted November 30, 2007 Posted November 30, 2007 1) Thx for 1st 2) U didnt understand what i mean. I mean when some one will start my script at his/her PC, this script should copy urself (this file) in another Folder. But how it ll know where this guy/girl downloaded this script ? What code should i write ? It should know from where to copy this script to another Folder ! this is my prob The macro @ScriptFullPath is what you need. It gives you the name and location of the running script FileCopy ( @ScriptFullPath, "C:\somedirectory" , 8 ) Iformation about this and many other very useful macros can be foun in the help file @ScriptName Filename of the running script. @ScriptDir Directory containing the running script. (Result does not contain a trailing backslash) @ScriptFullPath Equivalent to @ScriptDir & "\" & @ScriptName @AppDataCommonDir path to Application Data @DesktopCommonDir path to Desktop @DocumentsCommonDir path to Documents @FavoritesCommonDir path to Favorites @ProgramsCommonDir path to Start Menu's Programs folder @StartMenuCommonDir path to Start Menu folder @StartupCommonDir path to Startup folder Macros for Current User data. Most values are read from HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion @AppDataDir path to current user's Application Data @DesktopDir path to current user's Desktop @MyDocumentsDir path to My Documents target @FavoritesDir path to current user's Favorites @ProgramsDir path to current user's Programs (folder on Start Menu) @StartMenuDir path to current user's Start Menu @StartupDir current user's Startup folder @UserProfileDir Path to current user's Profile folder. Other macros for the computer system: @HomeDrive Drive letter of drive containing current user's home directory. @HomePath Directory part of current user's home directory. To get the full path, use in conjunction with @HomeDrive. @HomeShare Server and share name containing current user's home directory. @LogonDNSDomain Logon DNS Domain. @LogonDomain Logon Domain. @LogonServer Logon server. @ProgramFilesDir path to Program Files folder @CommonFilesDir path to Common Files folder @WindowsDir path to Windows folder @SystemDir path to Windows' System (or System32) folder @TempDir path to the temporary files folder @ComSpec value of %comspec%, the SPECified secondary COMmand interpreter; primarly for command line uses, e.g. Run(@ComSpec & " /k help | more") "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
Demon777 Posted December 1, 2007 Author Posted December 1, 2007 (edited) I have new problemm : InetGet("http://www.mozilla.org", "C:\foo.html") Run("foo.html", "C:\foo.html", @SW_MAXIMIZE) It cant find downloaded file and also cant run it. I tryed all ways but its dont work. Its writing : C:\Files\******\Scripts Test\Inetget.au3 (2) : ==> Unable to execute the external program.: Run("foo.html", "C:\foo.html", @SW_MAXIMIZE) The System can not find this File. But when u put this file in System32 this will work ! Plz help me . Thx Edited December 1, 2007 by Demon777
Bowmore Posted December 1, 2007 Posted December 1, 2007 (edited) I have new problemm : InetGet("http://www.mozilla.org", "C:\foo.html") Run("foo.html", "C:\foo.html", @SW_MAXIMIZE) It cant find downloaded file and also cant run it. I tryed all ways but its dont work. Its writing : C:\Files\******\Scripts Test\Inetget.au3 (2) : ==> Unable to execute the external program.: Run("foo.html", "C:\foo.html", @SW_MAXIMIZE) The System can not find this File. But when u put this file in System32 this will work ! Plz help me . Thx I think Run("foo.html", "C:\foo.html", @SW_MAXIMIZE) should be Run("C:\foo.html", "C:\", @SW_MAXIMIZE) Or more likely this ShellExecute("C:\foo.html","", "c:\", "open", @SW_MAXIMIZE) Edited December 1, 2007 by Bowmore "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
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