anhyeuem Posted February 18, 2014 Share Posted February 18, 2014 thank you so much, my teachers. I am newbie so i want to write a Script: 1. When i finished play videos my Script will delete that videos. Because when we playing videos, our script can not delete them. 2. my videos has Patch: C:WindowsDirtest*.avi ~ @WindowsDir & "test*.avi Therefore, my script is impossible: If FileExists(@WindowsDir & "test*.avi") Then FileDelete(@WindowsDir & "test*.avi") Can you help me, please. thanks Link to comment Share on other sites More sharing options...
JohnOne Posted February 18, 2014 Share Posted February 18, 2014 #RequireAdmin Because non admin user does not have right to delete files from windows directory. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
czardas Posted February 19, 2014 Share Posted February 19, 2014 Hi KstGamesandsoftwares. I think you are from Vietnam. What video software are you using to watch the videos? Why are the videos in the Windows directory? I don't understand this. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
czardas Posted February 19, 2014 Share Posted February 19, 2014 Để thoát khỏi một vòng lặp sử dụng ExitLoop. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Starstar Posted February 20, 2014 Share Posted February 20, 2014 (edited) okay nếu như trên đây gõ tiếng việt mà ko bị del thì mong cao thủ giúp như sau:Có một số game như sau ạ:1. Mỗi lần chạy sẽ có hộp thoại bắt nhập pass có title: "Enter password"2. Nhập xong pass là: 123456 thì sẽ vào game có title là: "Game"3. Tuy nhiên một số game thì ko cần 1 và 2 mà vào luôn game có title là :"Game". Tức là ko có pass.Vậy có cách nào viết script autoit chọn đường dẫn game, rồi khi chọn xong sẽ vào game, nếu 1 xuất hiện thì tự gõ pass rồi vào game, nếu vào luôn game mà ko có pass thì thoát game. Trước khi chạy game thì kiểm tra xem có hộp "Enter password" hay hộp "Game" không, nếu có thì thoát.Em viết như sau:if WinExists("Enter password") ThenWinClose("Enter password")EndIfif WinExists("Game") ThenWinClose("Game")EndIf$a = FileOpenDialog("game", "", "All (*.*)")Run($a)While 1if WinExists("Enter password") ThenWinSetState ( "Enter password", "", @SW_HIDE )Controlsettext("Enter password","","Edit1","123456")Controlsend("Enter password","","","{enter}")ExitLoopElseEndIfWEnd.... Tuy nhiên khi mà game nào ko có pass vào luôn thì nó ko exit game đó ạ. Vậy phải thêm dòng nào anh? i think you are looking a script for games purpose..........with the help of google translator i can also understand vietnamese...............do not being a clever...... Edited February 20, 2014 by Starstar Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 20, 2014 Moderators Share Posted February 20, 2014 KstGamesandsoftwares,Starstar is quite right - please read the Forum rules (the link is also at bottom right of each page) - particularly the bit about not discussing game automation - before you post again. Thread locked. But welcome to the AutoIt forum - and see you soon with a legitimate question I hope. M23 onlineth 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...
Recommended Posts