Article View: adobe.scripting.indesign
Article #21081Re: Activate my executable?
From: Greg Brunet
Date: Wed, 15 May 2002 05:01
Date: Wed, 15 May 2002 05:01
11 lines
1495 bytes
1495 bytes
hi:
This code may help you:
'** if not allowed multiple copies, then goto PrevInst if avail If (App.PrevInstance) Then sMsg = APP_NAME & " is already running." & CRLF sMsg = sMsg & "Switching to that copy." MsgBox sMsg, MB_ICONINFORMATION
sTitle = App.Title App.Title = "... duplicate instance." AppActivate sTitle SendKeys "% R", True End End If
Where: you should set APP_NAME to the name of your app. Of course, you can just jump to it without displaying a messagebox first. Also note, it's important to (temporarily) change the title of the current app, so that it can find the one that's already running. Good luck,
-- Greg
Technical Details
Message-ID:
<ef86e98.0@WebX.aaQKaf7vad4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!telocity-west!TELOCITY!hub1.nntpserver.com!news.maxwell.syr.edu!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<ef86e98.-1@WebX.aaQKaf7vad4>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,8a3e4431d84204b2 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-05-14 22:37:33 PST From: "Greg Brunet" <gbrunet@sempersoft.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!telocity-west!TELOCITY!hub1.nntpserver.com!news.maxwell.syr.edu!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Activate my executable? Message-ID: <ef86e98.0@WebX.aaQKaf7vad4> Date: Tue, 14 May 2002 22:01:51 -0700 References: <ef86e98.-1@WebX.aaQKaf7vad4> Lines: 25 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit