Tc Aezay Script question

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

User avatar
sas2000
Power Member
Power Member
Posts: 682
Joined: 2003-02-07, 04:32 UTC
Location: Galiza

Tc Aezay Script question

Post by *sas2000 »

 
Hi, i'm trying to maximize the space for photos in QuickView mode, hiding some Tc bars and setting Tc window divider to 88/12 at a 1152*864 screen.
I have modified a script by van Dusen and i got this :

#define VK_LBUTTON 1
#define VK_RBUTTON 2
#define VK_RETURN 13
#define VK_UP 38
#define VK_DOWN 40
SendCmd( cm_VisCurDir );
SendCmd( cm_VisButtonbar );
SendCmd( cm_FocusRight );
SendCmd( cm_LeftQuickview );
PostCmd(cm_Maximize);
PostCmd(cm_50percent);
// Set resolution to 1152*864 or edit next line
SetCursorPos(576, 432);
SendVKey(1, 1);
MoveCursor(440, 0);
SendVKey(1, 0);

The problem that i have found is on the last three lines of the script, i don't know how to keep left mouse button pressed while mouse cursor is moved 440 right, to be able to change Tc window divider from 50/50 to 88/12.
Thanks. 
 
 
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Not a solution for your problem but what about Context menu above the divider and use 80/20?

Just a thought.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
sas2000
Power Member
Power Member
Posts: 682
Joined: 2003-02-07, 04:32 UTC
Location: Galiza

Post by *sas2000 »

 
2Sheepdog:

The van Dusen script that i have modified is to set window divider to 80/20 using context menu, but i'd like 88/12. Thanks.
 
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

TC remembers the splitter setting each for quickview and normal view. So all you have to do is set the splitter and Configuration / Save Position.
I switched to Linux, bye and thanks for all the fish!
User avatar
sas2000
Power Member
Power Member
Posts: 682
Joined: 2003-02-07, 04:32 UTC
Location: Galiza

Post by *sas2000 »

 
2SanskritFritz:

Yes i knew it, but the problem is that i want to set Quickview mode to 88/12 only for photos, when i use Quickview mode with MsOffice files (Ieview&Quickviewplus 8.0) i need to be able to see the complete name of the files so that it must be set to 50/50.
Thanks.
 
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

with autohotkey you can achieve this with:

Code: Select all

!^P::
IfWinActive ahk_class TTOTAL_CMD
mousegetpos, merkx, merky
sleep, 100
MouseClick, left,  502,  536, 1, 0, D 
Sleep, 150
MouseClick, left,  881,  536, 1, 0, U
Sleep, 100
Mousemove, %merkx% , %merky%
return
This sets the hotkey to [Alt]+[Ctrl]+[p]. To know the actual position at your TC you'll have to use the 'AU3_Spy.exe'.

sheepdog
Last edited by Sheepdog on 2005-07-30, 18:56 UTC, edited 2 times in total.
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
sas2000
Power Member
Power Member
Posts: 682
Joined: 2003-02-07, 04:32 UTC
Location: Galiza

Post by *sas2000 »

 
Thank you very much Sheepdog, i'm going to try it.
 
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

If you do not "sleep, 150" after the mouseclick down for any reason the mouse does not stop at 88% but at 100%. Don't know why. So if you got trouble increase the sleep-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
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2Sheepdog
Yes! Another convert for AutoHotkey :-)
P.S. Maybe the MouseMove command can be used instead of the sleep.
I switched to Linux, bye and thanks for all the fish!
User avatar
sas2000
Power Member
Power Member
Posts: 682
Joined: 2003-02-07, 04:32 UTC
Location: Galiza

Post by *sas2000 »

 
I'm using Sheepdog AutoHotkey script and it works fine :lol: .
But i'd like to know if is it possible to do this :
On my Aezay script i use these commands
SendCmd( cm_VisCurDir );
SendCmd( cm_VisButtonbar );
to hide this Tc bars and so that i must have another script to unhide it.
But is it possible to know with AutoHotkey, if this bars are hidden or not or even if Quickview mode is activated or not to be able to use it with "IF Type commands" and then be able to use only 1 script ?
Thanks
 
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

sas2000,
Should be possible at least by looking at the state of the respective checkboxes in the config dialog. I'll try it and report back.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

sas2000,
to hide this Tc bars and so that i must have another script to unhide it.
Ahem - why another script?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
sas2000
Power Member
Power Member
Posts: 682
Joined: 2003-02-07, 04:32 UTC
Location: Galiza

Post by *sas2000 »

2Hacker:

Because i also change gamma

Quickview on :

Code: Select all

IfWinActive, ahk_class TTOTAL_CMD 
{ 
SetKeyDelay, 0
Run, gamma.exe 0.92, c:\utils, Min
PostMessage 1075, 2907, , , ahk_class TTOTAL_CMD
PostMessage 1075, 2901, , , ahk_class TTOTAL_CMD
PostMessage 1075, 304, , , ahk_class TTOTAL_CMD
mousegetpos, merkx, merky 
sleep, 100 
MouseClick, left,  579,  536, 1, 0, D 
Sleep, 150 
MouseClick, left,  141,  536, 1, 0, U 
Sleep, 100 
Mousemove, %merkx% , %merky% 
}
Return
Quickview off :

Code: Select all

IfWinActive, ahk_class TTOTAL_CMD 
{ 
SetKeyDelay, 0
Run, gamma.exe 0.44, c:\utils, Min
PostMessage 1075, 2907, , , ahk_class TTOTAL_CMD
PostMessage 1075, 2901, , , ahk_class TTOTAL_CMD
PostMessage 1075, 909, , , ahk_class TTOTAL_CMD
PostMessage 1075, 493, , , ahk_class TTOTAL_CMD
PostMessage 1075, 304, , , ahk_class TTOTAL_CMD
}
Return 
Thanks.
 
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

I changed the script that you can use it for activate and deactive quickview with hideing/unhiding Buttonbar and current Dir. You activate quickview with [Ctrl]+[alt]+[p] and deactivate with additional [Shift].

Code: Select all

^!P::
IfWinActive ahk_class TTOTAL_CMD
{
mousegetpos, merkx, merky,
PostMessage, 1075, 2907, , , ahk_class TTOTAL_CMD
PostMessage, 1075, 2901, , , ahk_class TTOTAL_CMD
PostMessage, 1075, 4002, , , ahk_class TTOTAL_CMD
PostMessage, 1075, 104, , , ahk_class TTOTAL_CMD

Sleep, 100
MouseClick, left,  502,  536, 1, 0, D ,
Sleep, 100
MouseClick, left, 881,  536, 1, 2, U,
Sleep, 100
Mousemove, %merkx% , %merky%,
}
return

^!+P::
IfWinActive ahk_class TTOTAL_CMD
{
PostMessage, 1075, 2907, , , ahk_class TTOTAL_CMD
PostMessage, 1075, 2901, , , ahk_class TTOTAL_CMD
PostMessage, 1075, 4002, , , ahk_class TTOTAL_CMD
PostMessage, 1075, 102, , , ahk_class TTOTAL_CMD
PostMessage, 1075, 909, , , ahk_class TTOTAL_CMD
}
return
You can send those TC-commands with autohotkey as well. The only thing you have to know is the code number. So I send :
2907=cm_viscurDir
2901=cm_VisButtonbar
4002=cm_focusright
104=cm_LeftQuickview
102=cm_leftlong
109=cm_50percent

If you want to get briefview when you restore the view the you'll have to replace the 1075, 102 by 1075, 101.

You also can choose another Hotkey it uis defined in the

Code: Select all

^!+p::
So look in autohotkey help or ask here again if you nedd another key.

HTH

sheepdog

BTW I did not find a way to check whether buttonbar/currentDir is enabled or not, but pressing the hotkey twice will toggle both.


[Edit]

If you checked your script work well you can place as much as you like in one single script.
[/Edit]
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
sas2000
Power Member
Power Member
Posts: 682
Joined: 2003-02-07, 04:32 UTC
Location: Galiza

Post by *sas2000 »

 
2Sheepdog:

If you checked your script work well you can place as much as you like in one single script.
Thanks i'll try it.
BTW I did not find a way to check whether buttonbar/currentDir is enabled or not

       :cry:
 
Post Reply