Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.
Moderators: Hacker , petermad , Stefan2 , white
Stefan2
Power Member
Posts: 4281 Joined: 2007-09-13, 22:20 UTC
Location: Europa
Post
by *Stefan2 » 2016-06-13, 14:28 UTC
Ovg wrote: 2
Stefan2
Thank a lot for a cool script!
You're welcome, but I have only adjusted an existent script.
tosbsas
Senior Member
Posts: 428 Joined: 2003-12-19, 13:12 UTC
Location: Lima, Perú
Contact:
Post
by *tosbsas » 2016-06-13, 15:05 UTC
New - edited script and 500 fixed it perfectly (:-))
A New Generation transformed by the Power of God
tuska
Power Member
Posts: 4046 Joined: 2007-05-21, 12:17 UTC
Post
by *tuska » 2016-06-16, 13:07 UTC
2Stefan2
At the moment we have TC 9.0 ß2 and files for beta2, i.e. totalcmd.exe + totalcmd64.exe show version-no. 9.0.0.0
Therefore I have adopted your code for me to:
if(v_TCVersion = "9.0.0.0")
v_TCVersion = 9.0b2
Do you think there is a possibility that you can change your code, that we could get this automatically?
Suggestion:
Please edit your code and change
FROM: SetTimer subTimer, 60000 ; 60000 are 60 seconds update cycle.
TO: SetTimer subTimer, 500 ; 500 are 0.5 seconds update cycle.
Reason: I think that every user who wants to use this code will finally work with parameter "500",
as if TC is minimized and then expanded, the user is NOT shown again.
tuska
Power Member
Posts: 4046 Joined: 2007-05-21, 12:17 UTC
Post
by *tuska » 2016-07-13, 10:28 UTC
Due to Norton Internet Security (missing entries in context menu in TC) I had to rename TOTALCMD64.EXE to Explorer.exe.
Please, what must adapted here or elsewhere to get the correct name (x64) in TC's Title bar :
Code: Select all
;//Get the Bit Bittness Architecture:
; TOTALCMD.EXE
;TOTALCMD64.EXE
StringRight, vLastSix, v_TCExePath, 6 ; cm.exe OR 64.exe
StringLeft, vFirstTwo, vLastSix , 2 ; cm OR 64
if(vFirstTwo=64)
vBit = (x64)
else
vBit = (x86)
I am not a programmer and could not get it to work.
Regards
Karl
Stefan2
Power Member
Posts: 4281 Joined: 2007-09-13, 22:20 UTC
Location: Europa
Post
by *Stefan2 » 2016-07-13, 11:40 UTC
tuska wrote: Due to Norton Internet Security (missing entries in context menu in TC) I had to rename TOTALCMD64.EXE to Explorer.exe.
Please, what must adapted here or elsewhere to get the correct name (x64) in TC's Title bar :
Code: Select all
;//Get the Bit Bittness Architecture:
; TOTALCMD.EXE
;TOTALCMD64.EXE
StringRight, vLastSix, v_TCExePath, 6 ; cm.exe OR 64.exe
StringLeft, vFirstTwo, vLastSix , 2 ; cm OR 64
if(vFirstTwo=64)
vBit = (x64)
else
vBit = (x86)
I am not a programmer and could not get it to work.
Regards
Karl
If you had renamed "TOTALCMD64.EXE" to "Explorer.exe",
there is no '64' part anymore to extract for to detect the 64-bit executable.
; TOTALCMD.EXE
;TOTALCMD
64 .EXE
So we need another detection method. I don't know of any at the moment. So I am out.
Dalai
Power Member
Posts: 9948 Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)
Post
by *Dalai » 2016-07-13, 11:47 UTC
2Stefan2
How about using the current title of the TC window? If there's a "x64" in there, it's x64, otherwise it's x86.
Regards
Dalai
tuska
Power Member
Posts: 4046 Joined: 2007-05-21, 12:17 UTC
Post
by *tuska » 2016-07-13, 12:32 UTC
2Stefan2
If one could read the file properties of 'Explorer.exe': The original filename is shown under 'Details' (Windows 10 Pro).
Regards
Karl
Stefan2
Power Member
Posts: 4281 Joined: 2007-09-13, 22:20 UTC
Location: Europa
Post
by *Stefan2 » 2016-07-13, 12:48 UTC
Good idea, Dalai, 'using the current title'.
untested:
Code: Select all
;//Get the Bit Bittness Architecture:
;WinGetTitle, OutputVar [, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinGetTitle, vTCTitle , Total Commander
;Total Commander - Name
;Total Commander (x64) - Name
vBit = (x86)
;IfInString, var, SearchString
IfInString, vTCTitle, (x64)
vBit = (x64)
no time to test....
Don't work "Explorer64.exe" as name?
tuska
Power Member
Posts: 4046 Joined: 2007-05-21, 12:17 UTC
Post
by *tuska » 2016-07-13, 13:01 UTC
2Stefan2
Your code works perfectly for me under x86 and x64!
Many thanks for your prompt efforts and solution!
2Dalai
Thank you too for your idea and input!
Regards,
Karl
tuska
Power Member
Posts: 4046 Joined: 2007-05-21, 12:17 UTC
Post
by *tuska » 2016-07-13, 13:28 UTC
Stefan2 wrote: Don't work "Explorer64.exe" as name?
Yes, but then there are missing entries in context menu in TC which is caused from Norton Internet Security software.
The name must be (exactly!):
Explorer.exe (case sensitiv!)
Regards
Karl
tuska
Power Member
Posts: 4046 Joined: 2007-05-21, 12:17 UTC
Post
by *tuska » 2016-07-13, 22:53 UTC
Just for completeness I would like to point out - with regard to get the correct name (x64, x86) in TC's Title bar -
that this code:
http://ghisler.ch/board/viewtopic.php?p=312713#312713 works only for one(!) TC-instance !
If you open another TC-instance you will get the same name (x64, x86) of the previous opened TC in TC's Title bar.
Example:
TC x64 is opened
TC x32 will be opened afterwards
TC's Title bar shows "x64" for both instances. => For TC x32 this is not correct!
Regards
Karl
randysejas
Junior Member
Posts: 30 Joined: 2016-02-27, 14:12 UTC
Post
by *randysejas » 2020-04-30, 16:02 UTC
You could also start both apps from a batch:
Start "" Totalcmd
Start "" AutoHotkey script.ahk
How can i do that?... i put these lines in wincmd.ini??
Stefan2
Power Member
Posts: 4281 Joined: 2007-09-13, 22:20 UTC
Location: Europa
Post
by *Stefan2 » 2020-04-30, 17:33 UTC
randysejas wrote: 2020-04-30, 16:02 UTC
You could also start both apps from a batch:
Start "" Totalcmd
Start "" AutoHotkey script.ahk
How can i do that?... i put these lines in wincmd.ini??
Here a MS-DOS Batch is meant (a plain text file with DOS commands and with *.bat or *.cmd extension)
Example batch file
LauchTCandAHK.cmd Code: Select all
@ECHO OFF
Start "" "D:\rive\path to\Totalcmd\Totalcmd.exe"
timeout /T 30
Start "" "D:\rive\path to\AutoHotkey\AutoHotkey.exe" "D:\rive\path to\AutoHotkey\script.ahk"
PAUSE
For the syntax open a DOS-Box (cmd.exe) and type
timeout /? or
start /? ...and execute with Enter key.