🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16069

Re: Send "Crtl+M" to indesing via VBscript.

#16069
From: Chris_Haas
Date: Tue, 14 Oct 2003 16:01
18 lines
1653 bytes
Here's a test script that should launch notepad and write some words in it.
It uses a 5 second (5000 ms) delay to ensure that notepad has had enough
time to launch. If you've got NAV installed you'll get a warning, but don't
worry, this is safe. Save this file to your desktop as "Test.vbs" and then
double-click it. Make sure you don't have any other Notepad windows open
before running this. If this works then I'm guessing windows is having a
problem getting the key sequences over to ID. But let me know if this one
works or not.

Option Explicit
Dim myShell

Set myShell = WScript.CreateObject("WScript.Shell")
myShell.Run "notepad.exe", 1, False
WScript.Sleep 5000
myShell.AppActivate "Untitled - Notepad"
myShell.SendKeys "This is a test"
Set myShell = Nothing
Technical Details
Message-ID: <394E9B73F71A772B918063D0990B33F1@in.webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccddb4a.-1@webx.la2eafNXanI> <2ccddb4a.1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,25af0eb84313248a
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-10-14 09:09:24 PST
From: Chris_Haas@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: Send "Crtl+M" to indesing via VBscript.
Message-ID: <394E9B73F71A772B918063D0990B33F1@in.webx.la2eafNXanI>
Date: Tue, 14 Oct 2003 09:01:24 -0700
References: <2ccddb4a.-1@webx.la2eafNXanI> <2ccddb4a.1@webx.la2eafNXanI>
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit