Refresh/reload a file

Help with writing and running scripts

Refresh/reload a file

Postby tjg184 » Tue Jul 22, 2008 12:36 pm

I need a way to force a refresh/reload of the active document. Is there a command to do this? Below is what I'm using now, but it's not exactly ideal. I know there is the "Revert to Saved" command in UltraEdit. Is there a corresponding script/macro command for this?

Code: Select all
var path = UltraEdit.activeDocument.path     
UltraEdit.closeFile(path, 0);
UltraEdit.open(path);
tjg184
Newbie
 
Posts: 1
Joined: Tue Jul 22, 2008 12:33 pm

Re: Refresh/reload a file

Postby Mofi » Wed Jul 23, 2008 3:13 am

No other method exists. There is no script command for "Revert to Saved". And just using UltraEdit.open(UltraEdit.activeDocument.path); does nothing if the file is already open (and modified).
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Scripts

cron