New command cm_UpdateQuickViewWindow
Moderators: Hacker, petermad, Stefan2, white
- Vochomurka
- Power Member
- Posts: 816
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
New command cm_UpdateQuickViewWindow
In the quick view mode, when the file is updated by an external program, its quick view is not updated automatically, and that's reasonable. But the only way to see the updated view is to move cursor up & down (or down & up), or give the cm_SrcQuickview command twice - both ways are not handy. Moreover, they are not easy to be realized in scripts. Finally, the cm_RereadSource command does not update the view either.
Is it possible to implement the cm_UpdateQuickViewWindow command or to add a new function to the cm_RereadSource?
Is it possible to implement the cm_UpdateQuickViewWindow command or to add a new function to the cm_RereadSource?
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
F2 should work when the cursor is on the quick view panel.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- Vochomurka
- Power Member
- Posts: 816
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
2ghisler(Author)
It doesn't. I've noticed this behaviour when using the following command:It calls IrfanView to rotate clockwise an image file under cursor. You can test it.
Even if it works, one should press three keys: Tab, F2, Tab. I suggest to press one. Is it difficult to implement the requested command?
It doesn't. I've noticed this behaviour when using the following command:
Code: Select all
[em_RotateImageClockwise]
button=e:\Storage\Graphics\Icons\User\Decr.ico
cmd=e:\Graphics\Viewers\Irfan\i_view32.exe
param=%P%N /rotate_r /convert=%P%N
menu=Rotate Image Clockwise (Right)
Even if it works, one should press three keys: Tab, F2, Tab. I suggest to press one. Is it difficult to implement the requested command?
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
It seems that TC itself is "eating" the F2 key, which is used to refresh the current directory, sorry. I will check whether I can use it for Quick View too.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- Vochomurka
- Power Member
- Posts: 816
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
I've found a solution of my problem. First, I have already a command from this post. Further, I created the following button:That is, the button first executes the Irfan command to rotate an image clockwise, then switches Quick View (usually off), and immediately switches it back (on). Image view is therefore updated, and almost no Quick View window blinking appears! (for the counterclockwise rotation the pocedure is similar).
2ghisler(Author)
1) It is still desirable to implement the requested command cm_UpdateQuickViewWindow;
2) Do you plan to add the multiple commands support not only in buttons, but in user commands, too?
Code: Select all
TOTALCMD#BAR#DATA
em_RotateImageClockwise,304,304
e:\Storage\Graphics\Icons\Downloaded\Clockwise-Green.ico
Rotate Image Clockwise with Refresh
0
10336
2ghisler(Author)
1) It is still desirable to implement the requested command cm_UpdateQuickViewWindow;
2) Do you plan to add the multiple commands support not only in buttons, but in user commands, too?
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander
- Vochomurka
- Power Member
- Posts: 816
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
I've already done this with PowerPro scripts. I just would like this property to be realized by TC internally.
BTW, my above solution is not perfect: for the first time the Quick View panel is not updated, but it is for 2nd and subsequent command executions
BTW, my above solution is not perfect: for the first time the Quick View panel is not updated, but it is for 2nd and subsequent command executions
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander
- Vochomurka
- Power Member
- Posts: 816
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
As I have requested, the new cm_UpdateQuickView is added in TC9.0. But for my purpose it still doesn't work. My script is (in PowerPro):Script takes two parameters: first is %P%N and second is "L" (rotate counterclockwise) or "R" (clockwise). 2946 is a numeric code for the cm_UpdateQuickView command.
But after the script execution the quick view panel is not updated! Although the script works, that can be visualized by moving cursor up/down or down/up, or by loading the image into the separate IrfanView window and refreshing the view.
Moreover, if I rotate the image from the Irfan window, save the file, and then switch back to the TC window, I don't see any quick view update either.
Chaining command to execute script with 2946 (with or without executing #2946 from the script) gives the same effect: script works, image is rotated, but the quick view window is not updated.
So, what is the application field of the new cm_UpdateQuickView command? How is it supposed to use it?
Code: Select all
args Obj, Dir
local hwnd = win.handle("c=TTOTAL_CMD")
local Irfan = "c:\Graphics\Viewers\Irfan\i_view64.exe"
local Option = " /jpg_rotate=(" ++ ifelse(Dir == "L", "5", "3") ++ ",0,0,0,0,0,0,0)"
local Str = Obj ++ Option ++ " /convert=" ++ Obj
file.runwait(0, Irfan, Str)
win.sendmessage(hwnd, 0x400+51, 2946, 0)
But after the script execution the quick view panel is not updated! Although the script works, that can be visualized by moving cursor up/down or down/up, or by loading the image into the separate IrfanView window and refreshing the view.
Moreover, if I rotate the image from the Irfan window, save the file, and then switch back to the TC window, I don't see any quick view update either.
Chaining command to execute script with 2946 (with or without executing #2946 from the script) gives the same effect: script works, image is rotated, but the quick view window is not updated.
So, what is the application field of the new cm_UpdateQuickView command? How is it supposed to use it?
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Hmm, cm_UpdateQuickView works for me with some plugins I tried - I issued cm_UpdateQuickView from the command line after editing a file, and the lister plugin picked it up. What plugin are you trying to refresh? Maybe the plugin doesn't really support it?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com