Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
qml file at startup
I wonder whether the following option can work: Suppose that in $My QM$ there exists a very short maim.qml file, which - under certain circumstances - decides which one of another two (namely qm1.qml & qm2.qml) will be further called, loaded, executed. If not, is there another way to select at startup which .qml will be loaded? Any advice much appreciated.
Create exe-macro that opens one of files.
To open a qml file, can be used command line. Or before starting QM change registry value "file" in HKEY_CURRENT_USER\SOFTWARE\GinDi\QM2\Settings.

Macro Macro2930
Copy      Help
str sf
ifk J 1 ;;toggled Scroll Lock
,sf="C:\My QM\qm1.qml"
,sf="C:\My QM\qm2.qml"

run "qm.exe" F"L ''{sf}''"
Many thanks indeed! I have already used the solution with registry change, I found it a bit dangerous, since if you forget it and you click on another .qml file, then this value is replaced. Best regards.
I have tested it. Nevertheless, it loads last main.qml used and it opens qm1.qml (or qm2.qml) in file viewer. I would like to use absolutely qm1.qml. Is there any way to overcome it, unless using registry's file string appropriately set, which it works. Many thanks.
Should not show file viewer if file path is in
Macro Macro2938
Copy      Help
str file1="Q:\My QM\qm1.qml"

str s
rget s "Recent Files" "SOFTWARE\GinDi\QM2\Settings"
ARRAY(str) a
int i found
for i 0 a.len
,out F"'{a[i]}'"
,if(a[i]~file1) found=1; break
if !found
,rset s "Recent Files" "SOFTWARE\GinDi\QM2\Settings" 0 REG_MULTI_SZ

Member function str.MultistringToArray
Copy      Help
function ARRAY(str)&a

if this.lpstr=0

if this.len=0 or (this.len=1 and this[0]=0)

int j n
lpstr s(this.lpstr) se(s+this.len)
,if(s>=se) break

for j 0 n
,int i=len(s)
,a[j].left(s i)
,if(s>=se) break

Member function str.MultistringFromArray
Copy      Help
function ARRAY(str)&a

if !a

if !a.len

int i
for i 0 a.len
,str& s=a[i]
,if s.len
,,this.fromn(this this.len s s.len "" 1)
,,this.fromn(this this.len "" 1)

Forum Jump:

Users browsing this thread: 1 Guest(s)