[Req] In-place filename renaming

English support forum

Moderators: Hacker, petermad, Stefan2, white

User avatar
Laplace
Junior Member
Junior Member
Posts: 16
Joined: 2005-10-13, 12:39 UTC
Location: Russia

Post by *Laplace »

SanskritFritz wrote: I got this idea from the forum, someone discovered this by accident, maybe BlackDog.
The word "hack" is suitable here. :)
TotalCmd 4ever!!!
User avatar
zweistein
Junior Member
Junior Member
Posts: 38
Joined: 2003-08-08, 09:49 UTC
Location: Gent, Belgium

Post by *zweistein »

SanskritFritz wrote:I got this idea from the forum, someone discovered this by accident, maybe BlackDog.
I know someone who did not so much by accident but by having more time to experiment with this and that :wink:. It must have been before the forum changed (after a crash or so) cause I can only find a summary.
No better solution still? That's all right, I found plenty of other useful tips scanning through the posts today...
User avatar
Laplace
Junior Member
Junior Member
Posts: 16
Joined: 2005-10-13, 12:39 UTC
Location: Russia

Another solution (Insert instead of space)

Post by *Laplace »

2 SanskritFritz:
Balderstrom wrote:@ SansskritFritz
RE: AutoIT Script
; (careful when selecting a folder, by default it calculates the size,
; which can be time consuming)

Anytime TC starts calc'ing a folder when I don't want...In my experience hitting [Esc] will stop it.
I have not read and tested your script yet...
But,
Why do you need to use space? Send "insert" button! It would not cause unwanted space calculation.
TotalCmd 4ever!!!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Send "insert" button!
By default, Insert moves down. Then I should move back, but if i'm at the end of the list, Ins didnt move down, and i get to the wrong file. Surely there is a message to send, but until there is real need for the script, i wont budge ;-)
I switched to Linux, bye and thanks for all the fish!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

It must have been before the forum changed (after a crash or so)
No, I dont think so, because I am only member in the new forum, i was not participating in the old one.
I switched to Linux, bye and thanks for all the fish!
User avatar
Xtrician
Senior Member
Senior Member
Posts: 412
Joined: 2005-04-24, 10:29 UTC
Location: Israel

Post by *Xtrician »

2Laplace
TC is like a perfect program. Its include all.
Every day im know new things.
Elad
User avatar
Laplace
Junior Member
Junior Member
Posts: 16
Joined: 2005-10-13, 12:39 UTC
Location: Russia

Post by *Laplace »

SanskritFritz wrote:By default, Insert moves down. Then I should move back, but if i'm at the end of the list, Ins didnt move down, and i get to the wrong file. Surely there is a message to send, but until there is real need for the script, i wont budge ;-)
Am I right that this code saves the current position:

Code: Select all

	ControlGetFocus sf_FocusedControl
	if (sf_FocusedControl != "TMyListBox1" and sf_FocusedControl != "TMyListBox2")
		Return

	SendMessage %LB_GETCURSEL%, 0, 0, %sf_FocusedControl%, ahk_class TTOTAL_CMD
	sf_Position := ErrorLevel
And this one restores it:

Code: Select all

	; Go back to the original position
	; The message was taken from Winspector
	SendMessage 0x19e, %sf_Position%, 0, %sf_FocusedControl%, ahk_class TTOTAL_CMD
?

If so, why do you need to return back after "insert" ?

It is not such a nice that this script won't work in the root directory.
Last edited by Laplace on 2005-10-25, 11:59 UTC, edited 1 time in total.
TotalCmd 4ever!!!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2Laplace
:lol:, I forgot my own code ;-)
You are right!


EDIT: so i updated the script in the wiki.
I switched to Linux, bye and thanks for all the fish!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

It is not such a nice that this script won't work in the root directory.
It works, if you set the option Display / Show parent dir also in root of drive
I switched to Linux, bye and thanks for all the fish!
User avatar
Laplace
Junior Member
Junior Member
Posts: 16
Joined: 2005-10-13, 12:39 UTC
Location: Russia

Post by *Laplace »

SanskritFritz wrote:It works, if you set the option Display / Show parent dir also in root of drive
You are right, but anyway, is there any way to check the if the first item is "[..]" ? Having [..] in the root looks unusual for me.
TotalCmd 4ever!!!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2Laplace
You are right, but anyway, is there any way to check the if the first item is "[..]" ? Having [..] in the root looks unusual for me.
There is definitely a way, i have to find an elegant way, one method could be to copy the first position to the clipboard and check it. I dont have much time at the moment, later i will return to the problem.
PS: on the other hand, it wont work then anyway, and besides, when was the last time you renamed a file in the root of any drive? ;-)
I switched to Linux, bye and thanks for all the fish!
User avatar
Laplace
Junior Member
Junior Member
Posts: 16
Joined: 2005-10-13, 12:39 UTC
Location: Russia

Post by *Laplace »

SanskritFritz wrote:PS: on the other hand, it wont work then anyway, and besides, when was the last time you renamed a file in the root of any drive? ;-)
You right.
Now I need to find time to install this script and to get accustomed to it.
TotalCmd 4ever!!!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2Laplace
In the meanwhile the script got so much polished, I might use it myself as well :lol:
I am as well annoyed by the inplace rename losing focus.
I switched to Linux, bye and thanks for all the fish!
Post Reply