pspad: -------------------------------------------------------------------------------- To get content of %File%, %DIR% e.t.c. you need to have open any file in PSPad, cause variable returns file related information --------------------------------------------------------------------------------
It's what i did. I use it like on "Highlighters Settings --> External applications", and there it works fine. I added Professor Bernd code to mine : ------------------- public sub AA_TEST_VARIABLES() Dim sMsg sMsg = _ "PSPath: " & getVarValue("%PSPath%") & vbCRLF & vbCRLF _ & "File: " & getVarValue("%File%") & vbCRLF & vbCRLF _ & "Dir: " & getVarValue("%Dir%") & vbCRLF & vbCRLF _ & "Name: " & getVarValue("%Name%") & vbCRLF & vbCRLF _ & "SelText: " & getVarValue("%SelText%") & vbCRLF & vbCRLF _ & "FullFileName: " & getVarValue("%FullFileName%") & vbCRLF & vbCRLF _ & "ShortFileName: " & getVarValue("%ShortFileName%") & vbCRLF & vbCRLF _ & "FilePath: " & getVarValue("%FilePath%") & vbCRLF & vbCRLF _ & "FileName: " & getVarValue("%FileName%") & vbCRLF & vbCRLF _ & "File: " & getVarValue("%File%") & vbCRLF & vbCRLF _ & "Ext: " & getVarValue("%Ext%") & vbCRLF & vbCRLF _ & "HomePath: " & getVarValue("%HomePath%") & vbCRLF & vbCRLF _ & "UserProfile: " & getVarValue("%UserProfile%") & vbCRLF & vbCRLF _ & "AppData: " & getVarValue("%AppData%") & vbCRLF & vbCRLF _ & "Temp: " & getVarValue("%Temp%") & vbCRLF & vbCRLF _ & "WinDir: " & getVarValue("%WinDir%") & vbCRLF & vbCRLF _ _ & "module_name: " & module_name & vbCRLF & vbCRLF _ & "moduleFileName: " & moduleFileName(module_name) & vbCRLF & vbCRLF _ & "modulePath: " & modulePath() & vbCRLF & vbCRLF _ & "" Echo(sMsg) End Sub ---------------------- It returns : PSPath: D:\program-files\pspad\ File: DCM_PSPad-script_Externe Dir: Name: SelText: FullFileName: D:\program-files\pspad\Script\VBScript\DCM_PSPad-script_Externe.vbs ShortFileName: D:\PROGRA~1\pspad\Script\VBScript\DCM_PS~2.VBS FilePath: D:\program-files\pspad\Script\VBScript\ FileName: DCM_PSPad-script_Externe.vbs File: DCM_PSPad-script_Externe Ext: .vbs HomePath: \Users\Greg UserProfile: C:\Users\Greg AppData: C:\Users\Greg\AppData\Roaming Temp: C:\Users\Greg\AppData\Local\Temp WinDir: C:\WINDOWS module_name: DCM_PSPad-script_Externe moduleFileName: D:\program-files\pspad\Script\VBScript\DCM_PSPad-script_Externe.vbs modulePath: D:\program-files\pspad\Script\VBScript\ -- <https://forum.pspad.com/read.php?6,74664,74697> PSPad freeware editor https://www.pspad.com