SetFileOpenDlgTitle


The SetFileOpenDlgTitle function changes the title of all subsequent File > Open dialogs. The change persists until the function is called again or the script ends.

Syntax

SetFileOpenDlgTitle( sTitle )

bullet.gif    where sTitle is a string to be used as the new title.

Remarks

Before setting the title using this method, is may be useful to fetch the current title using the companion GetFileOpenDlgTitle. This allows the dialog title to be restored. For example, you may specify the type of file to open in the dialog title during one use, then restore the title to "Open" afterward.

Example

This script sets the dialog title on 2 occasions, then restores it to the default.

sOldTitle = GetFileOpenDlgTitle()

-- fetch the original title

SetFileOpenDlgTitle("Pick Image 1")

-- set a new title

sName1 = GetFileName()

-- uses the new title

  ...

 

SetFileOpenDlgTitle("Pick Image 2")

-- change the title again

sName2 = GetFileName()

-- uses the second title

  ...

 

SetFileOpenDlgTitle(sOldTitle)

-- restore the original title

Related Topics

GetFileOpenDlgTitle, SetFileSaveDlgTitle, GetFileName


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.