Example:
Code: Select all
TOTALCMD#BAR#DATA
%ComSpec% /c
for /f "delims=" %%a in (%F) do move "%%a" ..
%windir%\system32\shell32.dll,146
Move one level up
1
-1
Moderators: Hacker, petermad, Stefan2, white
Code: Select all
TOTALCMD#BAR#DATA
%ComSpec% /c
for /f "delims=" %%a in (%F) do move "%%a" ..
%windir%\system32\shell32.dll,146
Move one level up
1
-1
I think the problem is caused by FindFirstFile because if you called it to check file existence, it is return False if the path starting with <Space>, so when TC call it to see if the icon file exist or not, it return False and therefore TC skip resolve the icon.MVV wrote:I don't understand why TC cannot resolve icon index if it has trailing space.
That's because trailing space are removed.MVV wrote:and only when I then open button's properties and click OK, TC shows icon on the button.
I think it is not such case. Buggy line with icon looks like this: <path_to_icon>,<icon_index><buggy_space>. So this space can't be a part of filename anyway since filename ends at comma but buggy space is at the end of line after icon index that should be calculated correctly even if there is a space after it.ts4242 wrote:I think the problem is caused by FindFirstFile because if you called it to check file existence, it is return False if the path starting with <Space>, so when TC call it to see if the icon file exist or not, it return False and therefore TC skip resolve the icon.
Just write space after number 107 and copy text with this space - and you will see that pasted button's icon is blank.Balderstrom wrote:Win2K:
The last icon (index) in shell32.dll is 107.
If I change the 146 (icon index) in your code to 107, then it pastes correctly.
I am using Xp SP3.Maybe you can't confirm it because of your Windows 7?
Ah, I'm sorry, it is not you, it is ts4242 wrote that he has W7.petermad wrote:I am using Xp SP3.Maybe you can't confirm it because of your Windows 7?