Get only the selected tabs
I have the chore of adusting thousands of tab stops in hundreds of paragraph styles and stole scripts useful to reset the tab stops. I thank anyone who has ever displayed such extract.
I thought it would be easy to write a tab-nudger, the idea being that the user could select a range of text containing tabs and add or subtract a point at a time, but only for tabs in the selection.
The obstacle is that
App.Selection [0]. TabStops
Returns all the tabs tab in the paragraph, even if the selected text contains only one or two of the related tab characters. So I guess that the script would somehow determine which tab stops at the point go with tab characters in the selection. But her party "somehow" left me speechless.
Hello
As you have noticed, each PointInsertion, Word, line, text has the same tabStops set as a parent.
Succesful edit tabStops associated with the current selection needs to discover:
- How many legs (characters) are inside selection comparing to the whole paragraph.
- tabStops how are defined for the current text selection (supposed to be at least as much as the number of tabs inside the paragraph)
Below the function returns an array that contains two elements:
Array [0] ==> number of defined tabs for the current selection (perhaps it is necessary to add some)
[1] table ==> table with the tabStops indexes associated tabs in the current selection.
function tabsFromSel() { var tabStopsArr = [], k, stop; if (!app.selection[0].hasOwnProperty ("baselineShift") ) return false; app.findTextPreferences.findWhat = "\t"; var tabSel = app.selection[0].findText(); if (!tabSel) return false; var tabTot = app.selection[0].paragraphs[0].findText(), len = tabTot.length, lenSel = tabSel.length, tabStopsDefined = app.selection[0].tabStops.length; while (len-->0) if (tabTot[len]===tabSel[0]) break; stop = len + lenSel; for (k = len; k < stop; k++) tabStopsArr.push(k); return [tabStopsDefined, tabStopsArr]; }
So it could be a foundation for other changes (i.e. the user interaction with the dialog box)
Function returns false if there is No text_selection or without tab found inside the selection
Jarek
Tags: InDesign
Similar Questions
-
Hello world
Suppose I have a table emp that has thousands of lines of data. In this table of employees receive wages between 1000-10000.
Now I have to get only the employees whose salary is equal.
for example
empNo empName sal
----------- ------------- ---------
1 ram 5000
2 5000 Shyam
3 1000 Dilip
4 deepak 2000
5 sisi 1000
6 1000 Priya
so now...
Now without using ' select * from emp where Sal IN (5000,1000). "How can I get these employees with the same salary?
SELECT *.
EMP e1
WHERE EXISTS (SELECT 99 FROM emp e2 WHERE e2.sal = e1.sal AND e2.empno! = e1.empno)
or maybe
SELECT *.
WCP
WHERE sal IN (SELECT sal FROM emp GROUP BY sal HAVING COUNT (*) > 1)
-
How to save only the selected line
Hi all
I have a page master / detail with two regions advanced table.
Region of the main table has a transient 'SelectFlag' attribute to display the detail records.
When I make a few changes to a master record and save it is save all records on the page.
I want to save only the selected record.
How to get there?
Help, please. :)You need to loop through the rows using RowSetIterator.
Reference http://oracleanil.blogspot.com/2010/05/delete-exercise-delete-row-from-table.html
-Anand
-
Get only the Apple logo on my iPhone 5 s
I get only the Apple logo on the iPhone 5 s. Tried to update and restore through iTunes but it would not be completed that.
Hello
On the computer, make sure that iTunes is up to date.
Mac
- Open iTunes.
- In the MenuBar at the top of your computer screen, choose iTunes > check for the updates.
- Follow the prompts to install the latest version.
Windows
- Open iTunes.
- In the MenuBar at the top of the iTunes window, choose Help > check for updates. Learn what to do If you see not the menu bar.
- Follow the prompts to install the latest version.
-
When I launch Firefox, I get only the bottom of my browser in the Firefox window. I have the normal window for 1 second, but it changes in the background window only. So, without the toolbar or navigation. I have already reinstalled it, but it does not solve the problem.
Hello jonson00, please follow the troubleshooting steps in Firefox opens with a white or transparent window. If this solves the problem, it would be also interesting including the extension has a problem in your case. Thank you!
-
My first attempt seemed to work although I don't not re-install all the drivers at this time here. When I then turned on computer, I got a white screen. I took advice and tried to install xp again. I get regarding the selection of CD/DVD to install (enter), then I press any (I have not pressed a key any), screen is empty, and that's all.
Hello
It seems that this computer is not able to detect the drive. Use the steps described in the article mentioned below to clean the disk, and then try to install XP.
How to troubleshoot common problems that occur when a Windows XP-based computer cannot read a CD or DVD
http://support.Microsoft.com/kb/321641
If you are able to boot to the desktop without inserting the disc, please perform a flat installation.
How to perform a flat Installation of Flat copy CD to hard drive:
http://support.Microsoft.com/kb/294727 -
I've lost the main screen for photoshop! I don't know what I did, but now when I open photoshop, I get only the tool bar at the top and a little on the sides. How can I go back to the normal screen?
Hi renaeb,
Would you go to the Windows menu in Photoshop and check the option framework application from the drop-down list.
Concerning
Sarika
-
Uninstalled Potoshop Elements 7 on my old PC. Tried to install on the new PC, you get only "the code you entered is invalid." How can I install on my new PC, it's bought and paid for and if I look at my account, it is there. Cannot find any e-mailadress support. What should I do?
Error "serial number is not valid for this product". Creative Suite
http://helpx.Adobe.com/Creative-Suite/KB/error-serial-number-valid-product.html
-
The Adobe Desktop installation program will not load the app screen tab, all I see is the loading icon and runs continuously without ever loading. All the other tabs seem to load without any delay, only the app tab does not load. I tried to uninstall and reinstall the software, rebooted a couple of times and tried to activate the download of the Premier Pro via the website, but it still doesn't load in the desktop application.
This solved the problem for me:
Use the CC cleaning tool to resolve installation problems. CC, CS3 - CS6
-
Export only the selected rows of a partition
Hello
Is there a method to export only the selected rows of an artition using export utility
Thank you
Lbn76See http://docs.oracle.com/cd/B28359_01/server.111/b28319/dp_export.htm#BEHEJDBE
Concerning
Karan -
How to get only the whole ticks on a horizontal axis of a graph?
Hello
Could someone help me find oout how to get only the whole ticks on a horizontal axis of a graph?
When I have a number less than 5, I get like 0, 0.2, 0.4 ticks... while I want it to be 0, 1, 2...
Thank you
Yannhealer
Try this Clara. Put this inbetween your chart labels:
Set the interval to meet your needs of 'tick '.
-
Get only the alphanumeric column numbers
Hi all
How can I get to the numbers in the alphanumeric column?
I use the following question for this.
with tab as)
Select 25 - Abc' key1 of union double all the
Select 233 - xyz' key1 of union double all the
Select 'x23A' key1 in union double all the
Select 91 w-2-dd-2' double key1
)
tab, select regexp_substr(key1,'[[:digit:]]+')
But here the last row (91-w-2-dd-2) returns only two first digits (91). But I need 9122.
My version of oracle's 10g release 2.
Thank you
SujnanThis can do
Processing ... with tab as ( select '25-Abc' key1 from dual union all select '233-xyz' key1 from dual union all select 'x23A' key1 from dual union all select '91-w-2-dd-2' key1 from dual ) select regexp_replace(key1,'[^0-9]+','') from tab Query finished, retrieving results... REGEXP_REPLACE(KEY1,'[^0-9]+','') -------------------------------------------------------------------------------- 25 233 23 9122 4 row(s) retrieved
Alessandro Bye
-
I followed the advice and imported IE Favorites, but only the first two files have met. How can I get all THE files across please?
Wow. I think I will like Firefox if the aid is so easily available, quick and as good as this. Fixed right away
Thank you very much
Kevod -
Can we get only the number of SQL varchar column?
Hi all
I have a table as below.
CREATE TABLE TEST21 (COLUMN-NAME VARCHAR2 (30));
INSERT INTO TEST21 VALUES ('23');
INSERT INTO TEST21 VALUES ('32569');
INSERT INTO TEST21 VALUES ('JAGAN");
INSERT INTO TEST21 VALUES ('12JAGAN2');
Now I NEED the DATA that contains only the digit.
SELECT * FROM TEST21 where... (PROPOSAL BY CONDITION);
COLUMN-NAME
-----------
23
32569
So is it possible?
Hello
select * from test21 where regexp_instr(col_name,'[[:alpha:]]') = 0 ; COL_NAME ------------------------------ 23 32569
-
How to get only the year of a date?
I try to shoot only the year of a date and does not know how this can be done. I tried the SUBSTR function but its does not not how I think. What I want to do, it is write a condition indicating the year of birth of point = current year minus 23, I have a calc than the figures of the age of the difference in the date of birth and the current year, but I'd really like to just write a condition based just a years. Is this possible?Hello
SUBSTR only works on a string. To extract parts of a date, you must use the TO_CHAR command.For the year, you would use this: TO_CHAR (the_date, 'YYYY')
To_char takes 2 switches, the date to be handled and the part to be extracted, with the portion between apostrophes.
Once you get used to manipulate dates as this other common areas are: DD - extracts the day of the month, MY snippet code to 3 characters for the month.
For example, you can use this: TO_CHAR(sysdate,'DD-MON-YYYY') and it converts the current date, June 7, 2012 to June 7, 2012
Hope this helps
Best wishes
Michael
Maybe you are looking for
-
Pavilion dv7: Reinstall window7
I reinstall Windows 7 basic after completely formatting the drive 'C '. but when I start the system after the installation is complete. at the start it showing both system and windows 7 application for selection. again once I reinstall and format the
-
HP Photosmart C4480: INCOMPATIBLE PHOHOTOSMART C4480 HP Print CARTRIDGE
My printer takes 350 and 351 ink cartridges I buy from Tesco. Suddenly, I get the message "Incompatible print cartridge". A week ago, I changed the cartridges, and they have been printing fine but now this message. No idea what to do next as he com
-
Hello Is it possible to run 8.6.1 Run Time Engine on Windows CE platform? The reason why I ask is because I am trying to display a table of command, I created in LabVIEW 8.6.1 on a TPC-2012. The remote control publishes a VI running on a cRIO-9012. I
-
is there a driver for the faxphone l80 printer that works with Vista home edition
Identical to the subject
-
I don't know what this is... i have an old graphics... from 2001 if it is than its reference. I met all the other requirements to run Windows 7, but this one... What do I need and where can I get... what to look for when shopping for it? Send an emai