Skip to main content
johnrellis
Legend
November 21, 2023

P: SDK: catalog:triggerImportUI() doesn't open Import with the supplied path on Windows

  • November 21, 2023
  • 11 replies
  • 1324 views

On Windows, the method catalog:triggerImportUI (path) opens the Import window but doesn't set the initial source to "path". It works correctly on Mac.

 

To reproduce on LR 13.0.1 / Windows 11:

 

1. Save this script to the file "test-import.lua":

 

local path = import "LrPathUtils".getStandardFilePath ("home")
import "LrDialogs".message (path)
local catalog = import "LrApplication".activeCatalog()
catalog:triggerImportUI (path)

 

 

2. In LR, do Scripts > Open User Scripts Folder and place "test-import.lua" in that folder.

 

3. Restart LR.

 

4. Do Scripts > test-import and observe that the Import window opens but no source is selected in the Source panel.  The Windows 11 result is on the left, Mac OS 14.1 on the right:

 

  

 

 

This topic has been closed for replies.

11 replies

Participating Frequently
November 21, 2023

In a simple UrlHandler.lua script, I would like the import to select a default directory.

The script initiates an import, but no directory is selected.

 

path = 'D:\\DNG Import';

local application = import 'LrApplication';
local catalog = application.activeCatalog();
catalog:triggerImportUI( path );

 

Lightroom Classic-versie: 13.0.1
Besturingssysteem: Windows 10 - Business Edition
Versie: 10.0.19045
Toepassingsarchitectuur: x64
Systeemarchitectuur: x64

johnrellis
Legend
November 22, 2023