Adapting the language in @confirm

BTW, since there is no @script... modifier necessary despite there not being a drop down selector for the scripting lang in the event editor - following question:
Is VBScript the standard in Dopus. So to speak, if no scripting language is specified, does Dopus assume VBScript as default?

The function is called OnClick because these entry points are primarily used in buttons and context menus, but as you see, they work in dragndrop situations as well. It does not fit so well here I agree, but once you know it's not an issue I guess.

Tooltips cannot be controlled via scripting, I actually wonder why the tooltip says "Copy to" at all, it's not that the script is executed beforehand to lookup what tooltip would fit the commands to run, so it's probably some hard coded thing currently for dragndrops combined with these OnClick-type buttons. This is a guess, Leo and Jon surely know better and will correct me if I'm wrong.

BTW, since there is no @script... modifier necessary

Interesting find, this is indeed a break to what the command editor offers elsewhere and it's not so obvious what to enter.
I think I see reasons for your initial confusion now. o)

(The drop-down in the normal Button Editor really just inserts a @script line behind the scenes; you can see it if you edit the button XML.)

If there is no @script language specified then Opus assumes you're using VBScript.

Ok, thx leo for the info.

Apart from that, I also found a way of how to fix the issue with the tool tip.
Here is the new code (1st and 2nd line added) which I am 100% happy at the moment:

[code]'Copy MOVEWHENSAME
@script:vbscript
Option Explicit
Function OnClick(ByRef clickData)
dim prompt, title, buttons
if StrComp(Dopus.language, "english", vbTextCompare) = 0 then
'case insensitive string compare; result is 0 if equal (how stupid!)
prompt = "Really move these file(s)?"
title = "Confirm drag'n drop"
buttons = "&Ok|&Abort"
elseif StrComp(Dopus.language, "deutsch", vbTextCompare) = 0 then
'case insensitive string compare; result is 0 if equal (how stupid!)
prompt = "Diese Datei(en) wirklich verschieben?"
title = "Drag'n drop bestätigen"
buttons = "&Ok|&Abbrechen"
else
MsgBox(Dopus.language & " is not supported")
exit function
end if

dim command : Set command = clickdata.func.command
dim dlg : Set dlg = command.Dlg
dlg.message = prompt
dlg.title = title
dlg.buttons = buttons
if dlg.show <> 1 then exit function
'DOpus.Output "Running the command.."
command.AddLine("Copy MOVEWHENSAME")
command.Run()
End Function[/code]
Thx for helping along the way, tbone.

of course the event editor should be set to "Script Function":


What is it that influences the tooltip, the commented line at the top?

Yes,
but I realized that the 2nd line "@script:vbscript" needs to be deleted again. I thought that it had worked at first but now it only works without it.

'Copy MOVEWHENSAME
must be the FIRST line, otherwise the tooltip does not work correctly

[quote="autocart"]Yes,
but I realized that the 2nd line "@script:vbscript" needs to be deleted again. I thought that it had worked at first but now it only works without it.[/quote]
So in effect this works correctly only with with VBScript. No other scripting language, as it seems to me now.