Now, a solution...
Reading a information from the Windows Registrer
QA$ = "HKEY_CURRENT_USER\Software\Corel\CorelDRAW Home & Student\18.0\PPHome\Application Preferences\Framework\RecentFiles"
(here I want to get the list of last opened files in CorelDRAW Home & Student)
Of course you can change with an other information from Register (use Regedit to select it)
This little program does not Write, only read, in the Register:
QA$ = "HKEY_CURRENT_USER\Software\Corel\CorelDRAW Home & Student\18.0\PPHome\Application Preferences\Framework\RecentFiles"
AB$ = RegisterRead$(QA$)
Print "--->"; AB$; "<--": Sleep
stop
Function RegisterRead$ (QA$)
FS2$ = Chr$(13) + Chr$(10):
fs1$ = "Dim WSCRA" + FS2$ + "On Error Resume Next" + FS2$ + "Set WSCRA = CreateObject(²WScript.Shell²)" + FS2$
fs1$ = fs1$ + "RegKeyRead = WSCRA.RegRead(²" + QA$ + "²)" + FS2$
fs1$ = fs1$ + "Set WSCRI = CreateObject(²Scripting.FileSystemObject²).OpenTextFile(²Temp_result.txt²,2,true)" + FS2$
fs1$ = fs1$ + "WSCRI.WriteLine(RegKeyRead)" + FS2$ + "WSCRI.Close" + FS2$ + "Set WSCRI = Nothing" + FS2$
fs1$ = fs1$ + "Set Wshell=nothing" + FS2$ + "Set WSCRA=nothing" + FS2$ + "On error goto 0":
fsU: J = InStr(fs1$, "²"): If J > 0 Then Mid$(fs1$, J, 1) = Chr$(34): GoTo fsU
ficvbs$ = _CWD$ + "\TEMP_FS.vbs": channel% = FreeFile: Open ficvbs$ For Output As channel%
Print #1, fs1$: Close channel%
_Delay 0.1: Shell "cscript //NoLogo " + ficvbs$: _Delay .2: Kill ficvbs$
ficdon$ = _CWD$ + "\TEMP_RESULT.TXT": channel% = FreeFile: Open ficdon$ For Input As channel%
YY$ = "": While Not EOF(channel%): Line Input #channel%, DDD$: YY$ = YY$ + DDD$ + FS2$
Wend: Close channel%: Kill ficdon$
RegisterRead$ = Left$(YY$, Len(YY$) - 2)
End Function
Reading a information from the Windows Registrer
QA$ = "HKEY_CURRENT_USER\Software\Corel\CorelDRAW Home & Student\18.0\PPHome\Application Preferences\Framework\RecentFiles"
(here I want to get the list of last opened files in CorelDRAW Home & Student)
Of course you can change with an other information from Register (use Regedit to select it)
This little program does not Write, only read, in the Register:
QA$ = "HKEY_CURRENT_USER\Software\Corel\CorelDRAW Home & Student\18.0\PPHome\Application Preferences\Framework\RecentFiles"
AB$ = RegisterRead$(QA$)
Print "--->"; AB$; "<--": Sleep
stop
Function RegisterRead$ (QA$)
FS2$ = Chr$(13) + Chr$(10):
fs1$ = "Dim WSCRA" + FS2$ + "On Error Resume Next" + FS2$ + "Set WSCRA = CreateObject(²WScript.Shell²)" + FS2$
fs1$ = fs1$ + "RegKeyRead = WSCRA.RegRead(²" + QA$ + "²)" + FS2$
fs1$ = fs1$ + "Set WSCRI = CreateObject(²Scripting.FileSystemObject²).OpenTextFile(²Temp_result.txt²,2,true)" + FS2$
fs1$ = fs1$ + "WSCRI.WriteLine(RegKeyRead)" + FS2$ + "WSCRI.Close" + FS2$ + "Set WSCRI = Nothing" + FS2$
fs1$ = fs1$ + "Set Wshell=nothing" + FS2$ + "Set WSCRA=nothing" + FS2$ + "On error goto 0":
fsU: J = InStr(fs1$, "²"): If J > 0 Then Mid$(fs1$, J, 1) = Chr$(34): GoTo fsU
ficvbs$ = _CWD$ + "\TEMP_FS.vbs": channel% = FreeFile: Open ficvbs$ For Output As channel%
Print #1, fs1$: Close channel%
_Delay 0.1: Shell "cscript //NoLogo " + ficvbs$: _Delay .2: Kill ficvbs$
ficdon$ = _CWD$ + "\TEMP_RESULT.TXT": channel% = FreeFile: Open ficdon$ For Input As channel%
YY$ = "": While Not EOF(channel%): Line Input #channel%, DDD$: YY$ = YY$ + DDD$ + FS2$
Wend: Close channel%: Kill ficdon$
RegisterRead$ = Left$(YY$, Len(YY$) - 2)
End Function
Why not yes ?