1
0
Răsfoiți Sursa

Added 'VIEW' cmd images

Wonder Dog 9 ani în urmă
părinte
comite
dae68cb1a3
3 a modificat fișierele cu 73 adăugiri și 3 ștergeri
  1. 63 1
      Get Image Paths.ahk
  2. BIN
      Image List - Used.txt
  3. 10 2
      Images List - Dupes.txt

+ 63 - 1
Get Image Paths.ahk

@@ -30,6 +30,7 @@ OutMissFile		= Image List - Missing.txt
 OutAutoFile		= Image Paths - Auto List.txt
 OutManFile		= Image Paths - Manual List.txt
 SearchRegEx		= i)<img\s+src\s*=\s*"(.*?)"
+Search2RegEx	= i)view\s*'+(.*?)'+
 CommentRegEx 	= ^\s*!
 MarkMissRegEx	= i)!\s*WD:\s+IMAGE NEEDED\s*~\s*.*?<img\s+src\s*=\s*"(.*?)"
 
@@ -118,6 +119,7 @@ Loop, Parse, Source, `n, `r  			; Specifying `n prior to `r allows both Windows
 		Continue
 	}
 	
+	; -- HTML  images --
 	FoundPos := 1
 	Haystack := A_LoopField
 
@@ -125,7 +127,7 @@ Loop, Parse, Source, `n, `r  			; Specifying `n prior to `r allows both Windows
 	{
 	
 		; -- Find Image File Path --
-		FoundPos := RegExMatch(Haystack, SearchRegEx, Match, FoundPos)			;; Search for image path
+		FoundPos := RegExMatch(Haystack, SearchRegEx, Match, FoundPos)			;; Search for image path in html
 		if (ErrorLevel)
 		{
 			MsgBox, 48, Get Image Paths, RegExMatch runtime error: %ErrorLevel%`n`nFound searching string: %Haystack%`n`nusing search: %SearchRegEx%
@@ -330,6 +332,66 @@ Loop, Parse, Source, `n, `r  			; Specifying `n prior to `r allows both Windows
 			}
 		}
 	}
+	
+	
+	; -- VIEW  images --
+	FoundPos := 1
+	Haystack := A_LoopField
+
+	Loop, 200
+	{
+	
+		; -- Find Image File Path --
+		FoundPos := RegExMatch(Haystack, Search2RegEx, Match, FoundPos)				;; Search for 'view' cmd path
+		if (ErrorLevel)
+		{
+			MsgBox, 48, Get Image Paths, RegExMatch runtime error: %ErrorLevel%`n`nFound searching string: %Haystack%`n`nusing search: %SearchRegEx%
+			break
+		}
+		
+		if (FoundPos = 0)															;; Not Found exit loop
+		{
+			break
+		}
+		else
+		; if (FoundPos)																;; Found File
+		{	
+			FoundPos += 5 + StrLen(Match1)											;; Increment Search Position
+			Match1 := StrReplace(Match1, "/", "\")									;; Use correct Win path seperator
+			OutAll .= Match1 . "`n"
+			; -- Image Path Contains Code --
+			if inStr(Match1, "<<")													;; String contains expression
+			{
+				if inStr(Match1, "FUNC")											;; Unknown Function - Manual
+				{
+					OutMan	.= Spacer(Match1) . "- Unknown Function`n"
+				}
+				
+				else if inStr(Match1, "$")											;; Uses String variable - Manual
+				{
+					OutMan	.= Spacer(Match1) . "- Unknown Function`n"
+				}
+				
+				else if not GetImagefromPath(Match1, OutUsed)						;; Try to find images
+				{
+					OutMan	.= Spacer(Match1) . "- Files not found`n"
+				}
+			}
+			
+			; -- Image path is just a file name --
+			else
+			{
+				IfExist %Match1%
+				{
+					OutUsed	.= Match1 . "`n"										;; Normal file found
+				}
+				else
+				{
+					OutMan	.= Spacer(Match1) . "- File not found`n"				;; Normal file Not found
+				}
+			}
+		}
+	}
 }
 
 

BIN
Image List - Used.txt


+ 10 - 2
Images List - Dupes.txt

@@ -1,5 +1,5 @@
 DupeMerge 1.070
-                         
+                          
 'images\qwest\alter\artom\2.jpg' 67444
 'images\qwest\alter\npc2.jpg' 67444
 'images\qwest\alter\npc\2.jpg' 67444
@@ -124,10 +124,18 @@ DupeMerge 1.070
 'images\qwest\alter\npc8.jpg' 78212
 'images\qwest\alter\npc\8.jpg' 78212
 
+'images\body\0.jpg' 78944
+'images\picb\0.jpg' 78944
+
+'images\body\1.jpg' 80274
+'images\picb\1.jpg' 80274
+
+'images\body\2.jpg' 87361
+'images\picb\2.jpg' 87361
+
 'images\qwest\alter\npc6.jpg' 149677
 'images\qwest\alter\npc\6.jpg' 149677
 
 'images\qwest\alter\npc3.jpg' 190860
 'images\qwest\alter\npc\3.jpg' 190860
 
-