duponq wrote:
> Hi,
> is it possible in powerpro to watch a file in a particular directory
> and launch an event when this file changes.
> For example, if
> c:\MyDocuments\mydoc.txt
> is created, then run
> notepad.exe
>
On Win2k/XP, one way to do it is to run a script that watches activity
in the folder.
han= file.watchfolder(path, cmd, maxwait, keywords)
Monitors activity in the folder given by path: when a change occurs,
executes the cmd.
in your example, cmd would be initialized as (untested):
local [EMAIL PROTECTED](,)?
or all on one line (watch for folded line below):
han = file.watchfolder(??c:\MyDocuments\mydoc.txt?,
[EMAIL PROTECTED](,)?)
Then enter the following text in file
watch_and_run.powerpro in the scripts subfolder of your powerpro folder:
@notepad
args path file
win.debug("running",path,file)
do("notepad.exe",path++??\?++file)
quit
For further details look for keyword watchfolder in the online help
file.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~->
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/