Jump to content

muncherw

Active Members
  • Posts

    248
  • Joined

  • Last visited

Everything posted by muncherw

  1. On the FileFindFirstFile() could a Related link be added to _FileListToArray? Apparently I'm not the only one who has been using the former when the latter was a better option.
  2. Oh, yeah! That did the trick. Thanks a bunch.
  3. Thanks, Melba23. it doesn't work. The files in $aList are correct but it errors on FileGetTime() still.
  4. I'm trying to move the files from one directory into another based on their timestamp. If I run this from the source directory and use FileFindFirstFile("*.dss") it works. If I change that to a path, it returns a 1 which seems good but then the $t = FileGetTime($file, 0) line doesn't work. I don't understand what is going on here. I've read a bunch of FileFindFirst File topics but don't see how mine is different. I want to have the source path in there because a user need to run it and I don't want to run the risk of her moving it out of the directory and suddenly moving all sorts of files from her desktop or wherever into the folders on the server. $sourcePath = "\\Dictations\Backups\Backup\" $destinationPath = "\\Dictations\Backups\FolderA\" $search = FileFindFirstFile($sourcePath & "*.dss") ;;Everything works fine if this is "*.dss" If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop ;Get the date of the source file which will be the destination folder name $t = FileGetTime($file, 0) If Not @error Then $yyyymd = $t[0] & $t[1]& $t[2] Else MsgBox(0, "Error", "Can't get the date") EndIf ;See if destination folder exsists, create folder if it doesn't If FileExists($destinationPath & $yyyymd) Then Else ;MsgBox(4096,"Creating dir" , "Creating directory \\Dictations\Backups\FolderA\" & $yyyymd) DirCreate($destinationPath & $yyyymd) EndIf ; See if the file exists at destination, if not then move it there If FileExists($destinationPath & $yyyymd & "\" & $file) Then Else ;MsgBox(4096,"Copying" , "Copying " & $file & " to \FolderA\" & $yyyymd) FileMove($file, $destinationPath& $yyyymd & "\" & $file) EndIf WEnd ; Close the search handle FileClose($search)
  5. Won't look like what I had envisioned but may serve the purpose just as well. Thanks.
  6. I'd like some items in a combo box to have a slightly different background color from each other. I know this can't be done with any normal means but I saw someone do this with 3 or 4 weeks ago with listview items (I can't find the thread now though) and wondered if anyone had tried something similar for combobox items. Not to be confused with alternating list items.
  7. Sure, you can. ;This part goes above the gui $file = FileOpen("C:\list of goodies.txt", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop $listItems = $listItems & $line & "|" ;Don't forget the delimiter WEnd FileClose($file) ;create your gui then set the data GUICtrlSetData(-1, $listItems) I have a nice script that allows me to access various things on network PC's and I have multiple tabs that all read from the same txt file and display different info.
  8. Try IcoFX. That's what I use. http://icofx.ro/
  9. Create your own ico file? You would need some other software to do that. There are a lot of good freeware icon makers out there. Or do you just want to use an icon that you have but that they might not have on their system?
  10. http://www.autoitscript.com/forum/index.ph...create+shortcut
  11. If I edited out all the stupid posts of mine I wouldn't have any posts at all.
  12. I like the idea, but execution seems tough- you have to hope that whoever posted code gave the post a nice clean name.
  13. If the windows taskbar is not the default size then it covers your message boxes.
  14. Pretty cool, Spiff. I'm an Opera user instead of IE so unfortunately it doesn't work for me. But I did a test and I liked what it's capable of. You did remind me though that I want to open it automatically in Scite so I appreciate that.
  15. MilesAhead, thanks for the addition to the script. Or, I guess, reworking of the concept and making a brand new script. Either way I like what you did. I had been brainstorming to try and search the code for some relevant string that I could use to name the created script but your solution is pretty nice, assuming you don't change windows before you activate the hotkey. Good work.
  16. Func Start() MouseClick("left", 2) EndFunc
  17. If your mind comes up with a way to automatically assign a descriptive title so I don't even have to use the inputbox let me know.
  18. Actually, when I usually create a new script from a copied text I'd just right click and have it create a new file but then I have 5 new scripts all named with number increments and I don't know what any of them do. This was really created out of my laziness for not renaming files. Your idea would just cause me to automate the thing that makes me nuts. Also I've noticed since I wrote this this morning that I use the clipboard a whole lot more than I ever realized, so your idea of searching the text for au3 is a good one or I'd get 100 bogus script files. Plus when I copy something from the forum I usually want to play with it right away.
  19. I often copy code from the forums, create a new document, rename it, open it, paste the copied code in, and then save it. While that takes the entirety of 13 seconds to do there is still something I find tedious about it so I wrote this to save myself those valuable seconds. Copy the code you want then run the script and it will create the file for you. $fileName = InputBox("New AU3 Name", "What would you like to name the file?") $file = FileOpen($fileName & ".au3", 10); Will create a new file and overwrite if already exists If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf $fileContents = ClipGet() FileWrite($file, $fileContents);Put the contents of the clipboard in the new file FileClose($file)
  20. Oh, you know what, that corresponds with using the send command. I misunderstood what you were wanting. Sorry. That won't do what you want.
  21. Opt("SendKeyDelay", 5) ;5 milliseconds
×
×
  • Create New...