[TC Tool] TC Script Editor

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Alya
Junior Member
Junior Member
Posts: 58
Joined: 2005-01-19, 02:41 UTC

Post by *Alya »

2Sheepdog

Thank you very much!! :)

I compiled your script into exe and it works.

Is there any way to set a default search path? It starts the search in "My Documents" folder, but I'd rather have it start in root of the drive.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Have another look at my post .

Code: Select all

send, {Tab} c:\+{Tab}
in the lines after the "PostMessage" command will set the searchpath to c:\ and go back to the search for field.

Of course you'll have to recompile the script. But if you want to modify the script I recommend to associate the AHK extension to Autohotkey. Thus you can run the script and test if it works without conpiling each and every time.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Alya
Junior Member
Junior Member
Posts: 58
Joined: 2005-01-19, 02:41 UTC

Post by *Alya »

2Sheepdog

Sorry - I had a bit of "information overload" after reading your script, so the part underneath didn't register :)

I inserted the command on the line after "PostMessage" and it works fine now, starting in the root of the drive. Thank you :)
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

PostMessage, 1075, 501, , , ahk_class TTOTAL_CMD ; Send cm_searchfor
I know how to call TC internal commmands in AutoHotkey now.
BTW, what is it in AutoIt?
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

BTW, what is it in AutoIt?
What do you mean? It is the same, just the syntax is different.
I switched to Linux, bye and thanks for all the fish!
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

I guess that is what Raymond is interested in: The different syntax (to send a command to TC).

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

SanskritFritz wrote:
BTW, what is it in AutoIt?
What do you mean? It is the same, just the syntax is different.
I mean how to call TC internal commanders in AutoIt? As like use PostMessage in AutoHotkey.
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

I mean how to call TC internal commanders in AutoIt? As like use PostMessage in AutoHotkey.
Oh, sorry, I forgot that there is no PostMessage in AutoIt3. See please this thread: http://ghisler.ch/board/viewtopic.php?t=6891
I switched to Linux, bye and thanks for all the fish!
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

SanskritFritz wrote:See please this thread: http://ghisler.ch/board/viewtopic.php?t=6891
Yeah! This

Code: Select all

$hwnd = WinGetHandle("Total Commander") 
DllCall("user32.dll", "int", "SendMessage", "hwnd", $hwnd , "int" , 1075 , "int", 690 )
is what I'm looking for. Thank you!

But I found a strang thing. For example:

Code: Select all

$hwnd = WinGetHandle( "Total Commander" )
DllCall( "user32.dll", "int", "SendMessage", "hwnd", $hwnd , "int" , 1075 , "int", 1005 )    ; cm_MoveOnly
Send ( "{BS}" )
I want to send cm_MoveOnly to TC, and when Move diaglogbox comes up, press BACKSPACE key to delete the pre_filled filename. But "Send" function doesn't work. The Move diaglogbox simply stop there. Did I miss something?
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Did I miss something?
Yes, you have to wait for the dialog to appear with the WinWait or the WinWaitActive function.
I switched to Linux, bye and thanks for all the fish!
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

SanskritFritz wrote:Yes, you have to wait for the dialog to appear with the WinWait or the WinWaitActive function.
Sorry, I still have trouble here. This is my script:

Code: Select all

$hwnd = WinGetHandle( "Total Commander" )
DllCall( "user32.dll", "int", "SendMessage", "hwnd", $hwnd , "int" , 1075 , "int", 509 )
; cm_UnpackFiles

If WinWait( "Unpack files" ) Then
Send ( "{BS}" )
Send ( "{ALT down}" )
Send ( "s" )
Send ( "{ALT up}" )
Send ( "{ENTER}" )
Endif
It's supposed to unpack each archive to a separate subdir in the current folder. But when Pack dialog appears, the script simply hold on there. The interesting thing is, if you cancel the dialog and make it appear again, the rest of the script will go on and work fine.
What can I do to deal with this?
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

It looks like after this lines executed,

Code: Select all

$hwnd = WinGetHandle( "Total Commander" ) 
DllCall( "user32.dll", "int", "SendMessage", "hwnd", $hwnd , "int" , 1075 , "int", 509 ) 
; cm_UnpackFiles 
DllCall doesn't end itself and hold on itself there. So the following lines can't go on.
Is there a way to solve this problem?
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2Raymond
You should try PostMessage instead. The difference is, that SendMessage waits for the result, PostMessage returns immediately without waiting. It is possible, that AI3 has problems with the synchronous SendMessage call.
I switched to Linux, bye and thanks for all the fish!
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

SanskritFritz wrote:2Raymond
You should try PostMessage instead. The difference is, that SendMessage waits for the result, PostMessage returns immediately without waiting. It is possible, that AI3 has problems with the synchronous SendMessage call.
But as you know, there is no PostMessage in AutoIt3.
Is there any other way?
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

$hwnd = WinGetHandle( "classname=TTOTAL_CMD" )
DllCall( "user32.dll", "int", "PostMessage", "hwnd", $hwnd , "int" , 1075 , "int", 509 )
; cm_UnpackFiles
;-)
I switched to Linux, bye and thanks for all the fish!
Post Reply