Jump to content

JoneZ

Members
  • Posts

    18
  • Joined

  • Last visited

About JoneZ

  • Birthday 02/10/1980

JoneZ's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi that's great thanks. Is the one out there that will let you create a GUI like Visual Basic does or Delphi. Where you drag and drop items onto a form and position them etc.. Thanks again
  2. Hi my Dad told me he saw on the Forum an Autoit Gui creator written in either Delphi or C++. Does anyone know where I can get hold of this? Cheers in advance
  3. I've found it it's FileExists() Cheers
  4. NICE ONE!!! You are the man! Didnt know about the IsAdmin function. Thankyou so much! Is there a function similar to that that will check if a folder is already in exsistance? Many thanks again. Tested as a basic user and it works.
  5. I was going to do that but was feeling lazy and a little . It's monday morning and i thought one of you coding gods could help ease the pain
  6. Hi i want to create a folder in c:\Program Files and my code does this. But i am an administrator. If the person running my application is a user then they wouldnt be able to intall and it needs to ask for a administrator to intall. I've added the if statement but not sure if this will work or not. Any ideas would be appriciated. I also need to check if the dir is already created so it doesnt install over the top. Here is the code... if DirCreate ( @ProgramFilesDir&"\FFT" ) then FileCopy (@ScriptDir & "\FFT\school_FFT_DB_SCH.mdb", @ProgramFilesDir&"\FFT", 0 ) ; Sets a shortcut with ctrl+alt+t hotkey FileCreateShortcut(@WindowsDir & "\Explorer.exe",@DesktopDir & "\FFT Database.lnk",@WindowsDir,"/e,"& @ProgramFilesDir & "\FFT\school_FFT_DB_SCH.mdb", "FFT Database", @SystemDir & "\shell32.dll", "^!t", "43", @SW_MINIMIZE) MsgBox(4160,"Database Installation Complete"," The Database has been successfully installed to C:\Program Files\FFT." & @CRLF & "" & @CRLF & " A shortcut to this file has been placed on your desktop." & @CRLF & "" & @CRLF & "") else MsgBox(48,"Install Unsuccessful","Please contact your administrator to install the database") endif
  7. As i said that works fine for *.mdb files. If i wanted to open a word document would i just do. $filename = @ScriptDir &"\FFT\document.doc" $CodeName = RegRead("HKEY_CLASSES_ROOT\.doc", "") $thingtorun = RegRead("HKEY_CLASSES_ROOT\"&$CodeName&"\shell\Open\command", "") $thingtorun = StringReplace($thingtorun, "%1", $filename) Run($thingtorun) This opens Word but the file doesnt open at all. Cheers for the help
  8. Coool! That opens the file! Thanks for that. Any ideas why my other code doesnt work? I was trying to do it as simply as possible and that works fine for text files and even word *.doc files. Cheers
  9. 1) Yes of course. I'm lame at Autoit but i'm not that lame 2) If i double click a *.mdb file it open in Access 3) If you mean do a Start> Run > Type the path to the file and click ok. Then that opens the file in Access too. Cheers Jonez
  10. Thanks for that i'll give it a try. Just looked in the help file and yes @ScriptDir is what i need to use. Thanks for picking up on that Cheers Jonez
  11. Thanks for your help. It works fine for text files. But i'm now trying to open an access database. And nothing happens. No error or anything. I've tried both $filename = @WorkingDir &"\FFT\database.mdb" Run(@ComSpec & ' /c start ' & $filename, '', @SW_HIDE) And... _RunDos("start H:\Autoit\FFT\database.mdb") Any ideas? Thanks for the help so far
  12. I am a newbie. But i am sure this must be possible... Can i get autoit to open any file i like without saying what program needs to open it? When you click on a file you dont have to know what program should open it. The OS already knows because the file type has been assigned to that application. I know that the following works. $LocationAndApplication2OpenWithEXE = "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" $ItemLocationAndNameToOpen=@WorkingDir &"\FFT\school_FFT_DB_SCH.mdb" Run('"' & $LocationAndApplication2OpenWithEXE & '" "' & $ItemLocationAndNameToOpen & '"') Or the very simple example in the help file Run("Notepad.exe", "", @SW_MAXIMIZE) .. But is there a way not to say the program and just specify the file? I want to open word, access and excel files. But if the autoit is run on a machine with a different version of office i'd have to code all the locations of the various versions of office. Is there a way to solve this Thanks in advance
  13. YAY! Cheers I'm a newbie
  14. How would i create a folder in c:\program files? I want to copy a file there Cheers
  15. Sorry if this sounds dumb. But why dont you just use @WorkingDir. If the program is running from the cd and you want to access other files on the cd using @WorkingDir will work fine. Sorry i'm a newbee
×
×
  • Create New...