Sign in to follow this  
Followers 0
Darknight1366

Is These Possible?

10 posts in this topic

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

Share this post


Link to post
Share on other sites



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 removals

But 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: :idiot:

#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
WEnd

Sorry 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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Haha. Thnx You Don't Need To Be Sorry.


Visit HugeSoft(TM) To Get Any Coding Help or Anything

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by JoHanatCent

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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/812003

http://www.virtualplastic.net/html/wv_main.html

I 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-t22

Hope that is helpful.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

#10 ·  Posted (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 by willichan

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0