Help Please!! Script for table needed.
Hi,
I'am formating a table in Indesign with figure in the cell like for example $(123.45) and theres a lot if it. I need to separate or move the $ sign to previous column and the closing parenthesis to the next column. What I do is to insert new column before and after then copy and paste the $ to previous column and the parenthesis to the next. Is there anyone knows to automate this using script.
Thanks,
DennisM
dennismacaburas wrote:
I'am formating a table in Indesign with figure in the cell like for example $(123.45) and theres a lot if it. I need to separate or move the $ sign to previous column and the closing parenthesis to the next column. What I do is to insert new column before and after then copy and paste the $ to previous column and the parenthesis to the next. Is there anyone knows to automate this using script.
If your tabel isn't too complicated you can use this workaround:
1) convert table to text with TAB separator
2) replace "^t$(" to "^t$^t("
3) replace ")" to "^t)"
4) convert text to table
But what with "(" ?
Do you want to have this:
$ | (123.45 | )
or
$( | 123.45 | )
robin
www.adobescripts.com
Similar Messages
-
Need help creating script for specific instance
I am having trouble coming up with a working script for this part of the pricing form I am editing. I am trying to get the calculation fields to the right to change and populate in the respective field based on the selection in the Material Type dropdown. Would it be less of a headache if I made another text field to calculate the LE versions separately instead of trying to merge them into one field? I have attached screenshots below to give you an example of what I'm working with. Any help with this is greatly appreciated!
Script I'm tinkering with at the moment:
//Dropdown37 = Quantity Field
//Type of Door IB = Material Type dropdown
var x = this.getField("Type of Door IB").value;
if ( x = 1468 ) event.value = x * this.getField("Dropdown37").value;
if (x = 1202) event.value = x * this.getField("Dropdown37").value;
else event.value = 0;The comparison operator in JS is "==", so change this line:
if ( x = 1468 )
To this:
if ( x == 1468 )
(as well as the other if-statement). -
Need help writing script for Digital DAQ
Hello,
I am trying to write an aquisition program for digital input coming from a hall sensor. I will be passing a magnet over a hall sensor on a motor and want to record the number of rotations. I have pasted together a script based on various websites, but it isn't functioning the way I want. I would like to be able to collect data points indefinately, or fixed, and then print out the resulting count. I have attepted to use the ctypes wrapper in Python. The NI functions remain unchanged though, so if you don't know Python it shouldn't be a problem to read. I am using a NI PCI-6503.
NI PCI-6503
NI PCI-6503
NI PCI-6503
The code:
# C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Acq-Int Clk\Acq-IntClk.c
import ctypes
import numpy
nidaq = ctypes.windll.nicaiu # load the DLL
# Setup some typedefs and constants
# to correspond with values in
# C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h
# the typedefs
int32 = ctypes.c_long
uInt32 = ctypes.c_ulong
uInt64 = ctypes.c_ulonglong
float64 = ctypes.c_double
TaskHandle = uInt32
# the constants
DAQmx_Val_ChanForAllLines = int32(0)
def CHK(err):
"""a simple error checking routine"""
if err < 0:
buf_size = 200
buf = ctypes.create_string_buffer('\000' * buf_size)
nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
raise RuntimeError('nidaq call failed with error %d: %s'%(err,repr(buf.value)))
# initialize variables
taskHandle = TaskHandle(0)
max_num_samples = 1000
# array to gather points
data = numpy.zeros((max_num_samples,),dtype=numpy.float64)
# now, on with the program
CHK(nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle)))
CHK(nidaq.DAQmxCreateDIChan(taskHandle,'Dev1/port1/line1',"", DAQmx_Val_ChanForAllLines))
CHK(nidaq.DAQmxStartTask(taskHandle))
read = int32()
CHK(nidaq.DAQmxReadDigitalU32(taskHandle,int32(-1),float64(1),DAQmx_Val_GroupByChannel,data.ctypes.data,max_num_samples,ctypes.byref(read),None))
print "Acquired %d points"%(read.value)
if taskHandle.value != 0:
nidaq.DAQmxStopTask(taskHandle)
nidaq.DAQmxClearTask(taskHandle)
print "End of program, press Enter key to quit"
raw_input()
This script returns "Acquired 1 points" immediately, regardless of how many times the hall sensor has been switched.
I apologize for the sloppy code, but I understand very little of the underlying principles of these DAQ functions, despite reading their documentation. Seeing as how the code does not return an error, I am hoping there is just a minor tweak or two that will be farily obvious to someone with more experience.
ThanksHey Daniel,
Most of this script is from http://www.scipy.org/Cookbook/Data_Acquisition_with_NIDAQmx.
I needed to run the ReadDigitalU32 function in Python loop because my DAQ device did not support timed aquistion and I don't have LabView.
import numpy
import time
import ctypes
nidaq = ctypes.windll.nicaiu # load the DLL
# Setup some typedefs and constants
# to correspond with values in
# C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h
# the typedefs
int32 = ctypes.c_long
uInt32 = ctypes.c_ulong
uInt64 = ctypes.c_ulonglong
float64 = ctypes.c_double
TaskHandle = uInt32
# the constants
DAQmx_Val_Cfg_Default = int32(-1)
DAQmx_Val_Volts = 10348
DAQmx_Val_Rising = 10280
DAQmx_Val_FiniteSamps = 10178
DAQmx_Val_GroupByChannel = 0
DAQmx_Val_ChanForAllLines = int32(0)
# initialize variables
taskHandle = TaskHandle(0)
max_num_samples = 10000
data = numpy.zeros((max_num_samples,),dtype=numpy.float64)
read = uInt32()
bufferSize = uInt32(10000)
def CHK(err):
"""a simple error checking routine"""
if err < 0:
buf_size = 200
buf = ctypes.create_string_buffer('\000' * buf_size)
nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
raise RuntimeError('nidaq call failed with error %d: %s'%(err,repr(buf.value)))
# Start up DAQ
CHK(nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle)))
CHK(nidaq.DAQmxCreateDIChan(taskHandle,"Dev?/port?/line?","", DAQmx_Val_ChanForAllLines))
CHK(nidaq.DAQmxStartTask(taskHandle))
#initialize lists and time 1
t1 = time.time()
times = []
points = []
while True:
try:
CHK(nidaq.DAQmxReadDigitalU32(taskHandle,int32(-1),float64(1),
DAQmx_Val_GroupByChannel,data.ctypes.data,uInt32(2*bufferSize.value)
,ctypes.byref(read), None))
t2 = time.time()
#data[0] is the position in the numpy array 'data' that holds the value aquired
#from your device
points.append(data[0])
times.append(t2 - t1)
t1 = time.time()
#Choose time interval between data aquisition
time.sleep(.02)
except KeyboardInterrupt:
break
#process the lists of points and time intervals as you so choose
Thanks for the help!
Paul -
Please help with script for right-mouse click on 3D objects
Hi!
I have PDF file with two simple 3d objects (for example with two cube).
I need to make script that when user right-click to first cube, a PDF file (c:\a.pdf) opening (or c:\b.pdf for second one) in new windows. How to make it? Thank you so much!Hi,
please check SDK sample 22 Right-Click, there is everything you need.
First catch RightClickEvent, then create the menu entry when beforeAction = true, and when beforeAction = false you have to remove it again (otherwise you will receive an error when rightclicking again).
Regards
Sebastian -
Need Help with script For Bulk Users Name & Description Updation
Hi Guys,
I have below requirement :
We are having one windows 2008 stand alone server with 200+ local users (No Active Directory Account).
1. Requirement is to update each account's "Full name" and "Description field" with same text. Which means , Full name and Description field will be same with same text. No other changes are required. )Attached the screenshot)
Can you guys pls help me out with any scripting (vbs , powershell , DOS .etc etc) method to accomplish this task quickly as manual process is very troublesome and take long time.
Any help will be highly appreciated,
Thanks,
Suvajit BasuHi,
I dont have any script but seeking for a help.
Thanks,
Suvajit Basu
In that case you should read this first:
https://social.technet.microsoft.com/Forums/scriptcenter/en-US/a0def745-4831-4de0-a040-63b63e7be7ae/posting-guidelines?forum=ITCG
Prewritten scripts can be found in the repository (Brent has already suggested one for you):
https://gallery.technet.microsoft.com/scriptcenter
If you can't find what you need and you can't write your own, you can request a script here:
https://gallery.technet.microsoft.com/scriptcenter/site/requests
Let us know if you have any specific questions.
Don't retire TechNet! -
(Don't give up yet - 13,085+ strong and growing) -
Need Help with scripting for Automator/AppleScript.
Hi everybody,
I am building a small app for my mac, What I need is a script that can rename a file that I drop on it.
and example being:
example.jpg
(when I drop it on the app, I want the app to change the filename of the document to "Image.jpg"
I have tried this with Automator, but it requires that I specify the file to be changed, what I need is something that will change the name of any file I drag onto it.
I am using it for application specific files.
Kind regards,
Pete.
iBook G4; 60GB Hard Drive, 512MB RAM, Airport ExtremeOpen the Script Editor in the
/Applications/AppleScript/ folder and enter the
following:
on open(the_file)
tell application "Finder"
set name of the_file to "Image"
end tell
end open
Save this script as an application.
(11347)
this script compiled correctly; however when run it returned the following error "Can't set name of (the_file) to "Image.jpg"
I am also given the option of editing the script or just quitting.
thanks for your help -
Please someone on this Earth tell me how to obtain a CASE NUMBER so I can transfer a license...
For the LOVE of God, please someone, anyone tell meThank you for your help are you aware of any apps that will work the iso 4.2.1 system that will let you watch movies on the phone. Also I tried to down load something else the other day and got message that Safari wont let you open this is ther any to see if i have the latest safari on my phone?
-
Please help with script for 3D object
Hi!
I have PDF file with simple 3d object (for example a cube).
I need to make script that when user right-click to this cube, some PDF file (c:\mypdf.pdf) opening in new windows. How to make it? Thank you so much!Hi!
I have PDF file with simple 3d object (for example a cube).
I need to make script that when user right-click to this cube, some PDF file (c:\mypdf.pdf) opening in new windows. How to make it? Thank you so much! -
Gurus,
I am looking for the scipt which should find the name of table in the current and other schemas .. i.e if I give a table name, may be as parameter to the procedure, it should search for that table name in my current schema or other schemas in my database.
Likewise, if I provide table name, the script should find the name of the column name which I have provided exists in that table or in any other tables.
Can anyone help me with the scripts
RegardsI am looking for the scipt which should find the name of table in the current and other schemas .. i.e if I give a table name, may be as parameter to the procedure, it should search for that table name in my current schema or other schemas in my database.You need to query dba_tables
select *
from dba_tables
where table_name = 'MYTABLE'
Likewise, if I provide table name, the script should find the name of the column name which I have provided exists in that table or in any other tables.
select *
from dba_tab_columns
where table_name = 'MYTAB'
and column_name = 'MYCOL' -
Hi everyone,
I have some 300 images, all handheld shots done in an on-location studio set. They all need varying amounts of image rotation since they're handheld. There's a beaded curtain in the background, so manually I use the ruler tool, draw a line along a strand of beads, and then image/rotate/arbitrary.
I need to create an action that will (1) do the arbitrary rotation and then (2) save and close the file.
However, when I record this, the value of the rotation of the sample file I'm working is what gets recorded (not surprising). In other words, if image A needs 0.28 degrees of rotation, that's not what I want for image B which might need -0.15 degrees instead. The action recorded 0.28.
Is there a way to create an action that will simply rotate according to the ruler once I've drawn it?
Thanks!
JerryTrue - and I am a keyboard shortcut dude. But got it working (I was impressed that using the mouse to unclick the last step in the history worked...), and things are doing what I needed.
And I'm hoping that my suggestion of the last-step undo will make CS5 on par with CS6 in this one small aspect, and perhaps help someone else...
Many thanks to you!!!
BTW - all in the FWIW - you can see what our work as photographers looks like here:
http://www.jerryandloisphotography.com.
If you are at all into music/rock 'n roll, you'll probably have fun on our music/stage gallery. Groups like YES, Heart, Thomas Dolby, etc. use a bit of our work - just a bit of fun...
Again - thanks and best wishes,
Jerry -
Help with script for "Import AD users from CSV with checks first"
Hi everyone.
Can anyone tell me if i am on the right track here?
I want to be able to provide a CSV with users and import into a new AD domain/forest. But i know there already are some AD accounts so i need to run some checks. For now i am checking only on Name and Email.
The issue i have is is with "write-host "$UserFullName was not found. Creating user.". It outputs this 19 times which is the same amount of times as there are users in AD in this OU.
Not sure if my method is right.
$allImportedUsers=@()
$allUsersArray=@()
$searchbase="OU=PL,DC=EUECS,DC=CORP,DC=ARROW,DC=COM"
$path = "OU=Users,OU=PL,DC=EUECS,DC=CORP,DC=ARROW,DC=COM"
$allImportedUsers = Import-CSV polandusers_edited.csv
$allUsersArray = Get-ADObject -LDAPFilter "objectClass=User" -SearchBase $searchbase -Properties * | select *
$allImportedUsers | ForEach-Object {
$Firstname = $_.givenname
$Lastname = $_.surname
$UserMail = $_.EmailAddress
$UserFullName = $Firstname+" "+$Lastname
$importUserSAM = $_.Samaccountname
$allUsersArray | ForEach-Object {
$currUserFirstname = $_.givenName
$currUserLastname = $_.sn
$currUserMail = $_.mail
$currUserFullName = $_.name
$currUserSAM = $_.samaccountname
$currUserDN = $_.DistinguishedName
if($currUserFullName -eq $UserFullName) {
write-host "CSV $UserFullName matched on name"
$userMatched=1
if($currUserMail -eq $UserMail -AND $userMatched -ne 1) {
write-host "CSV $UserFullName matched on email"
$userMatched=1
if($userMatched -ne 1) {
write-host "$UserFullName was not found. Creating user."
$userMatched=0
If only i had a cool signature!! ;)Move below to outside the inner for-each loop:
if($userMatched -ne 1) {
write-host "$UserFullName was not found. Creating user."
$userMatched=0
so the bottom should look like
}if($userMatched -ne 1) {
write-host "$UserFullName was not found. Creating user."
$userMatched=0 -
Help Please! Chemo patient needs to walk and iPod not working
iPod Nano (4th or 5th gen) operates perfectly and battery is fully charged when plugged into the Mac, but as soon as I disconnect, can't get it to turn on. Is not in hold position and also tried reset. Any ideas? Thanks much!
It sounds like the battery is dead and in need of replacement. You can have this done by Apple for a flat fee or you can send it into a third party repair service center for a little less. The choice is yours.
Google "iPod battery replacement."
B-rock -
Help please with adf table select one
Greetings:
I have a table made from a "data control" an af:tableSelectOne. I put an af:CommandButton on the same page. When I click this button I want to set the current record to the selected row, then I forward to a page where the user is asked to confirm deletion of the selected record. My problem is that no matter what I select the first row is always returned.
What I tried to do was binding setCurrentRowWithKey to that button, this made no difference in the behavior. The delete page always comes up with the first row selected.
Any help greatly appreciated.
Thanks
troyIs your button inside the <af:tableSelectOne> area?
This should work by default if you drag the data-control to create a table with a select option and a submit button. Then you can drag the delete button next to the submit button, or even bind the delete operation to the existing submit button. -
Help please Mail for Exchange 2.5.5 - 6124 - Excha...
If anyone could help me I'd be very grateful. I have searched the web for hours to try and find a solution to my problem and have an ongoing support call with Nokia support but they haven't been able to help me.
My problem is that when I try a manual sync of mail for exchange 2.5.5 (or 2.5.3) on a Nokia 6124 I get the following error:
System Error. Try again later
Here is the contents of the admin log generated on the phone:
01/08/2008 10:13:04 OffPeakTime active
01/08/2008 10:13:04 OffPeakTime active
01/08/2008 10:13:04 Setting OFFLINE Status to False
01/08/2008 10:13:04 Setting ROAMING status to False
01/08/2008 10:13:04 Setting DISK FULL status to False
01/08/2008 10:13:10 Missing Protocol Version Header. Reverting to EAS 2.0
01/08/2008 10:13:12 Unable to Process Server Response -- KErrCorrupt
I have another nokia phone (E50) which synchronises with the same server and account using the same sim card so I know the problem is not at the exchange end.
More details (some probably not necessary) below
Phone: Nokia 6124
Exchange version: 2003 SP2
MailForExchange: 2.5.5_S60_3_1
Mail for exchange profile settings:
Connection
Exchange server: mail.domainname.co.uk/exchange
Secure connection: No
Access point: Contract Wap
Sync while roaming: No
Use default port: Yes
Credentials
Username, password and domain all triple checked!
Sync content
Synchronise calendar: No
Synchronise tasks: No
Synchronise contacts: No
Synchronise e-mail: Yes (starting simple!)
In case of conflict: Server wins
Sync schedule
Peak sync schedule: Manual
Off-peak sync schedule: Manual
E-mail
E-mail address: Checked and correct
Show ne mail popup: No
Use signature: No
Signature: None
When sending mail: Send immediately
Sync messages back: 1 dayHi,
The Server Name should be "mail.domainname.co.uk". I'm not telling you to drop the .com/co.uk from the Server Name! Just drop the '/exchange' from the Server Name.
Try accessing this via the IE. I mean the whole qualified name "http://mail.domainname.co.uk/exchange". It should prompt u for a User ID and Password? The try logging in by prefixing the User ID with the domainname\UserID and then a valid password.
What is the domain name that you require? Keep this as the Domain name in the MFE.
E.g You logged in as hello-dom\robstoves and then a valid password, then the Domain Name in MFE would be simply "hello-dom"
Hope this hasn't confused u even further
Give it a try.
//Saquib -
Helpful Shell Scripts for Making Work Simpler with OVM
Hi guys we are working on Oracle VM,
I have created some scripts which will run on OVM Server .Hope they will be useful to you.
These script are created keeping in mind OVM Manager is not available.
I have created two scripts to make the following task possible through OVM Server.
1>To take vnc console of the machine by just giving guest name.
2>create virtual machines using template.
Please share your views about the scripts.
1)To take vnc console of the machine by just giving guest name.
#This script will export DISPLAY variable globally
if [ -z "$DISPLAY" ]
then
echo "Please Enter IP address of your machine"
read ipadd
export DISPLAY="$ipadd:0.0"
else
echo display is already set
fi
echo "Please Enter the Name of the virtual machine you want to take the console"
read MachineName
xm list $MachineName -l |grep 0.0.0.0: > tempdisplay
cat tempdisplay | awk -F"0.0.0.0" '{print $NF}'> temp2display
#sed s/"(location 0.0.0.0"/""/ tempdisplay > temp2display
tempvariable=`sed s/")"/""/ temp2display`
vncviewer $tempvariable &
rm -f tempdisplay
rm -f temp2display
Edited by: user10373165 on Nov 22, 2009 10:46 PMYou probably want to wrap your code samples with a tag. It looks like some of the script text is not showing up.
Maybe you are looking for
-
Itunes library.itl won't open
I upgraded to Mountain Lion and my iTunes wouldn't open: the error was that Itunes Library.itl was written by a newer version of iTunes (ML ships with 10.5.3 but I'd already upgraded my time machine based mac to 10.6.3). When I did the "Check for upd
-
Windows 7 on iMAC 27" , I need help in the decision please?
Hi All, I just got the iMAC 27" i7 with 4GB RAM and planning to upgrade to 8GB soon. I need to install Windows, but as I heard that BOOTCAMP supports vista and windows 7 is not officially supported, should i go for vista? or try to install windows 7?
-
Hello everyone, I just bought a used Ideapad s12 with the Via CPU. Model number is 20021 Last owner had a bios password that he couldn't recall so I'm stuck here. Already tried two solutions to reset the bios that I knew but neither worked (1st remov
-
I can't import images when I have video on the same card.
I can't import images when I have video on the same card. I am using Lightroom 5.6 and OS 10.9.4 I found a work around, but was wondering if there is something that fixes that issue. Thanks in advance for any help. Angy
-
Moving Subtitles from one project to another
To make work on a project more efficient, we started a project on one computer with only the film track for subtitling, whilst authoring the DVD on an other computer, another project. So, how do we move the subtitles created in one DVDSP project into