AHK-Script: PopUp-Fenster bei Klick auf Ordner

German support forum

Moderators: white, Hacker, Stefan2

ET2000
Junior Member
Junior Member
Posts: 28
Joined: 2008-05-02, 14:28 UTC

Post by *ET2000 »

2StatusQuo
Daaaaannnnnnnkkkkkkeeeeeee!!!!!!
Funktioniert perfekt! Superklasse! Ein ganz herzliches Dankeschön an Dich! 3x tief verbeug :)
StatusQuo wrote:2ET2000
Eine erste Version für Explorer funktioniert in meinen Tests unter Win2k SP4 und XP SP2:
CD-PopUpDialog, aktuell mit
- *_TC V0.41
- *_Xplorer V0.1.
.
Licence#: 140384
Leo82
New Member
New Member
Posts: 1
Joined: 2019-04-08, 18:03 UTC

Re: [OT?] PopUp-Fenster bei Klick auf Ordner

Post by *Leo82 »

Schönen guten Abend zusammen,

gibt es hier jemand der mir diese Version zukommen lassen kann??
würde mich sehr interessieren

Danke schon mal,

Gruß Leo
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Re: [OT?] PopUp-Fenster bei Klick auf Ordner

Post by *StatusQuo »

Sorry für die späte Antwort.
Da der externe Link leider inzwischen offline ist, hier noch mal die Version 0.41:

Code: Select all

; TC_CD-PopUpDialog.ahk V0.41  (W) StatusQuo 2008
;
; pops up a dialog every time a directory is changed,
; optionally only for network paths + network drives
;
; http://ghisler.ch/board/viewtopic.php?t=19065

	#SingleInstance force
	#Persistent

	Debug          := 0
	boNetPathsOnly := 1
	sMsgBoxText    := "Verzeichnis gewechselt nach:"
	
	iMaxMsgPath := 20		; maximum number of sMsgPath-variables
	sMsgPath1   := "u:\"
	sMsgPath2   := "w:\tmp\"
	sMsgPath3   := ""
	sMsgPath4   := ""
	sMsgPath5   := ""
	sMsgPath6   := ""
	sMsgPath7   := ""
	sMsgPath8   := ""
	sMsgPath9   := ""
	sMsgPath10  := ""
	
	boPopupRestrictDirFound := "0"
	Loop, %iMaxMsgPath%
	{
		if (sMsgPath%A_Index% <> "")
		{
			boPopupRestrictDirFound := "1"
			boNetPathsOnly          := "0"	; deactivate limiting to net-paths when limiting to specified dirs (prevent interfering)
			Break
		}
	}
		
	SetTitleMatchMode, 1
	SetTimer, l_PopupCheck, 100
	Return
	
l_PopupCheck:
	f_PopupCheck()
	Return
	
f_PopupCheck()
{
	IfWinNotActive, ahk_class TTOTAL_CMD
			Return
	
	global sLastPathLeft, sLastPathRight, sLastTitle
	     ,  sActPathLeft,  sActPathRight
	     , sMsgBoxText, iMaxMsgPath
	     , boNetPathsOnly, boPopupRestrictDirFound
	     , Debug

		; === get active paths from TC window
	DetectHiddenText, Off
	sActPathLeft  := ""
	sActPathRight := ""
	WinGetText , sWinText , ahk_class TTOTAL_CMD
	Loop, Parse, sWinText , `n
	{
			; === find + store path from TC window text
		if not ( (SubStr( A_LoopField, 1, 2 ) = "\\") 
		      or (SubStr( A_LoopField, 2, 2 ) = ":\") )
			Continue
		if (sActPathLeft  = "")
		{
			sActPathLeft  := A_LoopField
			Continue
		}
		sActPathRight := A_LoopField
		Break
	}

		; === TC multiple instances: no MsgBox after switching to another TC instance
	WinGetTitle, sActTitle, ahk_class TTOTAL_CMD
	if (not (sLastTitle = sActTitle))
	{
		sLastTitle     := sActTitle
		sLastPathLeft  := sActPathLeft
		sLastPathRight := sActPathRight
		Return
	}

	sTcPanel[1] := "Right"
	sTcPanel[2] := "Left"
	Loop, 2	; TC left + right panel
	{
		sTcPanel := sTcPanel[%A_Index%]
			; === MsgBox only for specified paths
		iLoopCount := "0"
		Loop, %iMaxMsgPath%
		{
; sometimes popups on the left are deactivated, as long as on the right a local/unwatched path is displayed
; not 100% reproducible yet
			if (sMsgPath%A_Index% <> "")
			{
				boPopupRestrictDirFound := "1"
				boNetPathsOnly          := "0"	; deactivate limiting to net-paths when limiting to specified dirs (prevent interfering)
				; if   (  (InStr(sLastPath%sTcPanel%, sMsgPath%A_Index%) > 0)
				; 	  or (InStr( sActPath%sTcPanel%, sMsgPath%A_Index%) > 0) )
				; IfInString, 
				sTmp := sMsgPath%A_Index%
				if   (  (InStr(sLastPath%sTcPanel%, sTmp) > 0)
					  or (InStr( sActPath%sTcPanel%, sTmp) > 0) )
				{
					Break
				}
			}
			iLoopCount := A_Index
		}

		if (iLoopCount = iMaxMsgPath) and ( boPopupRestrictDirFound <> "" )	; Popup restrict dirlist is specified, but doesn't contain active/last dirs
		{
			Continue
		}

; identifying general network drives does NOT work with user defined filter, only while displaying *.*
		DriveGet,  tActDriveType, type, % SubStr( sActPath%sTcPanel%, 1, InStr( sActPath%sTcPanel%, "\*.*")-1)
		DriveGet, tLastDriveType, type, % SubStr(sLastPath%sTcPanel%, 1, InStr(sLastPath%sTcPanel%, "\*.*")-1)
		if (   (SubStr(  sActPath%sTcPanel%, 1, 2 ) = "\\") 
			 or (SubStr( sLastPath%sTcPanel%, 1, 2 ) = "\\") )	; only show if a network path is involved (UNC)
		  or ( ( tActDriveType = "Network") 
			 or (tLastDriveType = "Network") )						; only show if a network path is involved (mapped/universal)
		  or     ( boPopupRestrictDirFound )
		  or not ( boNetPathsOnly )
		{
			if not (sLastPath%sTcPanel% = sActPath%sTcPanel%)	; path was changed - show MsgBox
			{
				sLastPath%sTcPanel% := sActPath%sTcPanel%
				if (InStr(sActPath%sTcPanel%, "\*.*"))				; remove suffix "*.*" in displayed string
					sPathDisplay := SubStr(sActPath%sTcPanel%, 1, InStr(sActPath%sTcPanel%, "\*.*"))
				else
					sPathDisplay := sActPath%sTcPanel%
				MsgBox, %sMsgBoxText%`n`n%sPathDisplay%
				Continue
			}
		}
	}
}
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
Post Reply