Handling QuickTime enterFrame events with AppleScript
I posted an AppleScript question in the AppleScript forum, and thought some QuickTime folks might know the answer
http://discussions.apple.com/thread.jspa?threadID=1813680&tstart=0
If you have any input, please reply to the AppleScript thread.
Thanks!
Just bumping this to the top of the list.
Anybody know if QuickTime has some sort of 'enterFrame' event. If so, can Applescript respond to them with a handler?
thanks
Similar Messages
-
How can I handle touch screen events with Swing?
Hi,
I was wondering how i can handle touch screen events. Are there APIs for that or is it just a mouse event?
Thank you in advance.
TimI have recently created an application that ran on a touch screen system. I used the normal mouse events attached to the swing components (onClick) and these were translated by the touch screen. Typically I created a calculator type keypad, touched the screen on the text box where I wanted the data to appear and then pressed the keypad buttons to populate the field. No special drivers, just using swing components
Hope that helps
yeah, this is really useful info.. me too trying to build an application for the touch screen... just wondering how other events like focus gained, tree selection events are recognized by touch screen? can we have focus and tree, table selection events etc, as it is in the touch screen as well?? or everything is just mouse event only?? -
How to set codec for Quicktime 7 export with AppleScript
Hello everyone,
I'm new to applescript and I'm having some trouble with a batch export of video files.
I'm trying to transcode several image sequences into .mov using QT 7, via Automator.
I found this code that works:
on run {input, parameters}
repeat with theFolder in input
tell application "Finder" to set theSequence to first item of folder theFolder as alias
tell application "QuickTime Player 7"
activate
open image sequence theSequence frames per second 24
set nameSequence to (theSequence as string) & ".mov"
tell document 1
with timeout of 500 seconds
save self contained in nameSequence with replacing
end timeout
end tell
end tell
end repeat
end run
The problem is that QT automatically sets the output codec as Photo - JPEG, but in this case I need Prores 422. Is it possible to set a different codec?
One other question: I'd like to set a name pattern for the file name. Right now, it picks the name of the image sequence (imag_seq_001.jpg.mov), but i would like to keep only the first part of the name (imag_seq.mov). And i'd need to do this for different sequences (imag_seq_002, 003, ...), using the same script. Is this feasible?
Thank you for your help.I have a similar question as well. I tried this for you and nothing happened.
on received file transfer invitation theFileTransfer
end received file transfer invitation
I think "completed file transfer" is regarding to the file being transfered to Apple's Server from your computer when a file is sent, but I'm not sure about "received file transfer invitation." Regarding it being an inline file, maybe try using the attachment class.
attachment n [inh. rich text] : Represents an inline text attachment. This class is used mainly for make commands.
elements
contained by rich text, characters, paragraphs, words, attribute runs.
properties
file (file, r/o) : The path to the file for the attachment syn file name -
How do I edit existing Calendar Events with Applescript?
I've got a script that needs to add a URL to an existing Calendar event. I've tried everything I can think of but can't get it to work. Here's what I've got so far, that's working, but it's missing the last piece:
tell application "Finder"
set icsFile to POSIX path of ("Macintosh HD:Users:user:Library:Calendars:icsfile" as alias)
set eventID to do shell script "cat " & quoted form of icsFile & " | grep -m 1 'UID:' | sed s/UID://"
set hangoutLink to do shell script "cat " & quoted form of icsFile & " | grep 'X-GOOGLE' | sed s/X-GOOGLE-HANGOUT://" as URL
end tell
tell application "Calendar"
get name of every calendar
tell calendar "example calendar"
set theEvent to first event whose uid = eventID
--here's the bit I can't get working
tell event theEvent
set properties to {url:hangoutLink}
end tell
end tell
end tell
When I run it, I get the following error:
Calendar got an error: Can’t make event id "[email protected]" of calendar id "6B53911E-829F-4CCA-90F9-0A493B8DF3F5" into type integer.
Thanks in advance for any help!The properties of the text should still be set to the text tool if it was the previous text used, otherwise I'm not to sure.
-
Hello,
I'm trying to select multiple lines of a matrix clicking on any fields of a row. I can capture the event of the click and select the line clicked, but I'm not able to select multiple lines that way. I need to select the lines with modifiers in mind. I can make a click in the first column to select the line too, but I don't know how to perform a click with modifiers.
Thanks in advanceI think this is not what Martin needs, but simulate a click with modifiers.
We have the same problem. The matrix selection mode is BoMatrixSelect.ms_Auto. What we want to do is that when any column is clicked, it will behave as it was clicked on firts column (the one that is able to select rows). The problem is that Shift or Control button could be pressed too, which should select more rows than the clicked one. We know how to handle the click event with modifiers, but we don´t know how to send a click on the first column with them.
We haven´t found any solution to this.
Regards,
Ibai Peñ -
UI: Event Handling of forms created with the Screen Painter
Hi,
I created a form with the Screen Painter and saved it as XML document. After that, I loaded this form with the following code:
<i>Dim oXMLdoc As MSXML2.DOMDocument
oXMLdoc = New MSXML2.DOMDocument
oXMLdoc.load("C:\form1.xml")
SBO_Application.LoadBatchActions(oXMLdoc.xml)</i>
Then the loaded form appears in the SBO application with all added items.
Now, I would like to know how I could handle an ITEM_PRESSED event for a button of this imported form.
It would be great if someone could help me with this problem and post some example code.
Regards,
DennisDennis,
you have to create a function that will handle all the event receive from B1
<i> Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
If (pVal.FormUid = "YourUIDForm") Then
If ((pVal.itemUID = "YourItemUID") And _
(pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And _
(pVal.Before_Action = False)) Then
' Here write the coe you need....
End If
End If
End Sub</i>
Off course, you need your variable SBO_Appliation declared as follow :
Private WithEvents SBO_Application As SAPbouiCOM.Application -
Help with applescript to unmount disk when putting laptop to sleep
Could some kind soul please help me a bit with some applescript?
I would need two things in applescript:
1. A way to check whether a certain external (firewire) disk is mounted
(so that I can unount, er, eject it, if it is there)
2. A way to make an applescript being executed whenever the laptop goes to sleep.
For the interested reader:
what I want to do is to write an applescript that would automatically unmount my external backup disk whenever the laptop goes to sleep.
Oftentimes I forget to do that myself, then, when the computer is asleep and I want to unplug everything to take it home, I remember that I haven't properly ejected the backup disk ...
Any hints, pointers, tips will be appreciated!
Best regards,
Gabriel.Thanks a lot for your response
It's easy to check disks by name:
but it's not as easy to determine if the named disk is really the FireWire drive you're looking for, or just some other disk named the same.
Ah, that's OK for me, because I will always give the disks unique names.
2. A way to make an applescript being executed whenever the laptop goes to sleep.
This is harder to do. There is no hook in the system to call a script on sleep (like there is on login or logout),
That's what I was hoping for ...
therefore I don't see any easy way to do what you're asking.
Someone suggested to make a script that does nothing, and which has a handler for the event that the system goes to sleep, and put the eject command there.
But I have no idea how to write such a handler, and how to make the script so that it does not appear in the dock or in the "tab bar", and so that it does not consume CPU power ...
That said, I'm often in the same situation, however, I just pull the FireWire drive anyway, once it's finished going to sleep. Since no data is being read or written there is little or no chance of corruption.
I'd rather be certain
Any ideas?
Regards,
Gabriel. -
Automated report/ PDF conversion with AppleScript
Hello-
I am attempting to PDF a spreadsheet from Dropbox, and email it to a set list of recipients with AppleScript. Much of this I have been able to figure out, but I am having some issues with the PDF conversion. As you can see below, I am still working on sending the xls file, and have not yet been able to get AppleScript to convert a specific tab of the file to aPDF. I expect scheduling to be handled theough crontab.
Current script is as follows:
tell application "Finder"
set folderPath to folder "Macintosh HD:Users:user:Dropbox:folder:Calculated PO Sheet"
set theFile to first file in folderPath as alias
set fileName to name of theFile
end tell
set theSubject to "Current PO Report" date
set theBody to "See attached."
set theAddress to "recipient email"
set theAttachment to "CALCULATED PO SHEET.xlsx"
set theSender to "sender email"
tell application "Mail"
set theNewMessage to make new outgoing message with properties{subject:theSubject, content:theBody & return & return, visible:true}
tell theNewMessage
set visibile to true
set sender to theSender
make new to recipient at end of to recipients with properties {address:theAddress}
try
make new attachment with properties {file name:theAttachment} at after the last word ofthe last paragraph
set message_attachment to 0
on error errmess -- oops
log errmess -- log the error
set message_attachment to 1
end try
log "message_attachment = " & message_attachment
#send
end tell
end tellHi,
there is a special setup for this requirement. Please see the following support note
Reference
Oracle Reports Output For Indian Languages Like Gujarati, Marathi [ID 980554.1]
Roberto -
Splitting an event with only only clip
Is it possible to split an event that contains only one clip into two events?
Documentation indicates that in an event with at least two clips it is possible, but with only one clip selecting a thumbnail where the split is desired leaves the 'split at clip' option under the file menu grayed out.If you can find a single frame or group of frames that can be rejected (and are near the point where you want to split), reject them and move to trash. Now you will have two clips, and it can be split into two events.
If you don't want to lose any frames, best option is Quicktime Pro. -
Is it possible to enter events into a specific iCal calendar, then print a list of those events with the name and date on a single sheet? I don't need the calendar grid. I just want a list of events on a particular calendar, and their dates. Is that possible?
Not easily. Two possibilities:
1) If all the events have some common feature (eg you have included "XXX" in all the summaries), search for that feature then select and copy the found items at the bottom of the window. You can then paste them into TextEdit or a spreadsheet for printing
2) You could write an Applescript to locate the events and write them into a text file for printing.
The first one will probably give you what you want. -
Edit Illustrator symbol with AppleScript
Hello,
Does anyone know if it is possible to edit an existing symbol in an Illustrator CS3 document with AppleScript? Specifically, what I'm trying to do is this: I'd like to manually create an Illustrator document that uses the "3D Extrude and Bevel" effect to map symbols to the surfaces of the 3D object. Then, I'd like to programatically open that Illustrator document, edit the existing symbols (so the surfaces of the 3D object are updated), and finally export an image.
From what I've found in the AppleScript documentation PDF, I'm thinking this is not possible since it lists all the properties of a symbol object as read-only. But perhaps I'm overlooking something?
If it is not possible, is there another way of doing what I'm trying to achieve?
Thanks!
BenBen, could you not have just swapped your symbols? like:
set symbol of every symbol item to symbol "Foo"
Justin, if it is essential that you need to crack open a symbol item then it may be possible using system events to expand the item may even be possible with a action for this part?
This works for me. It is set to work with what items i know are available to my test doc.
{1 symbol of >2 path items, 2 gradients swatches}
tell application "Adobe Illustrator"
activate
set Doc_Ref to the current document
tell Doc_Ref
set x to width / 2
set y to height / 2
set ruler origin to {x, y}
-- Make new layer to trash later
make new layer at beginning with properties ¬
{name:"Opened Symbol", visible:true}
-- Place the symbol item you want to open
make new symbol item at beginning of layer "Opened Symbol" with properties ¬
{symbol:symbol 1, position:{0, 0}}
-- Select the item
set selection to symbol item 1
-- Use system events to drive the GUI
tell application "System Events"
tell process "Adobe Illustrator"
tell menu bar 1
click menu item "Expand..." of menu "Object"
delay 0.1
keystroke return
delay 0.1
click menu item "Ungroup" of menu "Object"
end tell
end tell
end tell
-- List your items to edit
set Symbol_Items to every page item of layer "Opened Symbol"
-- Edit what ever you have here
set fill color of path item 1 of layer "Opened Symbol" to {gradient:gradient 1}
set fill color of path item 2 of layer "Opened Symbol" to {gradient:gradient 2}
-- New group
set New_Group to make new group item at beginning of layer "Opened Symbol"
-- Move edited items into new group
repeat with i from (count of Symbol_Items) to 1 by -1
move (item i of Symbol_Items) to beginning of New_Group
end repeat
-- New symbol from group
make new symbol at end with properties ¬
{name:"My New Symbol", source art:New_Group}
-- Replace instances
set symbol of every symbol item to symbol "My New Symbol"
-- Clean up
delete every page item of layer "Opened Symbol"
delete layer named "Opened Symbol"
delete symbol 1
end tell
end tell -
Handling double click event in oops alv
I need to write a interactive alv where,can any one help me in handling double click event using oops.
Hello,
Demo program on interactive ALV using OOPS
REPORT ZALV_OOINTERACTIVE.*Class definition for handling double click
CLASS event_class DEFINITION DEFERRED.*Internal table and work area declarations for dd02l and dd03l
DATA : it_dd02l TYPE TABLE OF dd02l,
wa_dd02l TYPE dd02l,
it_dd03l TYPE TABLE OF dd03l,
wa_dd03l TYPE dd03l.*data declarations for ALV Main list
DATA : ty_lay1 TYPE lvc_s_layo,
it_fieldcat TYPE lvc_t_fcat ,
ty_fieldcat TYPE lvc_s_fcat ,
c_alv1 TYPE REF TO cl_gui_alv_grid,
c_cont1 TYPE REF TO cl_gui_custom_container,
event_receiver TYPE REF TO event_class.*data declarations for ALV Interactive listDATA : ty_lay2 TYPE lvc_s_layo,
it_fcat TYPE lvc_t_fcat ,
ty_fcat TYPE lvc_s_fcat ,
c_alv2 TYPE REF TO cl_gui_alv_grid,
c_cont2 TYPE REF TO cl_gui_custom_container.
**Select options for multiple values and NOT ranges
SELECT-OPTIONS : s_table FOR wa_dd02l-tabname NO INTERVALS.
Initialization event
INITIALIZATION.*Start of selection event
START-OF-SELECTION.*fetch data into table and field characteristics
PERFORM fetch_data.*ALV display for output
PERFORM alv_output.&----
*& Form FETCH_DATA
text
--> p1 text
<-- p2 text
FORM fetch_data .*Select the table details
SELECT * FROM dd02l INTO CORRESPONDING FIELDS OF TABLE it_dd02l
WHERE tabname IN s_table
AND tabclass = 'TRANSP'.
ENDFORM. " FETCH_DATA----* CLASS lcl_event_receiver DEFINITION----CLASS event_class DEFINITION.*Handling double click
PUBLIC SECTION. METHODS:
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid IMPORTING e_row .ENDCLASS. "lcl_event_receiver DEFINITION
----* CLASS lcl_event_receiver IMPLEMENTATION
----CLASS event_class IMPLEMENTATION. METHOD handle_double_click. DATA : ls_dd02l LIKE LINE OF it_dd02l.*Reading the selected data into a variable
READ TABLE it_dd02l INDEX e_row-index INTO ls_dd02l.* *Select the field details of the selected table
SELECT * FROM dd03l INTO CORRESPONDING FIELDS OF TABLE it_dd03l
WHERE tabname EQ ls_dd02l-tabname.
*calling the ALV containing the field values
CALL SCREEN 101. ENDMETHOD. "handle_double_clickENDCLASS. "lcl_event_receiver IMPLEMENTATION&----& Module pbo_100 OUTPUT&----
*MODULE pbo_100 OUTPUT.
*set pf-status 'XXX'.
*set titlebar 'XXX'.
ENDMODULE. " PBO_100 OUTPUT
*& Module alv_100 OUTPUT
&----MODULE alv_100 OUTPUT.*Check if there is no custom container in screen 100
IF c_cont1 IS INITIAL.*Creating object of container
CREATE OBJECT c_cont1
EXPORTING
container_name = 'CCONT'.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.*Creating object of alv
CREATE OBJECT c_alv1
EXPORTING
i_parent = c_cont1.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.*alv layout
PERFORM alv_100_layout.*alv field catalogue
PERFORM alv_100_fieldcat.*Displaying the ALV grid
CALL METHOD c_alv1->set_table_for_first_display
EXPORTING
is_layout = ty_lay1
CHANGING
it_outtab = it_dd02l[]
it_fieldcatalog = it_fieldcat. IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.*Create object of the event class and setting handler for double click
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_double_click FOR c_alv1. ENDIF.ENDMODULE. " ALV_100 OUTPUT&----& Module pai_100 INPUT&----
*MODULE pai_100 INPUT.
ENDMODULE. " pai_100 INPUT----* MODULE PBO_101 OUTPUT----MODULE pbo_101 OUTPUT.
SET PF-STATUS 'XXX'.
SET TITLEBAR 'XXX'.
ENDMODULE. " PBO_101 INPUT----* MODULE ALV_101 OUTPUT----
MODULE alv_101 OUTPUT.
*Check if the Custom container exists.
IF c_cont2 IS INITIAL.*Creating container object
CREATE OBJECT c_cont2
EXPORTING
container_name = 'CDCONT'.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.*creating ALV grid for interactive list
CREATE OBJECT c_alv2
EXPORTING
i_parent = c_cont2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.*ALV layout
PERFORM alv_101_layout.*ALV fieldcatalogue
PERFORM alv_101_fieldcat.*Sorting the output by field position
SORT it_dd03l BY position.*ALV for display field details
CALL METHOD c_alv2->set_table_for_first_display
EXPORTING
is_layout = ty_lay2
CHANGING
it_outtab = it_dd03l[]
it_fieldcatalog = it_fcat.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. ENDIF.ENDMODULE. " ALV_101 OUTPUT
&----& Module PAI_101 INPUT&----
*MODULE pai_101 INPUT.ENDMODULE. " PAI_101 INPUT
*& Form ALV_OUTPUT
text
--> p1 text
<-- p2 text
FORM alv_output .
CALL SCREEN 100.ENDFORM. " ALV_OUTPUT
*& Form ALV_100_LAYOUT
text
--> p1 text
<-- p2 text
FORM alv_100_layout . ty_lay1-grid_title = 'TABLES'.
ty_lay1-zebra = 'X'.
ty_lay1-no_toolbar = 'X'.ENDFORM. " ALV_100_LAYOUT
*& Form ALV_100_FIELDCAT
text
--> p1 text
<-- p2 text
FORM alv_100_fieldcat .
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 1.
ty_fieldcat-fieldname = 'TABNAME'.
ty_fieldcat-tabname = 'GT_DD02L'.
ty_fieldcat-coltext = 'TableName'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat. ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 2.
ty_fieldcat-fieldname = 'TABCLASS'.
ty_fieldcat-tabname = 'GT_DD02L'.
ty_fieldcat-coltext = 'CATEGORY'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat. ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 3.
ty_fieldcat-fieldname = 'AS4USER'.
ty_fieldcat-tabname = 'GT_DD02L'.
ty_fieldcat-coltext = 'CREATED'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat. ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 4.
ty_fieldcat-fieldname = 'AS4DATE'.
ty_fieldcat-tabname = 'GT_DD02L'.
ty_fieldcat-coltext = 'DATE'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 5.
ty_fieldcat-fieldname = 'AS4TIME'.
ty_fieldcat-tabname = 'GT_DD02L'.
ty_fieldcat-coltext = 'TIME'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat. ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 6.
ty_fieldcat-fieldname = 'CONTFLAG'.
ty_fieldcat-tabname = 'GT_DD02L'.
ty_fieldcat-coltext = 'Delivery Class'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.ENDFORM. " ALV_100_FIELDCAT
*& Form ALV_101_LAYOUT
text
--> p1 text
<-- p2 text
FORM alv_101_layout . ty_lay2-grid_title = 'FIELDS'.
ty_lay2-zebra = 'X'.
ty_lay2-no_toolbar = 'X'.ENDFORM. " ALV_101_LAYOUT
*& Form ALV_101_FIELDCAT
text
--> p1 text
<-- p2 text
FORM alv_101_fieldcat . REFRESH it_fieldcat.
REFRESH it_fcat.
CLEAR ty_fcat. ty_fcat-row_pos = 1.
ty_fcat-col_pos = 1.
ty_fcat-fieldname = 'FIELDNAME'.
ty_fcat-tabname = 'GT_DD03L'.
ty_fcat-coltext = 'Fieldname'.
ty_fcat-outputlen = 10.
APPEND ty_fcat TO it_fcat.
ty_fcat-row_pos = 1.
ty_fcat-col_pos = 2.
ty_fcat-fieldname = 'CHECKTABLE'.
ty_fcat-tabname = 'GT_DD03L'.
ty_fcat-coltext = 'CHECKTABLE'.
ty_fcat-outputlen = 10.
APPEND ty_fcat TO it_fcat. ty_fcat-row_pos = 1.
ty_fcat-col_pos = 3.
ty_fcat-fieldname = 'KEYFLAG'.
ty_fcat-tabname = 'GT_DD03L'.
ty_fcat-coltext = 'Key Flag'.
ty_fcat-outputlen = 10.
APPEND ty_fcat TO it_fcat.ENDFORM. " ALV_101_FIELDCAT -
Raise an event with no arguments
In VB.net I can declare and raise an event like this
Public Event SomeEvent()
Public Sub SomeMethod
RaiseEvent SomeEvent()
End Sub
I need to work out how to do this in c# however all of the examples of raising events include event handlers. This won't work for me as I am raising this event over a COM interface, and so I can't send eventargs or non basic types through the interface
to the client application.OK, Action doesn't work as I end up with the following error
An exception of type 'System.InvalidCastException' occurred in AdtakerInterfaceSampleCsharp.exe but was not handled in user code
Additional information: Unable to cast object of type 'System.__ComObject' to type 'System.Action'.
You asked how to raise an event with no arguments in C# and I gave you the solution for this. You could certainly use an Action to raise an event with no arguments as my sample code clearly demonstrates.
How to call your specific COM interface is a totally different topic.
Please start a new thread if you have a new question. You may also want to provide some more details if you want anyone to be able to help you with this. Remember that the forums are for helping solving specific issues though, they are not for anyone to
write an entire application, class or module for you :) -
How to process received images in iChat/Messages with Applescript
Hello!
I want to process all received photos or videos with Applescript.
I try this:
using terms from application "Messages"
on message received theMessage from theBuddy for theChat
if the length of theMessage is 0 then
-- it means I received a picture or video file, but I can't get the file with Applescript, because theMessage is an empty string and not a file
set theMessage to "<lost photo or video content>"
else
-- it's OK, I just got a text message and I can now save it or display or do something else with it
end if
end message received
end using terms from
But if I receive a photo, theMessage is empty.
The event handlers "on completed file transfer" and "received file transfer invitation" don't work in this case, probably because it is not a file tranfer, but sort of an inline picture.
I use OS X 10.8.
Can somebody help me?I have a similar question as well. I tried this for you and nothing happened.
on received file transfer invitation theFileTransfer
end received file transfer invitation
I think "completed file transfer" is regarding to the file being transfered to Apple's Server from your computer when a file is sent, but I'm not sure about "received file transfer invitation." Regarding it being an inline file, maybe try using the attachment class.
attachment n [inh. rich text] : Represents an inline text attachment. This class is used mainly for make commands.
elements
contained by rich text, characters, paragraphs, words, attribute runs.
properties
file (file, r/o) : The path to the file for the attachment syn file name -
How to handle double click event in a text control
Hi,
Will u please send me information on handling double click events inside text control and also about locking and unlocking of DB tables for updation.
Regards,
Praba.Hi Prabhavathi,
Here is how you handle double click events in Textedit control.
1)Create a custom control in screen (say TEXT_CONTROL)
2)In main program,
a) Declarations:
data: obj type ref to cl_gui_custiom_control.
text type ref to cl_gui_textedit.
b) Create the instance of custom container
c) Create the instance of textedit control.
3)Now to handle double click events , create a local class as follows.
class shail_event definition.
public section.
methods:
handle_doubleclick for event dblclick of cl_gui_textedit .
endclass.
class shail_event implementation.
method handle_doubleclick .
here do the coding for handling the double click.
endmethod.
endclass.
4) Create an instance of the handler class(ie.ZSHAIL_EVENT).Let it be named hand.
5) Define varibles for event.
DATA: i_events TYPE cntl_simple_events,
wa_events TYPE cntl_simple_event.
SET HANDLER hand->handle_doubleclick for text.
wa_events-eventid = cl_gui_textedit=>event_double_click.
wa_events-appl_event = 'X'. "This is an application event
APPEND wa_events TO i_events.
6)
CALL METHOD texte->set_registered_events
EXPORTING
events = i_events
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
These are the basic steps needed for handling events in Textedit control.You can go to SE24 and type CL_GUI_TEXTEDIT to find the associated events of the class.
If you want the program, kindly send your mail-id so that I can mail it to you.
Regards,
Sylendra.
Maybe you are looking for
-
U400 both right side usb ports are not detecting logitech mouse or keyboard
PLease HELP!!
-
I need to create a report using only one record
I have all this records in my database but i would like to create a layout where it will automatically fill it up with the information of a record i would chose. example: i got a list of over 200 hundred products and i would like to see in a personal
-
Error during CSSExport.bat
Hi I am trying to run the CSSExport.bat (file contents below). I am receiving the following command line error when trying to run:- Exception in thread "main" java.lang.NoClassDefFoundError: com/hyperion/css/exchange/CommandUtility From previous sear
-
Mouse Pointer Jumps to Screen Corners
Greetings, I have been having this problem since I got my G5 a month ago. Some times I'll be moving the mouse and all of a sudden the pointer on the screen will jump to either the top right corner or bottom left corner of the screen even though I'm n
-
Delayed visibility of objects not working
I am trying to delay the visibility of an image on one of my projects. The image is the top layer on my time line. I have made sure no objects in the projects has a pause applied to it. When I simply play the project on my time line, the image appear