mr-es335 Posted Wednesday at 04:31 PM Posted Wednesday at 04:31 PM Good day, I hope that the day finds you well! If I understand things correctly, the total path length is either 255 or 260 "legal" characters. In example LaunchMeA, the total path length is: 87 • F:\SMS\Lesson Manual\6 Staff Notation\Staff Notation\1 Introduction\2 The Staff\Images In example LaunchMeB, the total path length is: 104 F:\SMS\Lesson Manual\6 Staff Notation\Staff Notation\2 Pitch Location\1 Visual Representation #1\Images LaunchMeA works...however, LaunchMeB....does not?! May I aks "Why?" Thank you for your time...appreciated! ; ----------------------------------------------- ;~ LaunchMeA ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- LaunchFirst() LaunchSecond() ; ----------------------------------------------- Func LaunchFirst() Local $sSrcPath = "F:\SMS\Lesson Manual\6 Staff Notation\Staff Notation\1 Introduction\2 The Staff" ; ----------------------------------------------- ShellExecute($sSrcPath) WinWait($sSrcPath, "") WinMove($sSrcPath, "", 1400, 10, 500, 440) EndFunc ;==>LaunchFirst ; ----------------------------------------------- Func LaunchSecond() Local $sSrcPath = "F:\SMS\Lesson Manual\6 Staff Notation\Staff Notation\1 Introduction\2 The Staff\Images" ; ----------------------------------------------- ShellExecute($sSrcPath) WinWait($sSrcPath, "") WinMove($sSrcPath, "", 1400, 475, 500, 440) EndFunc ;==>LaunchSecond ; ----------------------------------------------- ; ----------------------------------------------- ;~ LaunchMeB ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- LaunchFirst() LaunchSecond() ; ----------------------------------------------- Func LaunchFirst() Local $sSrcPath = "F:\SMS\Lesson Manual\6 Staff Notation\Staff Notation\2 Pitch Location\1 Visual Representation #1" ; ----------------------------------------------- ShellExecute($sSrcPath) WinWait($sSrcPath, "") WinMove($sSrcPath, "", 1400, 10, 500, 440) EndFunc ;==>LaunchFirst ; ----------------------------------------------- Func LaunchSecond() Local $sSrcPath = "F:\SMS\Lesson Manual\6 Staff Notation\Staff Notation\2 Pitch Location\1 Visual Representation #1\Images" ; ----------------------------------------------- ShellExecute($sSrcPath) WinWait($sSrcPath, "") WinMove($sSrcPath, "", 1400, 475, 500, 440) EndFunc ;==>LaunchSecond ; ----------------------------------------------- mr-es335 Sentinel Music Studios
ioa747 Posted Wednesday at 05:05 PM Posted Wednesday at 05:05 PM (edited) Good day to you too Τemporarily change the # character to see if he is responsible Edited Wednesday at 05:08 PM by ioa747 I know that I know nothing
mr-es335 Posted Wednesday at 07:50 PM Author Posted Wednesday at 07:50 PM iao747, I have tested that...and the "#" does not appear to be the issue. In my testing, it would appear to be a "path length" issue?!? The question is "Why?" mr-es335 Sentinel Music Studios
ioa747 Posted Wednesday at 10:01 PM Posted Wednesday at 10:01 PM (edited) The Problem is in File Explorer Window Title Length Limitation (for me 96 char) The issue you're facing isn't with the path itself, but with the File Explorer window's title bar. When a folder path is long, the Explorer window often truncates its title. This makes it difficult for AutoIt's WinWait or WinWaitActive functions to correctly identify the window, as they rely on matching the exact (or at least a sufficiently long part of the) window title. you need to change your approach suggested solution Func LaunchFirst() Local $sSrcPath = "F:\SMS\Lesson Manual\6 Staff Notation\Staff Notation\2 Pitch Location\1 Visual Representation #1" ; ----------------------------------------------- ShellExecute($sSrcPath) Local $hWnd = WinWaitActive("[CLASS:CabinetWClass; TITLE:" & StringLeft($sSrcPath, 90) & "]", "", 3) If $hWnd Then WinMove($hWnd, "", 1400, 10, 500, 440) EndFunc ;==>LaunchFirst Edited Wednesday at 10:31 PM by ioa747 missing & genius257 1 I know that I know nothing
mr-es335 Posted Thursday at 07:16 PM Author Posted Thursday at 07:16 PM ioa747, You have come through again...and "with flying colours"!! I kinda' figur'd that the issue had to do with path length...just not sure how to correct the anomaly. All tested and working as expected! Thank you again...for your time, attention and patience to the above. All are very much appreciated! • ios747, yo9u are indeed a true blessing to this forum! ioa747 1 mr-es335 Sentinel Music Studios
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