Tagger3 for DOpus12

Share script buttons and script add-ins to extend and modify Opus.
User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany

Re: Tagger3 for DOpus12

Postby kundal » 29 Nov 2016, 06:55

29.11.2016: Update to v3.2:
  • Tagger now follows the selection in the viewer in realtime with a 300ms delay.
  • Tagger and it's parent viewer window are now working correctly with FlatView.
  • Some changes to avoid script errors when a bad button code with the argument VIEWER was used. For example if you use Tagger VIEWER from a button in a lister toolbar without starting Tagger "embedded" (enclosed by square brackets) or without starting a viewer instance first you'll no longer get a script error. If a viewer window exists Tagger will close that window and behave as if the argument VIEWER wasn't given.

User avatar
tbone
Registered Opus Pro User
Posts: 2733
Joined: 13 Nov 2004, 21:12
OS: Windows 7 64-bit
Opus: Latest Beta
Location: Germany

Re: Tagger3 for DOpus12

Postby tbone » 29 Nov 2016, 11:33

Tested and it works! o) The Tagger GUI steals the focus from the viewer though, is that intentional?
That way you can only skip to next/prev via the viewer once, after that all input goes to the Tagger GUI.
I guess that can be quite handy for specific situations, for others it's not. Let me know what you think. o)

Thanks! o)
ScriptWizard SelectEx OverrideFormats SetVar LogCommand AutoVars Say CreateFolderEx ClipboardEx
GoRegistry RenameEx StartHidden ExtendedExif ModifiedWithin FileInfo CustomGrouping Link2Volume FileInfo

User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany

Re: Tagger3 for DOpus12

Postby kundal » 29 Nov 2016, 12:46

I'm glad Tagger no longer throws an error for you although it's still the same Show command. I only changed the order of arguments.

Basically it's intended that you navigate through files with the Tagger GUI and navigating with the Viewer is just an additional goodie. :)
The focus change is not intentional. The OnViewerEvent function creates a script variable that the timer event inside the dialog message loop detects to update the information. This forces the dialog to the foreground.
Unfortunately there's currently no good way to toggle the focus back to the viewer. The only VIEWERCMD argument I found that forces the focus to the viewer is Show VIEWERCMD=cmdbar which displays a FAYT-style command bar at the bottom of the viewer. A too dirty workaround to integrate it.
I really wish there would be an VIEWERCMD=foreground argument. :wink: => feature request

However, I'm quite happy with the focus change. It works great with mouse wheel or mouse click. For keyboard it's also fine if you want to watch one file after the other (how abr does) and immediately apply Tags or comment to them without having to toggle the focus manually somehow.

User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany

Re: Tagger3 for DOpus12

Postby kundal » 29 Nov 2016, 14:12

@tbone:
Are you aware that you can change the hotkeys for the next/prev buttons of the dialog in the script configuration? Currently they are alt++ / alt+NUM+ for next and alt+- /alt+NUM- for previous. I'll change the defaults with the next update so they can be pressed with one hand and it's more like the viewer hotkeys: alt+SPACE for next and ctrl+SPACE for previous. I think it doesn't make a big difference with these keys if you navigate with the viewer or with Tagger.

User avatar
tbone
Registered Opus Pro User
Posts: 2733
Joined: 13 Nov 2004, 21:12
OS: Windows 7 64-bit
Opus: Latest Beta
Location: Germany

Re: Tagger3 for DOpus12

Postby tbone » 29 Nov 2016, 19:12

kundal wrote:The OnViewerEvent function creates a script variable that the timer event inside the dialog message loop detects to update the information. This forces the dialog to the foreground.

Are you sure? It looks like the line dlg.Control("editrange").value = i+1 is the cause for the focus to move back to the Tagger GUI.
Maybe there is a way to prevent this? Jon/Leo do you have any opinion on this? Is the focus pull back required for something else to work?

kundal wrote:Are you aware that you can change the hotkeys for the next/prev buttons of the dialog in the script configuration?

Yes, I think. I'm just thinking that trying to duplicate the viewer hotkeys to navigate from the Tagger GUI makes less sense for me, as I'd loose all the other viewer functionality like zoom/delete/reset/crop and so on. I'd prefer if the Tagger GUI sits silently above the viewer, updating itself without interfering while I seek through the images. If I like to move over to tag/edit some image, I'd give it focus and do so, but until then I expect it to be passive.

Other users probably think different about the focus thing and it might be perfect for them. o) I might not be the Tagger power user but this talking gives me some insight on the new scripting possibilities as well, so it's very welcome and interesting, whatever the fnial outcome is! o)
ScriptWizard SelectEx OverrideFormats SetVar LogCommand AutoVars Say CreateFolderEx ClipboardEx
GoRegistry RenameEx StartHidden ExtendedExif ModifiedWithin FileInfo CustomGrouping Link2Volume FileInfo

User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany

Re: Tagger3 for DOpus12

Postby kundal » 30 Nov 2016, 00:56

It looks like the line dlg.Control("editrange").value = i+1 is the cause for the focus to move back to the Tagger GUI.
This line just initializes the update process. The event editchange in range input calls the function EditRange (and CheckSource) which calls the function UpdateDlg. The focus change seems to happen somewhere in UpdateDlg. I thought it's line 643 but it isn't. So applying changes to the dialog controls (name field, group control, listview, rating input) is most probably the reason for the focus change. I'll look into this. Would be nice to know how to toggle the focus from the viewer to the dialog because there's currently no documented way to do this with a single command.

User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany

Re: Tagger3 for DOpus12

Postby kundal » 30 Nov 2016, 01:19

It's line 768 that's steeling the focus. Comment it out and you should be fine.

User avatar
tbone
Registered Opus Pro User
Posts: 2733
Joined: 13 Nov 2004, 21:12
OS: Windows 7 64-bit
Opus: Latest Beta
Location: Germany

Re: Tagger3 for DOpus12

Postby tbone » 30 Nov 2016, 01:35

Lines 767-769 disabled and the GUI's still taking focus here, mhh? o)

Code: Select all

        ' Update Controls
        'dlg.Control("static1").label = GetString("various",lang) & cmd.sourcetab.selected.count & "/" & all & ")"
        'dlg.Control("static1").fg("220,51,39")
ScriptWizard SelectEx OverrideFormats SetVar LogCommand AutoVars Say CreateFolderEx ClipboardEx
GoRegistry RenameEx StartHidden ExtendedExif ModifiedWithin FileInfo CustomGrouping Link2Volume FileInfo

User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany

Re: Tagger3 for DOpus12

Postby kundal » 30 Nov 2016, 11:22

Ups, sorry I should always look up the lines in the original uploaded version. It's line 775-778. I'll move that lines to other places where it won't steel the focus.

Which hotkeys (of 64) do you think should be also available from the Tagger GUI? It's easy to make the hotkeys of the viewer also working from Tagger because except of "Image convert" they're all VIEWERCMD commands. The hotkeys with modifier would be the same and the single character keys needed for text input could work with the modifier alt or ctrl.

User avatar
tbone
Registered Opus Pro User
Posts: 2733
Joined: 13 Nov 2004, 21:12
OS: Windows 7 64-bit
Opus: Latest Beta
Location: Germany

Re: Tagger3 for DOpus12

Postby tbone » 30 Nov 2016, 13:09

Aha! Jetzt geht es! o)
Uhm, I meant, now it works as I like it, no more focus stealing when using the viewer to skip images, very good! o) Not sure about the hotkeys, what I use most often is pageup/down, fit to screen, 1:1, show information overlay, crop, save (as), delete, fullscreen toggle and mark.

Thanks! o)
ScriptWizard SelectEx OverrideFormats SetVar LogCommand AutoVars Say CreateFolderEx ClipboardEx
GoRegistry RenameEx StartHidden ExtendedExif ModifiedWithin FileInfo CustomGrouping Link2Volume FileInfo

User avatar
jon
GPSoftware
Posts: 7412
Joined: 04 Nov 2004, 02:40
OS: Windows 10 64-bit
Opus: Latest Beta
Location: Melbourne
Contact:

Re: Tagger3 for DOpus12

Postby jon » 30 Nov 2016, 13:34

What was causing the focus issue?

User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany

Re: Tagger3 for DOpus12

Postby kundal » 30 Nov 2016, 13:48

Setting the focus to the main edit control:

Code: Select all

    If dlg.Control("editrange").focus = False Then
        dlg.Control("editmain").focus = True
        dlg.Control("editmain").SelectRange len(dlg.Control("editmain").value),-1
    End If

User avatar
tbone
Registered Opus Pro User
Posts: 2733
Joined: 13 Nov 2004, 21:12
OS: Windows 7 64-bit
Opus: Latest Beta
Location: Germany

Re: Tagger3 for DOpus12

Postby tbone » 30 Nov 2016, 13:50

If I'm right it was this line (an edit control):

Code: Select all

dlg.Control("editmain").focus = True
Just from looking at it, I would not expect the whole GUI to get the focus, but..
ScriptWizard SelectEx OverrideFormats SetVar LogCommand AutoVars Say CreateFolderEx ClipboardEx
GoRegistry RenameEx StartHidden ExtendedExif ModifiedWithin FileInfo CustomGrouping Link2Volume FileInfo

User avatar
jon
GPSoftware
Posts: 7412
Joined: 04 Nov 2004, 02:40
OS: Windows 10 64-bit
Opus: Latest Beta
Location: Melbourne
Contact:

Re: Tagger3 for DOpus12

Postby jon » 30 Nov 2016, 14:05

If you give focus to a control the window it's in is activated automatically, that's just how Windows works.

User avatar
tbone
Registered Opus Pro User
Posts: 2733
Joined: 13 Nov 2004, 21:12
OS: Windows 7 64-bit
Opus: Latest Beta
Location: Germany

Re: Tagger3 for DOpus12

Postby tbone » 30 Nov 2016, 14:54

Okay! o)
ScriptWizard SelectEx OverrideFormats SetVar LogCommand AutoVars Say CreateFolderEx ClipboardEx
GoRegistry RenameEx StartHidden ExtendedExif ModifiedWithin FileInfo CustomGrouping Link2Volume FileInfo

User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany

Re: Tagger3 for DOpus12

Postby kundal » 09 Dec 2016, 05:22

09.12.2016: Update to v3.3:
  • Bugfix: Tagger is no longer steeling the focus when you change the currently displayed image from the viewer window.
  • Nearly all default hotkeys of the standalone viewer are also available from the Tagger GUI now. Several hotkeys needed to be modified with an additional modifier key. Download the file "TaggerHotkeys.txt" from the first post for a complete list of supported hotkeys.
  • Added "Myhotkey" and "MyCommand" to the script configuration. You can specify your own hotkey that executes a user defined command with these options.
  • To toggle the focus from the viewer to the Tagger GUI you can now create a new viewer hotkey that creates a global variable named "TaggerFocus". Tagger will detect this variable and move the focus to it's main input field. The command for the viewer hotkey is: @set glob!:TaggerFocus = True
  • Updated the first post to describe the new features. Below "Other features" there's also a description how to create a hotkey that toggles the focus between Viewer window and Tagger GUI using "TaggerFocus", "MyHotkey/MyCommand" and the command line tool "nircmd.exe".

haraalto
Registered Opus Pro User
Posts: 2
Joined: 14 Jan 2017, 08:18
OS: Windows 10 64-bit
Opus: Directory Opus 12

Re: Tagger3 for DOpus12

Postby haraalto » 14 Jan 2017, 08:44

I have difficulties to get this script up and running. Im quite novice with these things so it might be that I have made very simple mistake. I have succeeded to load the script:
Picture2jpg.jpg
Picture2jpg.jpg (14.27 KiB) Viewed 1262 times


I have tried to attach hotkey Alt + T to the script by following the instructions:
Picture1jpg.jpg
Picture1jpg.jpg (159.27 KiB) Viewed 1262 times


But as end result I receive only error messages:
Picture3jpg.jpg
Picture3jpg.jpg (14.16 KiB) Viewed 1262 times
.

Obviously I have done something wrong but I cannot figure out what. Could you help me with this?

User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany

Re: Tagger3 for DOpus12

Postby kundal » 14 Jan 2017, 17:05

I couldn't reproduce the exact error you got but you definitely made something wrong.
- It doesn't make sense to define a system-wide hotkey for Tagger because the command won't do anything if there is no open lister window.
- To start Tagger from a viewer window create a Viewer-hotkey.
- To start Tagger from a lister you'll have to select a file and open a viewer window first using the "Show" command. To do this create a Lister-hotkey with the "embedded command" I provided at the starting post. In the command editor click the "Advanced..." button to be able to paste the multi-line command. It should look like this:

Tagger hotkey.jpg
Tagger hotkey.jpg (64.49 KiB) Viewed 1252 times

haraalto
Registered Opus Pro User
Posts: 2
Joined: 14 Jan 2017, 08:18
OS: Windows 10 64-bit
Opus: Directory Opus 12

Re: Tagger3 for DOpus12

Postby haraalto » 28 Jan 2017, 11:51

Thanks from fast reply. I have tried to set up the Tagger according to instruction but so far I have not succeeded.

Now the Script looks like this:
Alt T.png
Alt T.png (30 KiB) Viewed 1124 times


When I press Alt + T when file is selected from Lister, the command opens image viewer not Tagger as I expected:
Image viewer.png
Image viewer.png (68.38 KiB) Viewed 1124 times



However the Scrip is visible in the Script list and Im able to configure it normally:
Scripts.png
Scripts.png (4.55 KiB) Viewed 1124 times


Have you got any further proposals how I should proceed?

User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany

Re: Tagger3 for DOpus12

Postby kundal » 28 Jan 2017, 17:56

You are using FILTER=grp:images and the selected file is *.pdf. PDF-files are not in the file type group "images" by default. If there's no file matching your filter in the current folder Tagger will do nothing.
Try FILTER=grp:documents or FILTER=*.pdf instead or delete the whole filter argument to make it working with all file types.


Return to “Script Buttons & Add-Ins”