How do I locate column/row (number) selected in applescript
I require a simple script to adjust the column widths of the current selected column only. I want to base it on a script below which I found on the internet. This script adjusts multiple column widths to the value input and adjusts the stub column to the remaining space. I would like to know how easy it is to create a script with a similar input window that adjusts the column/row selected leaving the others in tact.
tell application "Adobe InDesign CS4"
activate
if class of parent of selection is not cell then
display dialog " Do not highlight any cells " buttons " OK " default button 1 with icon caution
else
set monTableau to parent of parent of selection
set NbColonnes to count columns of monTableau
set monBlocTexte to parent text frames of selection
set maBoiteTexte to item 1 of monBlocTexte
set {y, x, h, l} to geometric bounds of maBoiteTexte
set largeurBloc to (l - x)
tell text frame preferences of maBoiteTexte
set NumColTexte to text column count
set largGout to text column gutter
end tell
display dialog "Width of columns (mm) " default answer 20
set largeurTexte to text returned of the result
set largcol2 to (largeurTexte as integer)
set largcol1 to ((largeurBloc - (NumColTexte - 1) * largGout) / NumColTexte - (NbColonnes - 1) * largcol2)
if largcol1 < 2 then
set largcol1 to ((largeurBloc - (NumColTexte - 1) * largGout) / NumColTexte) / NbColonnes
set largcol2 to ((largeurBloc - (NumColTexte - 1) * largGout) / NumColTexte) / NbColonnes
end if
set width of column (1) of monTableau to largcol1
repeat with counter from 2 to NbColonnes
set width of column (counter) of monTableau to largcol2
end repeat
end if
end tell
Your help will be greatly appreciated
Thanks
Dave Williams
Perhaps like this:
tell application "Microsoft Excel"
set i to first row index of active cell
end
log i
Regards,
H
Similar Messages
-
How do I locate the serial number for my I-Pad?
How do I locate the serial number for my i-pad?
Its printing in tiny numbers on the back of your iPad, in settings, general, about on the iPad, on the box, in iTunes under account information.
-
How can i know the row number of my table is being modified?
HI all,
I have a table in my web dynpro and several columns as checkbox... I put an event OnToggle in these columns.
Do you know any way to get the row or the row number?
If i use the method get_static_attributes return to me the selected row not the modified.
Thanks in advance !EDIT: thanks ! is solved, i need to pass CONTEXT_ELEMENT' in the <ELEMNT_NAME>
This is my code:
DATA table_element TYPE REF TO if_wd_context_element.
DATA row_index TYPE i.
table_element = wdevent->get_context_element('CONTEXT_ELEMENT').
IF NOT table_element IS INITIAL.
row_index = table_element->get_index( ).
ENDIF.
Edited by: Husalban RM on Sep 15, 2010 4:53 PM -
How to set the first row as selected in single selection of table
when the page renders how do we make the first row as selected for single selection in a table.
Thansk a lot for your helpset the selection Attribute's value to 'Y' for the first row. Thats enough.
eg;
Row row=vo.first();
row.setAttribute("SelectionAttribute", "Y");
--Prasanna -
How can I move to row number with a search Query
Hi everybody,
Does anybody know how can I located a record in a multiple block, with a SQL sentence, using bind variables.
Thanks in advicedWelcome to the Apple Discussions!
Unfortunately, since Front Row has no preferences you can actually change, there's no way to change the screen now. (Besides the work arounds you've already discovered.) I would send Apple some Mac OS X feedback (since Front Row is considered part of OS X, not a stand-alone application) and let them know you'd like to be able specify the screen. You're not the first person here to ask for that option.
http://www.apple.com/macosx/feedback/
-Doug -
How can I locate my serial number for the Student and Teacher Edition
All I am trying to do right now is to obtain the serial number for my Student and Teacher (Academic) Edition <removed by moderator>, but I wanted to use my personal (home) e-mail address since this purchase is to be installed on my home computer. The validation process seems to require my work e-mail address or a work id with embossed date (ours had no date and my id is at work). The e-mail prompt indicates that all e-mail correspondence will go to the address I enter so if there is e-mail regarding this installation, on my home computer at my home e-mail address, any such e-mail instructions would then go to my work e-mail address. So how do I obtain my serial number?
I have removed your coupon/product code as this is a public forum. I would recommend reviewing the I have a Student and Teacher edition product section of Find a serial number.
-
How can I get the row number of display automatically on a table?
I have a table of measurements, and I would like the row number to be displayed on each row. The challenge is that each time I run the program, the total number of rows will be different, so I would like the numbers to update every time I run the program based on the current number of rows.
I have attached a picture to illustrate what I am trying to do.
Solved!
Go to Solution.
Attachments:
picture of table.JPG 70 KBFind the attached example (saved in version 2009), and you can extract what you need for your code...!!
I am not allergic to Kudos, in fact I love Kudos.
Make your LabVIEW experience more CONVENIENT.
Attachments:
Example (Enter Row Header).vi 12 KB -
How to convert into columns rows
Hi all,
How to convert columns into rows.
thank you
regards
P PrakashWhats your DB Version. If its 11g and above you can check out PIVOT and UNPIVOT clause of SELECT statement. Its a new feature of 11g.
For previous version just search this forum you will get lots of examples. -
How to add dynamic columns & rows
I want to display the data in the columns (seperated by partition) of the fieldNames I select.
Suppose my Query is like
Select Fax,Phone from Customers
Now I want to display the data of Fax& Phone in two different columns & its heading as also Fax & Phone
My code for the same is like this
This is my Northwind.jsp
<%@ taglib uri = "http://java.sun.com/jsf/core" prefix = "f"%>
<%@ taglib uri = "http://java.sun.com/jsf/html" prefix = "h"%>
<f:view>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Northwind</TITLE>
<LINK REL = "STYLESHEET" HREF = "./css/styles.css" TYPE = "text/css">
</HEAD>
<BODY>
<CENTER>
<TABLE BORDER = 5>
<TR>
<TH CLASS = "TITLE">
Northwind Database
</TH>
</TR>
</TABLE>
<P>
<h:panelGrid id="MainGrid" />
<h:dataTable binding="#{fieldList.dataTable}"
value= "#{fieldList.data11}"
var= "#{row}" border="1"
id="RootTable" />
</CENTER>
</BODY>
</HTML>
</f:view>My java code for the same is as follows
public UIData getDataTable()
javax.faces.component.UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
UIComponent panelGrid1= root.findComponent("MainGrid");
UIComponent datatable = panelGrid1.findComponent("RootTable");
UIData dataTable= new UIData();
UIColumn col;
UIOutput out = null;
Application app = FacesContext.getCurrentInstance().getApplication();
int ctr=getCounter();
int colCount = 1;
for(int j = 0; j < colCount; ++j)
out = new UIOutput();
col = new UIColumn();
HtmlOutputText headerComponent = new HtmlOutputText();
headerComponent.setId("Header1"+ctr);
col.setHeader(headerComponent);
headerComponent.setValue(fieldName);
ValueBinding vb = app.createValueBinding("#{data11}");
out.setValueBinding("value", vb);
out.setRendererType("javax.faces.Text");
col.getChildren().add(out);
dataTable.getChildren().add(col);
ctr++;
panelGrid1.getChildren().add(dataTable);
return dataTable;
public Result getData11()
System.out.println("In getData11");
try
Context context = new InitialContext();
Map sessionMap=FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
FieldList flist=(FieldList)sessionMap.get("fieldList");
DataSource dataSource =
(DataSource)context.lookup("java:comp/env/jdbc/Northwind");
Connection connection = dataSource.getConnection();
Statement statement = connection.createStatement();
String query = getQuery();
System.out.println("In getData11 ::query::::::::"+query);
ResultSet resultSet = statement.executeQuery(query);
ResultSetMetaData rsmd = resultSet.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
// System.out.println("resultSet.getMetaData() numberOfColumns="+numberOfColumns );
for(int ii=1;ii<=numberOfColumns;ii++)
System.out.println("rsmd.getColumnName(ii)::::::::"+rsmd.getColumnName(ii));
System.out.println("numberOfColumns::::::::"+numberOfColumns);
boolean b = rsmd.isSearchable(1);
Result result=ResultSupport.toResult(resultSet);
return(result);
} catch(Exception e)
System.out.println("Connection error "+e);
return(null);
}Here I am not getting the data but I am getting the header name with no data in it.
Can Anybody tell what is wrong in the code or how it should be done.Hi,
You can add columns dynamically ,
In your bean code
private UIColumn mycolumn = new UIColumn();
public UIColumn getMyColumn() {
return mycolumn ;
public void setMyColumn(UIColumn uic) {
this.mycolumn = uic;
and in your jsf page
<h:column binding="#{YourBean.mycolumn }" id="column1">
<h:outputText value="My Value"/>
<f:facet name="header">
<h:outputText value="My Header"/>
</f:facet>
</h:column> -
How to compare all columns in a SELECT with all columns in a Cursor ?
Hi All,
I would like to know if something like this is possible in PL/SQL
I have a cursor CUR1 which is a SELECT * FROM T1.
And in my loop for every record found in CUR1 I am trying to retrieve its consecutive record in the table T2. Unfortunately T1 and T2 do not have a primary key so there are duplicates. But if I can compare each column of CUR1 with its respective column in T2, I can find the record. But the question is how ?
So I tried something like this, but of course this is wrong, but hope this would give you an idea of what I trying
VAR_T2 T2%ROWTYPE;
CUR_T1 IS SELECT * FROM T1
LOOP CUR_TI
SELECT * INTO VAR_T2
FROM T2 WHERE
‘ALL COLUMNS OF T2’ = ALL COLUMNS OF CUR1;
So is there a easy way to accomplish this. Thank you, AJAs Walter says, this is simply an intersect if you are comparing all the columns.
However, if you really must do it in a slow by slow, PL/SQL loop (no real valid reason why you would though)...
DECLARE
VAR_T2 T2%ROWTYPE;
CUR_T1 IS
SELECT * FROM T1;
BEGIN
FOR i IN CUR_TI
LOOP
SELECT * INTO VAR_T2
FROM T2
WHERE T2.col1 = i.col1
AND T2.col2 = i.col2
AND T2.col3 = i.col3
AND T2.colN = i.colN;
END LOOP;
END;There is no simple mechanism for just saying "compare all the columns", you will have to specify each one individually in the WHERE clause. -
How to make a new row as selected in adf table
Hi,
I am adding a new row to my table as below.
DCBindingContainer bindingContainer =
(DCBindingContainer)ADFUtil.evaluateEL("#{bindings}");
DCIteratorBinding iter = bindingContainer.findIteratorBinding("IfwSystemBrandView1Iterator");
ViewObject vo = iter.getViewObject();
row = vo.createRow();
row.setNewRowState(Row.STATUS_INITIALIZED);
vo.insertRow(row);
This code is adding a new row at the end of the table.
I want this new row to be selected after it gets added.
How to achieve this??
Thanks,
PraveenYou should mention your JDev version!!!!
in 11g you can archive this like
BindingContext bctx = BindingContext.getCurrentInstance();
BindingContainer bindings = bctx.getCurrentBindingEntry()
DCIteratorBinding dcIterator =
(DCIteratorBinding) bindings.get("IteratorBindingName");
Row rw = dcIteratorBinding.getRowSetIterator().createRow();
rw.setNewRowState(Row.STATUS_INITIALIZED);
//insert row to iterator
dcIteratorBinding.getRowSetIterator().insertRow(rw);
//make new row the current
dcIteratorBinding.setCurrentRowWithKey(
rw.getKey().toStringFormat(true));or better if you have access to the table (
private void createRowInTable(RichTable table){
CollectionModel model = (CollectionModel ) table.getValue();
JUCtrlHierBinding _binding = (JUCtrlHierBinding) model.getWrappedData();
DCIteratorBinding dcIteratorBinding= _binding.getDCIteratorBinding();
Row rw = dcIteratorBinding.getRowSetIterator().createRow();
rw.setNewRowState(Row.STATUS_INITIALIZED);
//insert row to iterator
dcIteratorBinding.getRowSetIterator().insertRow(rw);
//make new row the current
Key k = rw.getKey();
dcIteratorBinding.setCurrentRowWithKey(k.toStringFormat(true));
}Timo -
How do I locate my MAC number?
Got my IMac to run on my Airport wireless and it operates well, however everytime the Imac goes to sleep the Network connection defaults to look for an 'ethernet' connection. To change that default, the prompt asks me to provide my MAC number. As I've tried various entries without success...
My thanks in advance.
BobTo get your iMac's MAC (short for Media Access Control) address, open the Apple System Profiler (under the Apple menu, select About this Mac, and click More info). On the left side of the resulting window, under Network select Locations. Look to the right, under Services then Ethernet, below this you'll see Hardware (MAC) Address. The string of characters to the right of that is your Ethernet port's MAC address. There is a similar entry under AirPort.
Best of luck. -
How do I locate my serial number from the Student & Teacher edition
Jeff A Wright
I bought a copy of photoshop cs5 a while back and never loaded it. It is a student edition and I am still taking classes in which I need to use the program. I am no longer able to complete work in the class room so I do need to load it at this time. It looks like where I got into wants me to buy another copy. How do I load my student verification so I can get to the right place.
Thank you
DoraDosaigeon I would recommend reviewing the I have a Student and Teacher Edition product section of Find a serial number. The process varies depending on how you purchased the product and what country you are located in.
-
How do I locate my serial number
How do I use my redemption code to download my serial number for adobe photoshop elects
Photoshop Elements is not part of the Cloud, I will move this to that forum
Photoshop Elements Forum http://forums.adobe.com/community/photoshop_elements
Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html
-or https://forums.adobe.com/thread/1572504
Select a topic, then click I STILL NEED HELP to activate Photoshop Elements Online chat
-http://helpx.adobe.com/contact.html?product=photoshop-elements or
http://helpx.adobe.com/photoshop-elements/kb/troubleshoot-installation-photoshop-elements- premiere.html -
Here's a sample of the invoice. I would like to automatically calculate the 'amounts', 'totals' and 'subtotals' sections.
Is this possible? How do I do it?Got it!
Select the cells you wish to either SUM, PRODUCT, COUNT, etc...
Then, at the top of the screen, press on the INSERT heading,
then press on the FUNCTION setting,
then press on the actual function you are looking for,
and it should automatically insert the function into the appropriate cell it is needed....
Maybe you are looking for
-
MSI Z87-G45 GAMING.. does the killer networking work with Windows 8.1?
I was scrolling through the reviews for this board and someone mentioned in the reviews that the killer networking isnt supported with windows 8.1 yet. Is this still true or are there updated drivers for windows 8.1 now? Thanks.
-
Need some Help with CFUPDATE into MySQL
Hi I am trying to update a MySQL database with a Coldfusion Form which has brought in the information from another form. The Form action for the update form is as follows: <form action="update_sup.cfm?GID=#qsupname.SupplierCode#" method="post"> This
-
even though it says i succesfully downloaded itunes when i try to run it i get an error message that says itunessetup.exe is not a valid win32 application - i have windowns xp - not sure what i'm doing wrong
-
HT4623 Greyed out sync to phone button
Hi I have an iphone 4, which used to be synced with my Mothers itunes, but with my own username and password etc, I have now got itunes of my own and made a purchase tonight on itunes, however this tune will not go on to my phone for some reason...I
-
Game pauses upon playing a sound
I have a class in my flash project called "Resource" which I have designated to contain all the external files outside the flash documnent. When I play a sonud from this class, it seems that my program pauses until the sound is fully loaded, and then