Darknight1366 Posted February 24, 2011 Share Posted February 24, 2011 1.I Want To Create A Script Which Will Show A Text When Anyone Enters My Folder?(Folder Path Will Be Told After Creating Script) 2.Is It Possible To Make A Extractor? I Mean When Anyone Open It It'll Extract Some Files With Showing A Progress Bar? Please Help Me, I am a Novice. Visit HugeSoft(TM) To Get Any Coding Help or Anything Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 24, 2011 Moderators Share Posted February 24, 2011 Darknight1366,- 1. I do not think you can detect anyone just opening a folder. This UDF can detect the following:•folder and file renames•folder and file creates•folder and file deletes•folder and file updates•drive additions•drive removalsBut that does not help you and I do not think the Shell can do much more. - 2. FileInstall will load files onto a machine when the compiled .exe is run, but I have never seen a progress bar associated with it. You might want to think about a marquee progress like this to at least show something is happening: #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateProgress(10, 10, 400, 20, $PBS_MARQUEE) GUICtrlSendMsg(-1, $PBM_SETMARQUEE, True, 50) ; final parameter is update time in ms GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndSorry I cannot be of more help. M23 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...
Darknight1366 Posted February 24, 2011 Author Share Posted February 24, 2011 Haha. Thnx You Don't Need To Be Sorry. Visit HugeSoft(TM) To Get Any Coding Help or Anything Link to comment Share on other sites More sharing options...
John Posted February 24, 2011 Share Posted February 24, 2011 If you know what program the folder will be opened with, i.e. Explorer, you can check the title text. When the Explorer process exist and the path is found in the title text call your script function. This would work with any program opening the folder which shows the path in the title (or other) text. Link to comment Share on other sites More sharing options...
JoHanatCent Posted February 25, 2011 Share Posted February 25, 2011 (edited) My Explorer does not show anything in the Title. But if you are using explorer and select the folder you can use this to keep your system very buzy! Dim $bak, $bak1 HotKeySet("{ESC}", "Ontsnap") While 1 Send("^c") $bak = ClipGet() If $bak1 <> $bak Then If $bak = "C:\Test2" Then MsgBox(0, "GotHa!", $bak & ' was selected!', 4) $bak1 = $bak EndIf Sleep(17) WEnd Func Ontsnap() Exit 0 EndFunc Spelling! Edited February 25, 2011 by JoHanatCent Link to comment Share on other sites More sharing options...
John Posted February 25, 2011 Share Posted February 25, 2011 My Explorer does not show anything in the Title. But if you are using explorer and select the folder you can use this to keep your system very buzy! Dim $bak, $bak1 HotKeySet("{ESC}", "Ontsnap") While 1 Send("^c") $bak = ClipGet() If $bak1 <> $bak Then If $bak = "C:\Test2" Then MsgBox(0, "GotHa!", $bak & ' was selected!', 4) $bak1 = $bak EndIf Sleep(17) WEnd Func Ontsnap() Exit 0 EndFunc Spelling! Mine does not show a title either, but it still has the title set to the path which is returned by WinGetTitle(). Certainly it would consume system resources for a highly limited utility, regardless of several ways of limiting those resource requirements. However, my response was geared toward what was merely possible, per the OP question. I would never accept accept this resource cost for such a utility myself, especially using AutoIt, but I have seen tray apps that were just as bad or worse. Link to comment Share on other sites More sharing options...
willichan Posted February 25, 2011 Share Posted February 25, 2011 You might try creating a custom web view for the folder, and triggering something from there when the folder is opened. I can't say I've ever tried it, but you might look into it.Some links to help you out:http://support.microsoft.com/kb/812003http://www.virtualplastic.net/html/wv_main.htmlI understand that much of this functionality was disabled with XP SP2, but one person claims to have found a way to re-enable it.http://www.pcreview.co.uk/forums/windows...thout-setting-folder-syste-t22Hope that is helpful. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
JoHanatCent Posted February 27, 2011 Share Posted February 27, 2011 MayBe a not so Buzy method? Dim $bak = "C:\Test2"; Your folder name HotKeySet("{ESC}", "Ontsnap") While 1 If ControlGetText('[CLASS:CabinetWClass]','','Edit1') = $bak Or _ ControlGetText('[CLASS:ExploreWClass]','','Edit1') = "C:\Test2" Then MsgBox(0, "GotHa!", $bak & ' was selected!', 4) Sleep(17) WEnd Func Ontsnap() Exit 0 EndFunc Link to comment Share on other sites More sharing options...
JohnOne Posted February 27, 2011 Share Posted February 27, 2011 (edited) Hers my simple offer. $sFolder = "folder\path" While 1 Sleep(100) $sWinGetText = WinGetText("[ACTIVE]") If StringInStr($sWinGetText, $sFolder) Then _MyFunc() EndIf WEnd Func _MyFunc() MsgBox(0, "MsgBox", $sFolder & " Opened") EndFunc ;==>_MyFunc Edited February 27, 2011 by JohnOne 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...
willichan Posted February 28, 2011 Share Posted February 28, 2011 (edited) Both those solutions work to an extent, but they continue to trigger as long as the folder is open/has focus, rather than just triggering once per folder open event. Merging JoHanatCent's "buzy" solution with JohnOne's gives Dim $sFolder = "C:\test" Dim $bak = "" While 1 Sleep(100) $sWinGetText = WinGetText("[ACTIVE]") If $sWinGetText <> $bak Then If StringInStr($sWinGetText, $sFolder) Then _MyFunc() $bak = $sWinGetText EndIf WEnd Func _MyFunc() MsgBox(0, "MsgBox", $sFolder & " Opened") EndFunc ;==>_MyFunc This eliminates the looping while the folder is open, but still triggers every time the folder looses focus, then regains it. To meet the OP's original need as stated, I still think that the custom folder.htt will work the best. The folder.htt is only loaded on folder open or refresh, so should not re-trigger when re-gaining focus. ---Edit--- The unfortunate drawback to the folder.htt solution though, is that it will only work up through WinXP. It will not work with Vista or Win7. That functionality was removed with those versions. Edited February 28, 2011 by willichan My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash 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