Jump to content

JimmyT

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by JimmyT

  1. Thanks MsCreatoR! ..and amel27, Sunaj and others that worked on this! This seems to be what I'm after. One more newbie question: When I want to use the functions, can I just copy the code into my own script and the make a call to the functions when I need them? Or can I incorporate the functions into AutoIt permanantly so I just can call the functions without having to copy the code every time?
  2. Hi all! I have read a couple of posts here on the forum regarding the problem I face but found no answers. I'll try to explain my issue: I want to bring up a browser window where I should be able to choose a new file name (NOT an existing file). The file extension should be filtered to .ldf. The action should result in the full path to the file (incl. the file extension). Fair enough, the example test code to do this with a FileSaveDialog is as follows: ; filesavedialog test $TestDir = "C:\Test" $Ldf = FileSaveDialog("Choose a .ldf file name", $TestDir, "ldf files (*.ldf)", 2) If @error Then MsgBox(4096,"","No File(s) chosen") Exit EndIf $File = FileOpen($TestDir & "\Testsave.txt", 2) FileWriteLine($File, $Ldf) FileClose($File) I can do this with a simple MsgBox as well (and I did with the same result): Just type the result from the FileSaveDialog to Testsave.txt. The problem is that the extension (in this case .ldf) not is added to the file name and the result looks like this: C:\Test\Filename instead of C:\Test\Filename.ldf I have to manually add the extension afterwards: Ldf = $Ldf & ".ldf" I noticed the same issue with the FileOpenDialog. Is this a standard behavior in AutoIT or is it a bug? Or is there any other way to automatically supply the extension without having to type it in the "File name" field? Best regards / Jimmy
×
×
  • Create New...