Help file suggestion

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Help file suggestion

Post by Rain » Mon Jan 08, 2007 5:56 pm

I love all the new features well the ones that I figured out so far. Would it be possible to add examples for the new features to the help file? For example the dialog example is outdated, none of the new features are included which may not be a problem for people that have used MS for quite some time but those that are new to MS could probably use some examples that include the new features. Just a though.

I can't figure out one>FILE_EXISTS,Filename,0,FileExist
How is that supposed to work? do I have to enter the file name only or the path plus file name?

This is the only example which isn't much to go by:
FILE_EXISTS and FILE_NOTEXISTS

EventParm takes a filename.

ExtraParm is not used. Set to zero.

Thank you for your time and a great product.

User avatar
JRL
Automation Wizard
Posts: 3504
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Jan 08, 2007 6:36 pm

Rain wrote:do I have to enter the file name only or the path plus file name?
Yes... As with any filename, the path is a part of the name and identifies the specific file. The only exception is when the file is located in the current working directory.

I love the OnEvent> function. I agree that help could use better examples but until that happens, here's an example using FILE_NOTEXIST. This creates a file c:\Rain_event_test\rain.txt then waits until you delete it. As soon as the file is deleted, the FILE_NOTEXISTS event runs the FileDeleted subroutine which then pops a message and closes the script.

Hope this helps,
Dick

Code: Select all

CreateDir>c:\Rain_event_test
Let>file1=c:\Rain_event_test\rain.txt
Writeln>%file1%,wresult,This is a test
Wait>0.5

OnEvent>FILE_NOTEXISTS,%file1%,0,FileDeleted

SRT>FileDeleted
  MDL>File %file1% has been deleted
  goto>end
END>FileDeleted

Label>start
wait>0.1
Goto>start

Label>end

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Tue Jan 09, 2007 6:13 pm

Thanks Dick.

I took a closer look at my script after I saw your reply and noticed that I had a typo. No wonder it didn't work :oops:

It's working now.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts