🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18355

Undo a Script?

#18355
From: Brian C. Carter
Date: Wed, 02 Apr 2003 15:44
9 lines
1695 bytes
I don't know if this is possible with any workarounds but I'm writing a VBA script and wanted to have an okay? dialog pop up at the end and if the user presses "undo" it would undo the entire script. I've thought of the following possiblities but I wanted to hear what some more experienced people had to say.

1. Save doc at beginning of script, revert if user clicks "undo" Would have to have a check if Saved at beginning so it wouldn't save an "untitled" somewhere.

2. Add a counter that advances everytime an action is done in ID, then undo that many steps. This seems too clunky to even be possible.

3. Since the script builds items on a page I could have it select only the items that were placed during the previous script run (can't I?) and instead of undo, just delete.

Which of these options seems best to you guys? Any others I haven't thought of?
Technical Details
Message-ID: <1de89065.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed2.kddnet.ad.jp!out.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,69f253c081a126,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-04-02 08:08:06 PST
From: "Brian C. Carter" <brian@samardist.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed2.kddnet.ad.jp!out.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Undo a Script?
Message-ID: <1de89065.-1@WebX.la2eafNXanI>
Date: Wed, 2 Apr 2003 07:44:55 -0800
Lines: 19
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit