Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

A very simple script lua failing

Community Beginner ,
May 06, 2025 May 06, 2025

Hi, this is a simple script lua to verifiy loading test plugin in lightroom. It returns ...nothing:

 

-- main.lua (test de notification simple et correct)
local LrApplication = import 'LrApplication'
local LrFunctionContext = import 'LrFunctionContext'
local LrDialogs     = import 'LrDialogs'

function onPluginLoaded(plugin)
  LrFunctionContext:postUserNotification({
    title = 'Test de Notification (Nouveau Format)',
    message = 'Le plugin de test a été chargé avec le nouveau format Info.lua.',
  })
end

LrDialogs.message("Début main")
return {
  onPluginLoaded = onPluginLoaded,
}

 

 

et le fichier info.lua: 

-- Info.lua
return {
  LrSdkVersion = 6.0, -- Ou une version plus récente
  LrToolkitIdentifier = "com.example.simple-caller",
  LrPluginName = "SimpleCaller",
  LrPluginInfoString = "Appelle un script simple",
  LrPluginRequiredAgExports = {},
  LrLibraryMenuItems = {
        {
            title = "Appel simple...",
            file = "main.lua", -- Fichier qui sera exécuté
            enabled = "requireSelection",
        },
    },
}

, thank you for help 

TOPICS
macOS , SDK
335
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 06, 2025 May 06, 2025

When I make a plugin with those two files, add the plugin to File > Plug-in Manager, and then do the menu command Library > Plug-in Extras > Appel Simple..., I see the message:

johnrellis_0-1746555694156.png

 

Was this generated by AI, by any chance?  There are numerous things in those two files that aren't even close to being correct. Trying to use AI to get started with LR plugin development is a waste of time, in my opinion.  See here for tips on how to get started:

https://community.adobe.com/t5/lightroom-classic-discussions/sample-code-for-a-publish-service/m-p/7592483#M164982

Translate
LEGEND ,
May 06, 2025 May 06, 2025

When I make a plugin with those two files, add the plugin to File > Plug-in Manager, and then do the menu command Library > Plug-in Extras > Appel Simple..., I see the message:

johnrellis_0-1746555694156.png

 

Was this generated by AI, by any chance?  There are numerous things in those two files that aren't even close to being correct. Trying to use AI to get started with LR plugin development is a waste of time, in my opinion.  See here for tips on how to get started:

https://community.adobe.com/t5/lightroom-classic-discussions/sample-code-for-a-publish-service/m-p/7...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 06, 2025 May 06, 2025
LATEST

thank you John i will follow your advice and read carefully these documents, as you say maybe it's worth wasting two hours reading that and understanding it instead of expecting an operationnal script without understanding anything...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines