[JS] [CS3] Triggering a script
Hi all
I am looking to find the best way to trigger a script in InDesign. In the past i have used an applescript to monitor a folder, and when something appears in the folder a doScript will trigger the required script.
I am guessing there is a more efficient way just using JS. My intentions are ultimately to be using IDServer, linked to my companies web site. What I know I can do is create .csv files on the server from actions on the web site. This CSV file will hold the data I need to use in the ID environment.
I know this is very vague, but at the moment I have no solid plans, but want to make sure something can be done. I cannot use AS as the environment for the IDServer will be a Windows server.
Any pointers will be cool.
Cheers
Roy
Hi Michel,
To provide an example, here is a simple program, which monitors a hot folder: every 5000 milliseconds (Interval property of the Timer) it counts files with pdf extension, makes simple calculations and shows statistics.
Kasyan
Dim myPagesMax As Integer
Dim myPagesRekl As Integer
Dim myTop As Single
Dim myLeft As Single
Dim myFolderName As String
Private Sub Command1_Click()
Timer1.Enabled = True
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = False
End Sub
Private Function CountFiles() As Integer
Set fsoRef = CreateObject("Scripting.FileSystemObject")
If Not fsoRef.FolderExists(myFolderName) Then
MsgBox ("Ïàïêà " & myFolderName & " íå ñóùåñòâóåò!"), vbCritical, "Îøèáêà"
Timer1.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
CountFiles = 0
Exit Function
Unload Me
Else
Set folderRef = fsoRef.GetFolder(myFolderName)
i = 0
For Each f In folderRef.Files
If UCase(Right(f.Name, 4)) = ".PDF" Then
i = i + 1
End If
Next
CountFiles = i
End If
End Function
Private Sub Command2_Click()
Timer1.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = True
Label1.Caption = ""
Label4.Caption = ""
Label6.Caption = ""
Label12.Caption = ""
ProgressBar1.Value = 0
End Sub
Private Sub Command3_Click()
myFolderName = InputBox("Ââåäèòå ïóòü ê ïàïêå äëÿ PDF ôàéëîâ òåêóùåãî íîìåðà", "Âûáîð ïàïêè", myFolderName)
If myFolderName = "" Then Exit Sub ' leaves sub if the variable i is null
Form1.Caption = CurrentIssue
End Sub
Private Sub Form_Load()
Command2.Enabled = False
myTop = GetSetting("PdfCounter", "Settings", "Top", 0)
myLeft = GetSetting("PdfCounter", "Settings", "Left", 0)
myPagesMax = GetSetting("PdfCounter", "Settings", "PagesMax", 160)
myPagesRekl = GetSetting("PdfCounter", "Settings", "PagesRekl", 50)
myFolderName = GetSetting("PdfCounter", "Settings", "FolderName", "K:\PS\801\Original")
Form1.Top = myTop
Form1.Left = myLeft
Text1.Text = myPagesMax
Text2.Text = myPagesRekl
mySplit = Split(myFolderName, "\")
myCurIssue = mySplit(2)
Form1.Caption = myCurIssue
End Sub
Private Sub Form_Unload(Cancel As Integer)
myTop = Form1.Top
myLeft = Form1.Left
SaveSetting "PdfCounter", "Settings", "Top", myTop
SaveSetting "PdfCounter", "Settings", "Left", myLeft
SaveSetting "PdfCounter", "Settings", "PagesMax", myPagesMax
SaveSetting "PdfCounter", "Settings", "PagesRekl", myPagesRekl
SaveSetting "PdfCounter", "Settings", "FolderName", myFolderName
End Sub
Private Sub Text1_Change()
myPagesMax = CInt(Val(Text1.Text))
End Sub
Private Sub Text2_Change()
myPagesRekl = CInt(Val(Text2.Text))
End Sub
Private Sub Timer1_Timer()
If Not CountFiles = 0 Then
Label1.Caption = CountFiles
myPagesRekl = CInt(Val(Text2.Text))
myPagesOur = myPagesMax - myPagesRekl
If Not myPagesOur = 0 Then
myOnePercent = 100 / myPagesOur
End If
myPagesCur = CountFiles
myPagesLeft = myPagesOur - myPagesCur
myCurPercent = CountFiles * myOnePercent
Label4.Caption = CInt(myCurPercent)
Label6.Caption = myPagesLeft
Label12.Caption = myPagesOur
If myCurPercent > 100 Then
myCurPercent = 100
End If
ProgressBar1.Visible = True
ProgressBar1.Min = 0
ProgressBar1.Max = 100
ProgressBar1.Value = myCurPercent
Else
Label1.Caption = 0
myPagesRekl = CInt(Val(Text2.Text))
myPagesOur = myPagesMax - myPagesRekl
If Not myPagesOur = 0 Then
myOnePercent = 100 / myPagesOur
End If
myPagesCur = 0
myPagesLeft = myPagesOur
myCurPercent = 0
Label4.Caption = 0
Label6.Caption = myPagesOur
Label12.Caption = myPagesOur
ProgressBar1.Visible = True
ProgressBar1.Min = 0
ProgressBar1.Max = 100
ProgressBar1.Value = myCurPercent
End If
End Sub
Private Function CurrentIssue() As String
If Not myFolderName = "" Then
If Val(Mid(myFolderName, 7, 3)) > 0 Then
CurrentIssue = "Òåêóùèé íîìåð: " & Val(Mid(myFolderName, 7, 3))
Else: CurrentIssue = "Òåêóùèé íîìåð íå âûáðàí."
End If
Else
CurrentIssue = "Òåêóùèé íîìåð íå âûáðàí."
End If
End Function
Similar Messages
-
[AS][CS3] mathtype replace script
Hi, I edited the mathtype importscript to work better with the selection method.
In CS2 it was working fine, in CS3 not any more of course after I converted my document to the new version and wanted to replace the tect to inline graphics.
Problem is off course the find function, it gives an error on «event K2 Find»
I have read some topics but need some help on what I should alter, of course «event K2 Find» but is this the only line or should it be completely rewritten?
Here is the script:
Deleted some intro info or it's too long.
-- get the source folder for the equations from the user and compile a list of the enclosed files
set the sourceFolder to choose folder with prompt "Select the directory containing the equations:"
set the fileList to list folder sourceFolder without invisibles
-- step through each file in the list, search for a matching name tag in the active document, and
-- replace with the file and move the baseline of the placed equation
repeat with i from 1 to the number of items in the fileList
set currentItem to item i of the fileList
set currentFilePath to ((sourceFolder as string) & currentItem)
-- test if the filename is not a folder and then place it
if (info for (currentFilePath as alias)) is not folder then
set searchstring to "<<" & currentItem & ">>"
place_file(searchstring, currentFilePath, get_baseline(currentFilePath as alias))
end if
end repeat
display dialog "Finished placing files from the folder " & (sourceFolder as string) & "."
* place_file():
on place_file(fileName, filePath, fileBaseline)
tell application "Adobe InDesign CS3"
-- test that a document is open
if (count documents) > 0 then
set myDocument to active document
tell myDocument
-- search for all references of the filename
b «event K2 Find» story given «class for »:fileName
set hitz to the result
set lapz to the number of items of hitz
if lapz > 0 then
-- repeat for each reference to the file
repeat until lapz = 0
select item lapz of hitz
-- get a reference to the selected text
set myInsertionPoint to item lapz of hitz
set myRef to myInsertionPoint
tell item 1 of myRef
set myInsertion to index of first character
set myInsertion2 to index of second character
set myStory to parent of first character
-- delete the string at the reference point
set contents to ""
end tell
-- place the file at the insertion point
tell (insertion point myInsertion of myStory)
place filePath
end tell
-- select the inline graphic
select text from insertion point myInsertion to insertion point myInsertion2 of myStory
set graphicLocation to object reference of selection
set myGraphic to item 1 of all graphics of item 1 of graphicLocation
set mySelection to parent of myGraphic
-- move the graphic equivalent to the baseline for that inline graphic
move mySelection by {"0pt", fileBaseline}
set lapz to (lapz - 1)
end repeat
end if
end tell
end if
end tell
end place_file
(********** get_baseline():***************)
on get_baseline(myFile)
set matchText to "%%Baseline: "
set theBaseline to ""
-- read in the EPS file
open for access myFile
set fileLines to read myFile as string using delimiter {return}
close access myFile
-- find the line with the baseline
set lapz to the number of items in fileLines
repeat until (lapz = 0) or theBaseline begins with the matchText
set theBaseline to item lapz of fileLines
set lapz to (lapz - 1)
end repeat
-- extract the baseline number
set theBaseline to characters -2 thru -1 of theBaseline as string
-- return the baseline number
return theBaseline & "pt" as string
end get_baselineHi Shane, I have placed it like this and it works now, many thanx
on place_file(fileName, filePath, fileBaseline)
tell application "Adobe InDesign CS3"
-- test that a document is open
if (count documents) > 0 then
set myDocument to active document
set find text preferences to nothing
set find what of find text preferences to fileName
tell myDocument
-- search for all references of the filename
find text
set hitz to the result
set lapz to the number of items of hitz
if lapz > 0 then
-- repeat for each reference to the file -
SWF problem in Dreamweaver CS3 and strange Script file
Hi folks, I am using Dreamweaver CS3 and tried to upload a
SWF file today. The SWF includes three buttons, one for video,
another for audio and one for text. Before loading up to DW all
three parts played fine. But when I uploaded to DW and my site, the
video fails to play. A Script file, and another file downloaded I
am not sure what I am supposed to do with this script file. The
script file is called The audio and text part works fine, but the
video will not play. I am not sure why this is, but when I uploaded
the file to Dreamweaver there was a Script file called
AC_RunActiveContent.js that automatically downloaded along with a
file called .htaccess
The other file is called called .htaccess
I uploaded both files to my server, but that did not help the
video play. I tried pasting the AC_RunActiveContent.js code into my
page and uploading, but that did not help the video play either; I
just got code at the bottom of my page.
I have viewed the page in Mozilla, IE7 and Flock, but still I
cannot play the video.
Does anyone have any idea how to make the video play in
Dreamweaver; what I am supposed to do with these two code files?
For those interested in the AC_RunActiveContent.js code, I
will post below. Please try to explain simply because I am not so
tech savvy.
I thank you all.
MaryI have managed to fathom it out.
-
Setting Enterprise Call Info Step Within An HTTP Triggered CRS Script
IPCC Enterprise 7.5(6)
CAD 7.5(6)
IPIVR 7.0(1)sr05_build504
We had a vendor develop some IVR & ICM scripts a few years back to take a website triggered request and pass along it’s value from the header, store it into Call Peripheral Variable 1 and place a call to a queue with agents (using CAD). It then sets off a work flow group macro to populate this value (from PV1) into another application along with a repeating message to the agent that says they have a new request. Since we recently upgraded our IVR to 7.0(1)sr05, I had to change the scripting some to make it work. They were using a freaky way of getting the value into PV1 using a pre-connect application triggered from the initial application. Anyway, their method would not work with the new version any longer so I needed to alter the scripts some.
The problem I’m having is that PV1 is being set after the Place Call step. This actually needs to be set before it reaches an agent in order to pass the value into CAD. Currently, I’ve been using some delay statements in the ICM script to give it time to get the value into PV1 but it’s not 100%. I get sporadic results.
Current script in test.
I’m looking to see if anyone can tell me a way to setup the Set Enterprise Call Info step before the Place Call step? Since this is HTTP triggered, I can’t use (Triggering Contact) and I haven’t been able to set a pseudo contact because debug tells me that the contact is null or because it’s not a call contact.Hi Gabriel. Thanks for the reply.
The current method that's in place seems to work fine for me in test but when in production, I'm getting about a 60-70% success rate. As it comes into my ICM queuing script, I'm using another Run Ext Script node to execute a delay to give the Set Enterprise Call Info step from the first VRU script extra time to set it's value before reaching the ICM Queue To Skill Group node. I definitely notice better results when I did this but still not a 100%.
The reason I'm doing this is because of the notation that the help file discusses about the Set Enterprise Call Info step:
"Note In a Cisco Unified CCX system:
Beginning with CRS 4.0, this step should be placed script before the call gets connected to an agent. This means the step in the script should be placed before the Select Resource Step or in the Selected/Queued branch of the Select Resource step.
If call data is set after the call gets connected to the agent, it will not be displayed in Cisco Agent Desktop (CAD)."
So this is why I've been looking to see if this step can somehow be set before the Place Call step. I'm not that familiar with altering Sessions or Contacts but was hoping someone might know how to manipulate these in order to let me do this.
Thanks again. -
Photoshop CS3 Repeat Action Script.
I need an AppleScript for Photoshop CS3 that will run the selected Action on all layers within the selected Layer Group.
I have a Layer Group of Graphics that I want to apply various effects, and distortions to. I record the action once, but then I have to manually select each layer and play the action. I would like a script that will play the selected action to every layer within the selected group.
Any ideas?This is what I have so far:
tell application "Adobe Photoshop CS3"
tell current document
set myActionSet to "" --Current Action Set
set myAction to "" --Current Action
set myLayerSet to "" --Current Layer Set
set layerCount to layers of layer set myLayerSet
repeat with i from 1 to the count of layerCount
set current layer to layer i of layer set myLayerSet
set the visible of layer i of layer set myLayerSet to true
do action myAction from myActionSet
set the visible of layer i of layer set myLayerSet to false
end repeat
end tell
end tell
I am having problems getting the first 3 variables to be what is currently selected/highlighted without manually typing them in before running the script.
I am also getting errors if a layer within the layer set is empty.
Any ideas? -
An Outlook rule that triggers a script gets deactivated every few weeks
Hi all,
I wrote a simple set of Outlook rules. One of them triggers a VB script that copies attachments of incoming mails (with a specific title and destination) to a share on a server. I added a certificate so that the user doesnt have to allow the script to run.
Every few weeks, the rule stops being executed. When i check it, the rule is shown in red, and it's marked with the word "error".
However, none of the parameters is shown in red.
I had our IT dept. increase the mail server's storage limit to the max, but that didn't fix it.
My current work-around:
in the Rule Description, i click on the link that specifies which script has to be run if the rule's conditions are met. Next, i pick the same script, and all is fine again.
Sadly, this is not acceptable to my co-workers, and i'm afraid i'll have to find another solution if i don't get this fixed soon-ish...
Any help would be greatly appreciated.Hi,
Press Win + R and type “outlook.exe /cleanrules” in the blank box, then press Enter.
Opening Outlook with the /cleanrules switch will get rid of any corrupt rules, after this please recreate the rules and test the result.
Note,you will lose current rules so it might be a good idea to export them first.
(Import or export a set of rules:
http://office.microsoft.com/en-in/outlook-help/import-or-export-a-set-of-rules-HP010355072.aspx)
Let me know the result.
Regards.
Melon Chen
TechNet Community Support
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Executing/Triggering Linux script from Oracle 9i.
Hi All,
I am new to oracle and need help.
i want to execute a script in linux which should be triggered from oracle 9i.
Is it possible to do?
and if yes please help me out how to do?
Please let me know if any other information is needed..!!!Hi,
Welcome to the forum!
If you have a script called my_file.sql, and it is located on c:\oracle_stuff, then, from the SQL*Plus "SQL> " prompt, you can say
@c:\oracle_stuff\my_scriptor
@c:\oracle_stuff\my_script.sqlto run the script (that is, to execute every line in the file as if you were typing it).
The suffix ".sql" is the default, so you don't have to say it.
If you had a none-standard suffix, then you would have to specify it.
For example, if your file was called another_file.txt:@c:\oracle_stuff\another_file.txt -
Text find and change problem in CS3 and CS4 script
I use the script below to find some text and change into others.
There is one thing the script can't do it for me.
Example:
(g) Management
(1) that no law which is enacted in the Cayman Islands imposing any tax to be levied on profits, income, gains or appreciation shall apply to the Company or its operations; and
(2) that the aforesaid tax or any tax in the nature of estate duty or inheritance tax shall not be payable on or in respect of the shares, debentures or other obligations of the Company.
Example:(END)
I got a lot of topics or points in the passage. And I want to change the space between '(g)' and 'Management' into a tab character. So I revised the plain text file 1text.
PS: 1text.txt is filled with what to change.
text {findWhat:"^p(^?) "} {changeTo:"^p(^?)^t"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all space-dash-space and replace with an en dash.
The result is:
(^?)^tManagement
(^?)^tthat no law which is enacted in the Cayman Islands imposing any tax to be levied on profits, income, gains or appreciation shall apply to the Company or its operations; and
(^?)^tthat the aforesaid tax or any tax in the nature of estate duty or inheritance tax shall not be payable on or in respect of the shares, debentures or other obligations of the Company.
PS: ^t is a tab character.
result (END)
This is not what I want.
It should be '(g)^tManagement'.
PS: ^t is a tab character.
Please someboady help me out to revised the script below to change the text into what I want. Thanks so much.
Here is the script.
//FindChangeByList.jsx
//An InDesign CS4 JavaScript
@@@BUILDINFO@@@ "FindChangeByList.jsx" 2.0.0.0 10-January-2008
//Loads a series of tab-delimited strings from a text file, then performs a series
//of find/change operations based on the strings read from the file.
//The data file is tab-delimited, with carriage returns separating records.
//The format of each record in the file is:
//findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
//Where:
//<tab> is a tab character
//findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
//findProperties is a properties record (as text) of the find preferences.
//changeProperties is a properties record (as text) of the change preferences.
//findChangeOptions is a properties record (as text) of the find/change options.
//description is a description of the find/change operation
//Very simple example:
//text {findWhat:"--"} {changeTo:"^_"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all double dashes and replace with an em dash.
//More complex example:
//text {findWhat:"^9^9.^9^9"} {appliedCharacterStyle:"price"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find $10.00 to $99.99 and apply the character style "price".
//All InDesign search metacharacters are allowed in the "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
//If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
//as shown in the example below:
//{findWhat:"\\s+"}
//For more on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
//or visit the InDesign Scripting User to User forum at http://www.adobeforums.com
main();
function main(){
var myObject;
//Make certain that user interaction (display of dialogs, etc.) is turned on.
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
if(app.documents.length > 0){
if(app.selection.length > 0){
switch(app.selection[0].constructor.name){
case "InsertionPoint":
case "Character":
case "Word":
case "TextStyleRange":
case "Line":
case "Paragraph":
case "TextColumn":
case "Text":
case "Cell":
case "Column":
case "Row":
case "Table":
myDisplayDialog();
break;
default:
//Something was selected, but it wasn't a text object, so search the document.
myFindChangeByList(app.documents.item(0));
else{
//Nothing was selected, so simply search the document.
myFindChangeByList(app.documents.item(0));
else{
alert("No documents are open. Please open a document and try again.");
function myDisplayDialog(){
var myObject;
var myDialog = app.dialogs.add({name:"FindChangeByList"});
with(myDialog.dialogColumns.add()){
with(dialogRows.add()){
with(dialogColumns.add()){
staticTexts.add({staticLabel:"Search Range:"});
var myRangeButtons = radiobuttonGroups.add();
with(myRangeButtons){
radiobuttonControls.add({staticLabel:"Document", checkedState:true});
radiobuttonControls.add({staticLabel:"Selected Story"});
if(app.selection[0].contents != ""){
radiobuttonControls.add({staticLabel:"Selection", checkedState:true});
var myResult = myDialog.show();
if(myResult == true){
switch(myRangeButtons.selectedButton){
case 0:
myObject = app.documents.item(0);
break;
case 1:
myObject = app.selection[0].parentStory;
break;
case 2:
myObject = app.selection[0];
break;
myDialog.destroy();
myFindChangeByList(myObject);
else{
myDialog.destroy();
function myFindChangeByList(myObject){
var myScriptFileName, myFindChangeFile, myFindChangeFileName, myScriptFile, myResult;
var myFindChangeArray, myFindPreferences, myChangePreferences, myFindLimit, myStory;
var myStartCharacter, myEndCharacter;
var myFindChangeFile = myFindFile("/FindChangeSupport/1test.txt")
if(myFindChangeFile != null){
myFindChangeFile = File(myFindChangeFile);
var myResult = myFindChangeFile.open("r", undefined, undefined);
if(myResult == true){
//Loop through the find/change operations.
do{
myLine = myFindChangeFile.readln();
//Ignore comment lines and blank lines.
if((myLine.substring(0,4)=="text")||(myLine.substring(0,4)=="grep")||(myLine.substring(0, 5)=="glyph")){
myFindChangeArray = myLine.split("\t");
//The first field in the line is the findType string.
myFindType = myFindChangeArray[0];
//The second field in the line is the FindPreferences string.
myFindPreferences = myFindChangeArray[1];
//The second field in the line is the ChangePreferences string.
myChangePreferences = myFindChangeArray[2];
//The fourth field is the range--used only by text find/change.
myFindChangeOptions = myFindChangeArray[3];
switch(myFindType){
case "text":
myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
break;
case "grep":
myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
break;
case "glyph":
myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
break;
} while(myFindChangeFile.eof == false);
myFindChangeFile.close();
function myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
//Reset the find/change preferences before each search.
app.changeTextPreferences = NothingEnum.nothing;
app.findTextPreferences = NothingEnum.nothing;
var myString = "app.findTextPreferences.properties = "+ myFindPreferences + ";";
myString += "app.changeTextPreferences.properties = " + myChangePreferences + ";";
myString += "app.findChangeTextOptions.properties = " + myFindChangeOptions + ";";
app.doScript(myString, ScriptLanguage.javascript);
myFoundItems = myObject.changeText();
//Reset the find/change preferences after each search.
app.changeTextPreferences = NothingEnum.nothing;
app.findTextPreferences = NothingEnum.nothing;
function myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
//Reset the find/change grep preferences before each search.
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences = NothingEnum.nothing;
var myString = "app.findGrepPreferences.properties = "+ myFindPreferences + ";";
myString += "app.changeGrepPreferences.properties = " + myChangePreferences + ";";
myString += "app.findChangeGrepOptions.properties = " + myFindChangeOptions + ";";
app.doScript(myString, ScriptLanguage.javascript);
var myFoundItems = myObject.changeGrep();
//Reset the find/change grep preferences after each search.
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences = NothingEnum.nothing;
function myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
//Reset the find/change glyph preferences before each search.
app.changeGlyphPreferences = NothingEnum.nothing;
app.findGlyphPreferences = NothingEnum.nothing;
var myString = "app.findGlyphPreferences.properties = "+ myFindPreferences + ";";
myString += "app.changeGlyphPreferences.properties = " + myChangePreferences + ";";
myString += "app.findChangeGlyphOptions.properties = " + myFindChangeOptions + ";";
app.doScript(myString, ScriptLanguage.javascript);
var myFoundItems = myObject.changeGlyph();
//Reset the find/change glyph preferences after each search.
app.changeGlyphPreferences = NothingEnum.nothing;
app.findGlyphPreferences = NothingEnum.nothing;
function myFindFile(myFilePath){
var myScriptFile = myGetScriptPath();
var myScriptFile = File(myScriptFile);
var myScriptFolder = myScriptFile.path;
myFilePath = myScriptFolder + myFilePath;
if(File(myFilePath).exists == false){
//Display a dialog.
myFilePath = File.openDialog("Choose the file containing your find/change list");
return myFilePath;
function myGetScriptPath(){
try{
myFile = app.activeScript;
catch(myError){
myFile = myError.fileName;
return myFile;It takes me a lof of time to comprehend the sentence you write. Cause I am a Chinese. My poor English.
I have to say "you are genius". I used to use the indesign CS2. There is no GREP function in CS2. When I get the new script, I do not know how to use it. Just when I saw the
'grep {findWhat:" +"} {changeTo:" "} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all double spaces and replace with single spaces.'
Being confused.
Thanks so much. It seems I have to relearn the advanced Indesign. -
This probably sounds redundant
over and over again , automating a script, but is there a way of assign
ing a keyboard shortcut
or run the
script in an action? I use mucho a script written and generously shared by JET to joinnearest points. It's a pain to have to click on file and then scripts and then select the script each time. I would like to eliminate 2 clicks (or mashes as they say in the southern states). Is there a way to do this within the script (adding a lline)?
Guidance will be appreciated.This Action-Script bug has been present for several versions, at least
Correct. I have been complaining about this bug for four versions now.
It has become my practice to do this:
I keep an Action defined in my Actions palette named JET_CurrentScript. When it becomes clear to me that I will be repeatedly using a script in a work session, I go ahead and use InsertMenuItem to insert the step in that Action.
This is not a fix or even a workaround. It just lessens the tedium in certain circumstances. It becomes just as tedious, of course, if you have to do that for multiple frequently-needed scripts with every launch (you know--like having to reset your palette settings in Swatches, Doc Info, etc.)
Illustrator's script access interface--like too much in Illustrator--is half-baked. Sloppy. Rushed-to-market. Compare to InDesign's Scripts palette.
Now that ScriptUI provides for creation of floating dialogs (and supposedly modeless palettes--something else that's quite problematic with Illustrator's scripting implementation), one can combine several scripts into one dialog to handle multiple user inputs. I may get around to doing that with closely-related groups of my scripts, but am currently just getting acquainted with the rather tedious ScriptUI model.
There are ways to make a script run when the program is launched. So it may be conceivable to devise a startup script that would launch a script containing such a multi-purpose palette. But I haven't monkeyed around with that yet, because it would be dependent upon the afore-mentioned modeless dialog working correctly--you wouldn't want a modal dialog to appear whenever you launch the program.
I'm certainly no advanced Javascripter; I'm a self-motivated, self-trained "student" and "experimenter" when the mood strikes.
I'm gratified, by the way, that some of you seem to fiind my Join scripts handy. I consider the functionality indespensible in my own work, which is why I hacked them out. But it is absolutely absurd that one has to resort to custom scripting to do something that should so obvously be a standard function in the program.
JET -
InDesign CS3 Corner Effect Script
I have tried to run the InDesign C33 Corner Effect Script so that I may change different points on a frame. However after the script runs I still cannot edit points. There is no dialogue box to manipulate the points. Mac Platform.
The supplied link is no longer active.
We are seeing this exact same issue on a few machines in our office. Any further help?!
Thank you very much!!!
We double click on the script, and the window that would usually open does not. It's the script to edit specific corners. -
Triggering Java Script in WebDynPro
Hi Experts,
I wanted to know if there is any way to trigger java Scripts in webDynpro application.
If yes, please provide any document on the same.
Thanks in advance.
Regards,
RohanHi Rohan,
Javascript is not part of the Web Dynpro programming model.
Remember: Web Dynpro is a multi-client programming model that supports not-only Web browsers.
Meanwhile, have a look at the following thread for more info.
Re: Java Script in WebDynPro!!!!
I hope this helps.
Regards,
Gopal. -
Triggering encryption script with XI
Hi,
we are implementing SAP HR -XI-file scenario but data that is coming from HR system has to be encrypted before XI place the data on file servers,not needed before entering or in XI encryption.we are using encryption script ,so basically we need to trigger the script as the last thing to do in the process,i.e;before placing the data on file system.
can we achieve this in the reciever file adapter in OSS commands?or any special things need to be made in Xi?
thank you,
babuBabu,
I dont understand your requirement fully. First of all how you are getting data into XI. You want the final output file to be encrypted. Also what kind of encryption you are trying to use like PGP etc?
<i><b>
can we achieve this in the reciever file adapter in OSS commands?or any special things need to be made in Xi?</b></i>
You can run the OS command from the file receiver communication channel very easily. You dont need to do any changes for that. But if you are using PGP for encryption then you to install PGP on the XI box. Then only you can able to encrypt.
Please tell us the full requirement? The last option is to write an adapter module and call in you File receiver communicatin channel and it will encrypts the file.
---Satish -
Triggering UNIX script with IDOC creation?
Hello group,
I create an IDOC when a delivery goods-issue is being posted (IDOC via outputcondition).
The name of the IDOC file is being created by a function module to add a timestamp to the filename. So every IDOC has a unique name!
Now what I need to do is to call a UNIX file right when the IDOC has been created.
Furthermore, I need to pass the name of the IDOC as parameter to that UNIX script.
Any ideas how this can be accomplished?
Thank you in advance,
DirkHi!
Like windows, unix has also its scheduler. Unfortunately I don't remember how could you do this, but on a unix forum, people in 5 mins will tell you that...
We are using jobs, and our job log is full with jobs, but it do not disturbs anyone. Not disturbing, because mostly only the problematics jobs are needed, and you can select the jobs with their statuses.
Regards
Tamá -
Hello,
For reasons of economy and if it ain't broke, don't fix it, I'm still running with a G5 Dual 2.0 PowerPC at 10.4.11 for my music and photography studio. Married, two lovely children and an adorable wife, so can't afford to upgrade, and anyway, it works. Mostly.
I have two boot disks, cloned using SuperDupa which I test regularly. I've recently been having a few minor niggles so I decided to rebuild one of the disks from scratch as this hasn't been done in a couple of years. Erase the disk using Disk Utility, clean os-x install from the original disks, patch the system using Software Update then bit by bit load all the applications and gradually rebuild the whole system.
All going well until I get to Adobe CS3. When I run setup to install CS3 I get the following error;
JavaScript Alert
Critical errors were found in the setup
- The installer database is invalid: please re-install the product from the original media. Please see Setup log file for details.
I've done some research and found that this is mostly about an unclean uninstall of CS3 when reinstalling, and is fixed by either running a CS5 cleanup program, which doesn't apply in this case as I've done a clean install (and it won't run anyway) and the boot disk is the only disk mounted. The other fix is to erase the disk and do a clean o/s install, which is I've done. That hasn't worked either.
I've tried running the setup on the other boot disk (at 10.4.11) and also on my MacBook Pro (at 10.6.8) and it works both times.
Any clues would be apprecaited.
thanks and regards
SimonWell, I have a fix, but not the cause.
original boot disk is already cloned using SuperDupa so I have a backup
erase second disk and run a custom install of os-x from the orginal 10.4 disks (including OS 9 Classic)
custom install - printers and language translators not included
X11 not incuded
run Software Update to patch the system
run Onyx
install CS3 from original disks - fails with JavaScript alert
copy /library/applicaiton support/adobe/installers/big_long_number/payloads +resources +setup from original boot disk to rebuild disk
install CS3 - works perfectly
I'm at a loss here. It seems that my reinstall of 10.4 is putting something into the Adobe installers area which the install of CS3 doesn't like. What that might be is beyond me. Adobe Reader might be a cuiprite but I haven't installed anything at this stage.
So, there's the work around; no idea what the cause might be. I'l try again sometime soon when I rebuild the MacBook Pro (10.6.8) but that's going to be a while yet.
Thanks all,
Simon -
Dreamweaver CS3 Scripting Youtube embedding Problems
I use embeds from youtube on my site. They are usually no
problem. Today I
upgraded from Dreamweaver 8 to CS3. When saving my files and
uploading to the host, CS3
created two scripts that it said were necessary for
standards-based sites and
applications:
AC_Activex.js
AC_Runactivecontent.js
CS3 indicated that they must be uploaded in "Scripts" folder
to host. Now all my
embeds show up as a red x in IE7. Oddly enough they work in
Monzilla. Sounds like a version problem doesn't it? Although of
course my host (Bluehost) says it ain't their problem.Check out the following extension:
http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1327520
From the looks of your code you were embedding Youtube links
as if they were Flash. However, while they are Flash, Youtube has
its own system for embedding. I believe Youtube does provide you
with code to do this. However, this plugin should do it all for you
from within Dreamweaver.
Maybe you are looking for
-
I purchased 2 packages of gems for skylanders and only received 1 package. Got email receipts and tried to report problem with link in email on my ipad2 and it keeps coming up with to many https redirects. Can anyone help? Just want my gems :).
-
Creating Oracle Job with Task Scheduler
Hi, Platform: Oracle10g R2, Windows 2003 Server I have the below script on my Linux server that backups up the database. It's run via crontab. --------------- script --------------------- -- Environment variables goes here cd $ORACLE_HOME/bin ./rman
-
Bridge cashe fail while in mini bridge mode.
bridge cashe fails when opeing and I purge it but the message returns each time while in mini bridge mode.Also it has stopped displaying thumbnails it mini bridge. Any ideas?? The full message is 'Bridge encountered a problem and is unable to read t
-
Why sort on a column not working?
Run a query and then right click on a char. column (already displayed as key), then Sort -> either "Ascending According to Key" or "Descending According to Key", but the sort not working. We've tried both BEX query and Web, none works for the sort.
-
FI: debts for a customer
Hi all, i need to get the debt of a customer from R/3 FI, i guess this is a very usual scenary so i ask if anyone can help me to get to this. I'm activating the line items infocube from BCT 0FIAR_C03 but i don't know wish filters (DOC_TYPE) or key fi