Fr33b0w Posted April 10, 2014 Share Posted April 10, 2014 (edited) I would like to know what am I doing wrong in here. First of all script is made to be used with total commander and its manual drop down menu. I am using it to easier play movies and tv series from my hard drive, exit from player and if I dont like them to delete them. Problem is that when I play a folder it somehow get locked (and all previous folders). Only when i exit script they can be deleted. Now, I need to make something clear in here. - I am playing video files that are packed in multi volumes. (vlc supports that kind of play so its enough to start "vlc.exe e:0autoitsomemovieinside.rar" and it will play the file. This is just to explain what script has to do, has nothing to do with failure of a script. - I am using TOTAL COMMANDER feature to copy full path to a file we want to play in vlc player. It wont work on your system just consider that $line contains full path to a file which in this case should be "e:0autoitsomemovieinside.rar" - I am running win XP SP3 I hope I explained my problem well. I guess its just a little something but I am not that experienced to get aware what it is. Did try to find it on forum but not much luck. I even did try some unlock scripts from a forum and real applications for unlocking but not much luck. Thanks in advance. ------------------------------------------------------------------- EDIT: Just to add, all files inside folder are deleted but folder itself aint (in this case e:0autoit)... expandcollapse popup#include <string.au3> #include <file.au3> HotKeySet("^{F12}", "escape") HotKeySet("{F1}", "play") HotKeySet("{F2}", "close") HotKeySet("{F3}", "del") GUISetIcon("vlc.ico") TraySetIcon("vlc.ico",-1) Global $line Global $path Do Sleep(2000) Until 2 = 12 Exit Func play() Send("!s") ; opens a S&tart menu from total commander (custom made start menu by end user - me) Sleep(100) Send("f") ; starts a command that will take full path and directory from total commander where pointer shows and put it in a clipboard Sleep(100) $path=ClipGet() ; path to a dir which has .rar file to be played, for example "e:\0\autoit\" $dir = FileFindFirstFile($path & "*.rar") $file = FileFindNextFile($dir) ; find first file inside selected dir (in this case "somemovieinside.rar") $line=("e:\Sys\Prg\vlc\vlc.exe " & $path & $file) ; pack whole info of a file to be played ready for vlc.exe player SplashTextOn("",$line,(@DesktopWidth),56,-1,(@DesktopHeight - 120),1,"Verdana",10,600) Run($line) ; start vlc player with full path to the file that we want to play Sleep(2000) SplashOff() EndFunc Func close() ; this func closes video player Send("!{F4}") Sleep(100) FileClose($line) EndFunc Func del() ; this func should delete whole folder that contains a movie with files. it do delete files but not a folder. it stays locked until script is closed. ProcessClose("vlc.exe") ; this is extra, i was thinking vlc is locking files but it aint ProcessWaitClose("vlc.exe"); this is extra, i was thinking vlc is locking files but it aint SplashTextOn("DELETING",$path,(@DesktopWidth),56,-1,(@DesktopHeight - 120),1,"Verdana",10,600) ;DirRemove($path,1) <------------------------------ I put this to sleep so if someone run it not to delete half of drive or so Sleep(1500) SplashOff() Sleep(100) EndFunc Func escape() Exit EndFunc Edited April 10, 2014 by Fr33b0w Link to comment Share on other sites More sharing options...
Moderators Solution Melba23 Posted April 10, 2014 Moderators Solution Share Posted April 10, 2014 Fr33b0w,You do not appear to be closing the search handle returned from the FileFindFirstFile call (as the Help file says you should). Try doing so and see if that solves the problem. M23 Fr33b0w 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Fr33b0w Posted April 10, 2014 Author Share Posted April 10, 2014 (edited) Many thanks Melba. I should be more RTFM... Edited April 10, 2014 by Fr33b0w Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 10, 2014 Moderators Share Posted April 10, 2014 Fr33b0w,I take it that my suggestion worked - glad I could help. M23 Fr33b0w 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Fr33b0w Posted April 10, 2014 Author Share Posted April 10, 2014 I was short and quick on answer because I jumped on sorting my video files. It works, it works... it works! 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