I have set up a button with the following Raw comnmands:
Go /D VIEW=List
Select abc123.sle PATTERN
Rename PATTERN="." TO Secure002.sle TYPE=files
Select NONE
Go /mydocuments VIEW=Power
This works perfectly, however, when I add the following:
o /D VIEW=List OPENINRIGHT=vert Set FOCUS=Dest
Select abc123.sle PATTERN
Rename PATTERN="." TO Secure002.sle TYPE=files
Select NONE
Go /mydocuments VIEW=Power
The first Select, Rename, second Select and last Go stop working. Any ideas please?
I'm having trouble understanding the very beginning of either button code where you have this:
Go /D
On my machine that sends Opus to C:\D\
At any rate assuming yours goes where you want, both of your button examples work on my machine. I've ran the one giving you trouble about 10 times and it worked every time so I tend to assume it's a timing issue on your setup. There are different ways you can address those kinds of problems, you can split the button into a 3 button button where a left click does part of the job and a right click does the rest. Or you could try something like this next (this is going into new territory for me with Opus but it seems to work).
Change your button function type from STANDARD FUNCTION to MS-DOS BATCH FUNCTION and then change your button code to the following:
// @runmode hide
Go /D VIEW=List OPENINRIGHT=vert
Set FOCUS=Dest
@runbatch
ping.exe -n 2 127.0.0.1 >nul
@norunbatch
Select abc123.sle PATTERN
Rename PATTERN="*.*" TO Secure002.sle TYPE=files
Select NONE
Go /mydocuments VIEW=Power
What that does on my machine, is it inserts an approximate 1 second delay just before the Opus command to select abc123.sle which may be the point of failure in your machine (you should see a 1 second "DOS box" flash during the delay). You may have to move the delay around or even add an additional delay to resolve your problem but once you get it working you can eliminate the DOS box flash by removing the // before @runmode hide on the first line.
I have entered the following Raw/batch commands into my button text:
//@runmode hide
Go /D VIEW=List OPENINDUAL=vert
Set FOCUS=Dest @runbatch
ping.exe -n 10 127.0.0.1 >nul @norunbatch
Select TYPE=files "abc123.sle"
The button function was converted to MS DOC batch.
The two listers are opened and the focus is set to the D drive. The MS DOS window opens. While the MS DOS window is open, the folder tree for the D drive expands.
Once the MS DOS window closes, the command Select TYPE=files "abc123.sle" does not select the file abc123.sle (this file exists and is in the root of the D drive).
If, after all of the above commands have executed once, I select my button again, so the D drive opens in a dual vertical lister again, the file abc123.sle is selected.
It would appear that when I run the commands in my button once, no commands after the Set FOCUS=Dest are run.