How do I select current Event in Applescript?
I'm trying to create an Applescript that will act on the actively selected Event in iCal. The equivalent functionality in Mail is accomplished by setting your variable to "selection".
However, in iCal, selection is not a property, and I can't find anything similar. The only way appears to be to get all events in a calendar, then prompt to choose which one you want.
Any help would be appreciated.
MacBook Pro Mac OS X (10.4.8) iCal 2.0.4
John, thanks for your answer. However, I was hoping for a programmatic way, just by having the Event selected, instead of having to type in begin and end dates each time I want to select an Event.
Actually, I think I did figure out a way to do it last night, through a round-about way. I found someone else's script that copies the selected Event to the clipboard, then pulls out the first 2 lines of text, which are the Summary and Date. I then have my script repeat through all Events looking for the Event that has the same Summary. Once it finds it, I then have the reference to my selected Event.
I patched it together with another script I found, so I can now manually change the Attendee status for Events, since iCal won't automatically process replies from MS Outlook users. If anyone's interested in my finished applescript, let me know, and I can post it here.
Similar Messages
-
How to generate selection change event through code in JTree?
I am developing an application which downloads the file from other system and adds it into the tree. On selecting any file in the tree I m displaying it's contents. But now i am trying to display the contents of downloaded file as soon as it's download completes. Here i am not getting the way to how to generate the event as the download completes, because i tried that setSelectionPath(TreePath path), but it also don't generates the selection change event. Is there any other way to do so?
Put null in place of oldLeadSelectionPath. From the API for TreeSelectionEvent:
protected TreePath oldLeadSelectionPath:
leadSelectionPath before the paths changed, may be null.
I'm at the office and can't try out anything, so please let me know whether that works for you.
db
edit Or it may be easier to put all code from your valueChanged (...) override in a new method and invoke that method both from valueChanged (...) and wherever else you need.
Edited by: Darryl.Burke -
How do I select multiple events in iCal 8.0?
In OSX Mavericks, I used to be able to select multiple events in iCal in the event list view. I could select the initial event in the span of events to be selected. Then hold Shift while selecting the final even in the span of events. As a result, all of the events in that span would be selected.
in OSX Yosemite, this is no longer possible. There appears to be no list view, and holding the Shift button does not allow me to select a span of events.
What is the best way to select a span of events, say as much as 30 events?
Thank you.Empty Caches
1. Safari > Preference > Advanced
Checkmark the box for "Show Develop menu in menu bar".
"Develop" menu will appear in the Safari menu bar.
Click Develop and select "Empty Caches" from the dropdown.
2. Quit Safari if open.
Option click the "Go" menu in the Finder menu bar.
Select "Library" and then "Caches".
Look for the folder 'com.apple.Safari"
Right click "com.apple.Safari" and select "Move to Trash"
Relaunch Safari. -
How to copy selected files in Finder (applescript)
I don't like to use hotkeys (such as CMD+C, etc.) and would prefer to copy and paste files in OS X with the mouse just like I did in Windows.
Unfortunately Finder has no such copy and paste buttons in its toolbar like I know them from Windows Explorer. It bothers me that I always have to use the context menu or hotkeys. So I intend to write small scripts with AppleScript and move them into the Finder toolbar to have my custom made buttons.
Unfortunately I am newbie to Applescript and did not yet manage to get such simple script to work despite many trials.
The first script must only copy marked/selected files or folders in Finder to the clipboard so that I can paste them into another Finder window.
The second script should simply paste the clipboard content into Finder.
I tried this but nothing is being copied:
tell application "Finder"
activate
end tell
tell application "System Events"
key down {command}
keystroke "c"
key up {command}
end tell
Would be great if somebody can help me with these few lines.
Thanks in advancemeanwhile got a reply in another forum that works like charm exactly as I want...I post it here below for future newbies...
tell application "Finder" activate
delay 0.2
tell application "System Events"
tell process "Finder"
keystroke "c" using command down
end tell
end tell
end tell
save as program and then drag to Finder toolbar.
You can even change the icon.
Thanks for your attention guys -
How to see the wait events info. after excute a select query
Hi
How to see the wait events info. after execute a select query. Are there any parameter to set for this option?
And also wanna see the follwing info. in trace file. For this what are the parameters I have to set right?
SELECT * FROM emp, dept
WHERE emp.deptno = dept.deptno;
call count cpu elapsed disk query current rows
Parse 1 0.16 0.29 3 13 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.03 0.26 2 2 4 14
Misses in library cache during parse: 1
Parsing user id: (8) SCOTT Regards
Arpitha$ sqlplus scott/tiger
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Apr 20 15:29:33 2011
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> SHOW PARAMETER dump
NAME TYPE VALUE
background_core_dump string partial
background_dump_dest string /user/oracle/app/oracle/admin/
orclsb/bdump
core_dump_dest string /user/oracle/app/oracle/admin/
orclsb/cdump
max_dump_file_size string UNLIMITED
shadow_core_dump string partial
user_dump_dest string /user/oracle/app/oracle/admin/
orclsb/udump
SQL> ALTER SESSION SET EVENTS='10046 trace name context forever, level 12';
Session altered.
SQL> SELECT * FROM emp WHERE deptno=20;
EMPNO ENAME JOB MGR HIREDATE SAL COMM
DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800
20
7566 JONES MANAGER 7839 02-APR-81 2975
20
7788 SCOTT ANALYST 7566 19-APR-87 3000
20
EMPNO ENAME JOB MGR HIREDATE SAL COMM
DEPTNO
7876 ADAMS CLERK 7788 23-MAY-87 1100
20
7902 FORD ANALYST 7566 03-DEC-81 3000
20Now
$ pwd
/user/oracle/app/oracle/admin/orclsb/udump
$ ls -ltr|tail -5
-rw-r----- 1 oracle oinstall 622 Apr 20 11:35 orclsb_ora_949.trc
-rw-r----- 1 oracle oinstall 651 Apr 20 11:35 orclsb_ora_976.trc
-rw-r----- 1 oracle oinstall 1982 Apr 20 11:35 orclsb_ora_977.trc
-rw-r----- 1 oracle oinstall 1443 Apr 20 15:29 orclsb_ora_1251.trc
-rw-r----- 1 oracle oinstall 279719 Apr 20 15:30 orclsb_ora_1255.trc
$ tkprof orclsb_ora_1255.trc orclsb_ora_1255.txt
TKPROF: Release 10.2.0.2.0 - Production on Wed Apr 20 15:32:17 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
$ ls -ltr|tail -5
-rw-r----- 1 oracle oinstall 651 Apr 20 11:35 orclsb_ora_976.trc
-rw-r----- 1 oracle oinstall 1982 Apr 20 11:35 orclsb_ora_977.trc
-rw-r----- 1 oracle oinstall 1443 Apr 20 15:29 orclsb_ora_1251.trc
-rw-r----- 1 oracle oinstall 279719 Apr 20 15:30 orclsb_ora_1255.trc
-rw-r--r-- 1 oracle oinstall 26872 Apr 20 15:32 orclsb_ora_1255.txtThis orclsb_ora_1255.txt contains the required information. -
HOW CAN I DELETE AN EVENT WITHOUT HAVING TO SELECTING IT FROM THE LIBRARY?
I have a big problem.
I want to delete an entire event from my library because everytime I select it imovie freezes and then close itself up. So I have to re-open imovie again. And when I want to select that particular event again the same problem occures. So I can not select that particular event. Therefore I can take NO action on this event.
HOW CAN I DELETE AN EVENT WITHOUT HAVING TO SELECTING IT FROM THE LIBRARY?
(Everytime I select it imovie closes itself up)
All other events work fine. I believe The footage had a problem from capturing. but now it's in my computer and i can't open it.
Please help me, I don't need this event, I can't open it therefore I can't use it and it takes place on my hardrive for nothing.
Thank youOne can delete it from one's computer. In the finder go to homeuser, movies, imovie events, delete the footage.
Then reopen iMovie and see if that helps.
Hugh -
How to get rid of the loop in ALV output from At selection screen event?
I have several push buttons on a selection screen.
Clikc on a button, then it pops up an editable ALV report. (This gets triggered AT SELECTION SCREEN event.). REUSE_ALV_GRID_DISPLAY_LVC..
On the ALV output, I enabled F4 for a couple of fields. Once I click on the F4 button, ONF4 method gets triggerd and a pop up appears with custom search helps.
choose a line and it fills the cell.
Upto this it works fine.
Now I click on the BACK button at the ALV output, it takes me to the selection screen. I click on the button again, it show the editable ALV. Now when I click on the F4 button, the pop up comes up twice and the cell gets filled from the second pop - up.
How to control this?
Probably I am not refreshing something?
(I am using REUSE_ALV_GRID_DISPLAY_LVC and tooks ome code for ONF4 event from BCALV_*DATATYPES (forgot the exact name) program.)
Thanks,
VenHi,
FORM refresh_grid USING pw_grid TYPE REF TO cl_gui_alv_grid.
*Work area
DATA : wal_stable TYPE lvc_s_stbl.
CHECK NOT pw_grid IS INITIAL.
wal_stable-col = c_check.
wal_stable-row = c_check.
*Method to refresh grid
CALL METHOD pw_grid->refresh_table_display
EXPORTING
is_stable = wal_stable
i_soft_refresh = c_check
EXCEPTIONS
finished = 1
OTHERS = 2.
ENDFORM. " refresh_grid
Thanks,
Sree. -
How can I select all messages in either my Inbox, Trash and /or Bin in one go to delete them all in one go. I currently have 3000+ unwanted messages in my Bin
Click on the inbox then Edit>Select All (if you are using Mail, if not you'll have to tell us which mail program you use) repeat in other mailboxes as needed.
-
How to capture the current info in the top-of-page event in Reuse block dis
How to capture the current info in the top-of-page event in Reuse block dis
Hi Geetha,
If you don't have any information to pass the Heading Block, then why you are using this event ?
please comment/ remove that TOP_OF_PAGE code. and use subtotal code in field catalog block.
you can use below code for subtotal.
FORM field_catalog .
gs_fcat-do_sum = &2.
fcat : 'WRBTR' '15' 'X' ' ' ' ' 'WRBTR' 'Amount',
ENDFORM.
Regards,
Kunjan -
How to catch the select-options value in AT SELECTION-SCREEN event?
Hi,all
This is my code:
SELECT-OPTIONS: P_BUKRS FOR T012-BUKRS.
PARAMETERS: P_BNKA TYPE BANKA.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BNKA.
select single bankl from bnka where bukrs = p_bukrs.
Last statement failed because p_bukrs was null.
So, How can I got the value of p_bukrs in AT SELECTION-SCREEN event?Hi Jie,
try following code.
REPORT zanu_test.
TABLES : t012.
PARAMETERS: p_bukrs LIKE t012-bukrs.
PARAMETERS: p_bnka TYPE banka.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bnka.
DATA: BEGIN OF dynpfields OCCURS 0.
INCLUDE STRUCTURE dynpread.
DATA: END OF dynpfields.
*--- IT for changing fields on the screen
DATA : t_dynp_flds LIKE dynpread OCCURS 0 WITH HEADER LINE,
t_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE.
DATA: l_bukrs LIKE t012-bukrs.
DATA: BEGIN OF it_bank OCCURS 0,
banka LIKE bnka-banka,
END OF it_bank.
DATA: l_tabix LIKE sy-tabix.
dynpfields-fieldname = 'P_BUKRS'. APPEND dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = 'ZANU_TEST'
dynumb = sy-dynnr
TABLES
dynpfields = dynpfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc EQ 0.
READ TABLE dynpfields WITH KEY fieldname = 'P_BUKRS'.
IF sy-subrc EQ 0.
MOVE dynpfields-fieldvalue TO l_bukrs.
ENDIF.
ELSE.
EXIT.
ENDIF.
SELECT b~banka INTO CORRESPONDING FIELDS OF TABLE it_bank
FROM t012 AS a
INNER JOIN bnka AS b
ON abanks = bbanks AND abankl = bbankl
WHERE a~bukrs = l_bukrs.
CLEAR l_tabix.
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
endpos_col = 85
endpos_row = 20
startpos_col = 50
startpos_row = 10
titletext = text-035
IMPORTING
choise = l_tabix
TABLES
valuetab = it_bank
EXCEPTIONS
break_off = 1
OTHERS = 2.
IF sy-subrc EQ 0.
READ TABLE it_bank INDEX l_tabix.
IF sy-subrc EQ 0.
*--- Clear IT t_dynp_flds
CLEAR : t_dynp_flds,
t_dynp_flds[].
*--- Append screen values
t_dynp_flds-fieldname = 'P_BNKA'.
t_dynp_flds-fieldvalue = it_bank-banka.
APPEND t_dynp_flds.
CLEAR t_dynp_flds.
ENDIF.
ENDIF.
*--- Change screen field contents w/o PBO
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'ZANU_TEST'
dynumb = sy-dynnr
TABLES
dynpfields = t_dynp_flds
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
START-OF-SELECTION.
-Anu -
How to prevent AT SELECTION-SCREEN event on second Selection Screen
Hi All
I have a program in which I am entering some parameters in a selection screen and also validating them in AT SELECTION-SCREEN events. After validating them the program shows another selection screen in which I have some push-buttons. I have some events on those push-buttons also.
However I am facing a different problem now. When I execute the second selection screen I get the report, and when I click on back button then it again triggers the AT SELECTION SCREEN event of the first selection screen and displays the related messages.
How to prevent this ? Is there any way where I can restrict the execution of selection screen events for a particular selection screen?
AmolHi,
try this logic when Ist selection screen validation
is done set a flag = 'X' .
at selection-screen.
if glag is initial
*screen validation
flag = 'X..
endif.
regards
amole -
How do i get current active or selected page item's reference
Hi all,
How do i get current active or selected page item's reference .
Please help meYou can implement a selection suite for your need, this selection suite will be placed into the kLayoutSuiteBoss.
In this selection suite place a method to give you the UIDRef of the selected pageitem, which you can get by using the method "GetUIDList" of the "ILayoutTarget" interface.
Manan Joshi
- Efficient InDesign Solutions -
MetaDesign Solutions
http://metadesignsolutions.com/services/indesign-development.php -
How to handle selection event in alv component
Hi all,
i am new to webdynpro abap. and i want to know how to handle selection event(such as select all / unselect ) in my simple alv application.
Thanks very muchHi,
By default when you use the selection mode for the ALV as Multi/Mutli No Lead then this option is enabled.
Try to implement the event ONLEADSELECT and check wether this event is triggered or not.
DATA: lo_value type ref to cl_salv_wd_config_table.
CALL METHOD lo_value->if_salv_wd_table_settings~set_selection_mode
EXPORTING
value = cl_wd_table=>e_selection_mode-multi_no_lead.
Try to implement these event for ALV and put a break-point and test which event is getting triggered.
ON_CLICK
ON_DATA_CHECK
ON_FUNCTION
ON_LEAD_SELECT
ON_STD_FUNCTION_AFTE
ON_STD_FUNCTION_BEFO
Please provide more inputs.
Regards,
Lekha. -
CS3 - Place Word document: How can I select the current preset?
Hi
In my Plugin I like to place a word document into a text frame. To do this I want select a defined preset before.
How can I do that?
How can I select the current preset for the placement (import)?
Thanks for the support
HansHi,
I had posted a similar query few days back to place excel file in text frame. And I found out that, it is not possible to specify formatting option for any of microsoft document when using Indesign SDK.
But we can do this by running script.
If you are able to specify the formatting option through script, write code to get script object & execute this script through Indesign SDK.
I was able to specify formatting option, sheet number, range etc through this.
Hope this helps.
Rajani -
How to change images of selected items in gridview on selection changed event in universal app
Hi,
I am developing Universal App. I have bind the images to the Gridview using ObservableCollection. I have set gridview
SelectionMode as Multiple . I want to change the images of selected items but I don't know how to do in Selection Changed event of Gridview. I got selected items with the help of
Gridview SelectedItems property. How can i change the images of respected selected items?
Please reply me asap.
Thanks in advance.Hi, Sorry for late reply,
Please change the class :
public class ImageCollection : INotifyPropertyChanged
private string source;
public string Source
get { return source; }
set { SetProperty(ref source, value); }
public int MyProperty { get; set; }
protected void SetProperty<T>(ref T storage, T value, [System.Runtime.CompilerServices.CallerMemberName] String propertyName = null)
if (!object.Equals(storage, value))
storage = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
protected void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] String propertyName = null)
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
public event PropertyChangedEventHandler PropertyChanged;
XAML
<GridView x:Name="gd"
Tapped="gd_Tapped">
<GridView.ItemTemplate>
<DataTemplate>
<Grid Height="300" Width="250">
<Image Source="{Binding Source}" Stretch="Fill"/>
<Grid Height="100" Background="#B2000000" VerticalAlignment="Bottom">
<TextBlock Text="{Binding MyProperty}" FontSize="25" />
</Grid>
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
C#
//ObservableCollection of class
ObservableCollection<ImageCollection> img = new ObservableCollection<ImageCollection>();
public MainPage()
this.InitializeComponent();
img.Add(new ImageCollection() { MyProperty = 1, Source = "ms-appx:///Assets/Logo.scale-100.png" });
img.Add(new ImageCollection() { MyProperty = 2, Source = "ms-appx:///Assets/2.jpg" });
img.Add(new ImageCollection() { MyProperty = 3, Source = "ms-appx:///Assets/3.jpg" });
img.Add(new ImageCollection() { MyProperty = 4, Source = "ms-appx:///Assets/4.jpeg" });
gd.ItemsSource = img;
private void gd_Tapped(object sender, TappedRoutedEventArgs e)
GridView gv = (GridView)sender;
ImageCollection ic = gv.SelectedItem as ImageCollection;
ic.Source = "ms-appx:///Assets/4.jpeg";
gv.UpdateLayout();
I have used INotifyPropertyChanged now UI is not fluctuate
and I have not bind again O-Collection.
I hope so You will get right answer.
shah
Maybe you are looking for
-
ipone 4s display suddenly doesn't work any more. most of the time i can't even unlock my iphone as it puts the numbers itself. and if i am lucky to unlock it opens apps and does everything else whenever my finger comes near the display without even t
-
My ipod 4g keept crashing so then i read on this website to go to settings and rest everything. And when i did everything on my ipod got deleted.I tried restarting it but i didnt restore my ipod before so everthing got erased. How can i get it all ba
-
Work around for power PC program
I purchased a book with CD ROM. It was supposed to work with Macs up to 10.6 but I keep getting a message that power PC is no longer supported. I called McGraw Hill and they claim Apple dropped the support after 10.6. Is there a work around?
-
Yosemite Finder: bug when dragging files in full screen
I use my Finder in full screen mode. When I drag files through some folders, the entire content of the window moves up so that I cannot see the top files in any column anymore. The only solution to this bug is to end full screen and then start full s
-
Regarding Unregister with shared services in 11.1.1.2
Hi There We have an option in 9.3.1 that we can unregister the registered application. But trying to Unregister in Fussion 11.1.1.2. Is there any way that i can unregister,please let me know so that could be a great help. Thanks Hv