I created a user command to initialize the VP, meaning that it's executed at TC start (with autorun.wdx) to activate the VP as a new tab[1]. My em command works, see the code block below, but I need to improve it.
Code: Select all
[em_cd-virtual-panel]
button=
cmd=cd \\\Virtual Panel
[em_init-virtual-panel]
button=
cmd=%COMMANDER_PATH%\util\TCFS2\TCFS2.exe
;cm_OpenNewTab=3001;Open new tab
;cm_SwitchToNextTab=3005;Switch to next Tab (as Ctrl+Tab)
;cm_SwitchToPreviousTab=3006;Switch to previous Tab (Ctrl+Shift+Tab)
;cm_ToggleLockCurrentTab=3010;Turn on/off tab locking
;cm_SrcActivateTab1=5001;Activate first tab
param="/ef "tcm(3001) tem(em_cd-virtual-panel) delay(3000) tcm(3010) tcm(5001)""
1) open new tab (3001)
2) cd virtual panel (em_cd-virtual-panel)
3) *** wait until VP has fully loaded (???) ***
4) lock VP tab (3010)
5) *** switch back to previous tab (3006) ***
You can see that I was forced to replace steps 3 and 5 with something else to make it work. But delay(3000) in step 3 is a work-around, so I'm asking if there's a better solution. Thanks.
Notes:
[1] Reason for wanting to initialize the VP: I noticed that unless the VP has been opened at least once, VPBatch.exe silently fails creating new V folders. I have a .cmd script that runs VPBatch.exe ^^silent ^^put /l "folder(10)\" "listfile.lst" but "folder(10)\" isn't created unless the VP has been "visited in a tab" before.