atom feed5 messages in com.perforce.perforce-user[p4] Writing scripts for P4Win
FromSent OnAttachments
Priamos GeorgiadesSep 25, 2001 10:30 am 
Gareth ReesSep 25, 2001 11:07 am 
Priamos GeorgiadesSep 25, 2001 11:22 am 
Gareth ReesSep 25, 2001 11:46 am 
Priamos GeorgiadesSep 25, 2001 11:54 am 
Subject:[p4] Writing scripts for P4Win
From:Gareth Rees (gd@ravenbrook.com)
Date:Sep 25, 2001 11:07:52 am
List:com.perforce.perforce-user

At 10:30 -0700 2001-09-25, Priamos Georgiades wrote:

One key feature I'm looking for is the ability to run scripts on currently selected files. [Essentially, the selected files become arguments for the script.] I don't think such a thing is supported, but I was wondering if anyone figured out a hack around it.

You can add commands to the "Tools" menu in P4Win. See <http://www.perforce.com/perforce/doc.011/manuals/p4win/02_configuring.html#1040956>. This might be a way of doing what you want.

Here's how to create a very simple example that echoes the client filenames of the selected files:

1. Choose the Tools -> Customize menu item. 2. Click "Add". 3. Type "Echo". Click "OK". 4. In the "Command" text box, type "echo". 5. In the "Arguments" text box, type "%F". 6. Click the "Console Application" check box. 7. Click "OK".

Now whenever you have files selected, the "Echo" item is available on the "Tools" menu.