What im trying to do... I want to be able to start a script that will open a png with photoshop. But I dont want to open another png with a similar name.
Example:
C:/Backgrounds/Blue/ blue-screen.png
C:/Backgrounds/Blue/ blue-screen-02.png
C:/Backgrounds/Blue/ blue-screen.txt
C:/Backgrounds/Red/ red-screen.png
C:/Backgrounds/Red/ red-screen-02.png
C:/Backgrounds/Red/ red-screen.txt
So I want to open just blue-screen.png with photoshop while ignoring screen-02.png. I dont want to edit each script with full path to png's. I want to be able to drop a script in each folder, create a shortcut and use that to open "blue/blue-screen.png" with photoshop.
Code: Select all
Loop, %A_ScriptDir%\*.*, 0, 0
{
If (A_LoopFileExt = "png")
{
LoopFileName = %A_LoopFileName%
LoopFileName := (LoopFileName, "\.png")
if(a_loopfileName!="A_LoopFileName-02.png")
run, "photoshop.exe" %A_LoopFileLongPath%
}
}