Can You Listen FOR while AS does something else too?

Play and control the playing of a QT movie while also listening with Speech recognitionServer to some word from the user.
i heard AS cant multithread.......

An AppleScript doesn't multithread, but there can be multiple scripts running. In any given script it also depends on any results or user interface items used, since targeted applications will be doing their things separately.

Similar Messages

  • Can you listen for a string value to change?

    Is there any easy way to see if a string changes value? I have a public static string in one instance of a class that I wish to be notified when it changes. An object of another class will have the listener.
    Edited by: sarcasteak on Dec 8, 2009 1:40 PM

    jverd wrote:
    sarcasteak wrote:
    jverd wrote:
    sarcasteak wrote:
    In the class that has the value, I create a new ObservableValue object and in the constructor I pass it the string. Now whenever I update the value I assume I do ov.setValue(search), so then the class that wants to get this value would implement observer.. but how does it get access to the ov instance?It registers itself as an observer. Did you read up on Observer/Observable?An observer for just that one instance of the ObvservableValue?Yes.
    The problem is that I am not sure how to access the value from the secondary class.Your Observer must have an update() method. You understand that you have to implement the Observer interface, right? And you understand that to do so, you have to provide that method right? Have you looked at that method's signature? It provides you a reference to the Observable. You just cast it to whatever your class is and call the get method for the property you're interested in.
    I understand that I need to add the observer, but I am not sure how I can do that if the secondary class(object) isn't being instantiated in the same object that passes the value.I have no idea what you mean by the last half of that sentence.
    Have you tried maybe googling for java observer observable pattern? I'm sure there are plenty of examples available.Thanks, but I just ended up taking the easy way out and using an eclipse preference to pass values back and forth, not ideal since the values change so much.

  • How can I change cursor while it does something?

    hi, all
    following code dosen't change current cursor.
    I want to change cursor to wait_cursor while it opens file,
    but, it doesn't change cursor at all.
    What's problem?
    class aClass extends JFrame{
    btOpen.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){                
    int returnVal = jfcFileDialog.showOpenDialog(SourceEditor.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    openedFile = jfcFileDialog.getSelectedFile();
    setCursor( Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));      
    //read openedFile and return text
    String fileContent=readSourceFile();
    setCursor( Cursor.getPredefinedCursorCursor.DEFAULT_CURSOR));
    thank you.

    I finally figured it out. You have to set the cursor on the JFrame's GlassPane. The solution was alluded to in the Evaluation section of a couple of bug reports:
    http://developer.java.sun.com/developer/bugParade/bugs/4357573.html
    http://developer.java.sun.com/developer/bugParade/bugs/4320939.html
    There is also some discussion about this in various Forum threads. (Search for topics using "+getGlassPane +setCursor".)
    My corrected code follows. With this method, you don't even need to start up a secondary thread to get the cursor to change. I do, however, because I have other UI elements that I want to be updated (such as a sort indicator on my column headings.) I also reduce the priority of the sort thread a bit so my UI gets priority.
    Note that I removed the code that tries to remember the original cursor, since, with all the asynchronous execution going on, the wait cursor could actually be the frame's current cursor when this gets executed. If you're not doing a sub-thread as I am, you don't have to worry about this. Also, I have extended JFrame to JFrameBase to handle threading issues and consolidate redundant code (among other things not pictured here). The JFrameBase class definition follows the example code.
    Component lTopLevelComponent = JTableSortable.this.getTopLevelAncestor();
    final JFrameBase lFrame;
    if ( lTopLevelComponent instanceof JFrameBase )
        lFrame = (JFrameBase)lTopLevelComponent;
        lFrame.setFrameCursor( Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) );
    else
        lFrame = null;
    Thread lSortThread = new Thread( "JTableSortable" ) {
        public void run()
            ((SortableTableModel)lModel).sortByColumn( lSortCol, lAscending );
            if ( lFrame != null )
                lFrame.setFrameCursor( Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR ) );
    lSortThread.setPriority( Math.max( Thread.MIN_PRIORITY, Thread.currentThread().getPriority() - 1 ) );
    lSortThread.start();
    public class JFrameBase extends JFrame {
    public void setFrameCursor( final Cursor aCursor )
        SwingUtilities.invokeLater( new Runnable() {
            public void run()
                getGlassPane().setCursor( aCursor );
                getGlassPane().setVisible( true );

  • How can you find out what launches / runs something else?

    In poking around with my system trying to get it to run things for all users, at some point in the past I did something which causes a script to run when ever I log in.
    This script is located in the application directory, and if I put any script called Login.sh there, it runs. It runs for any user too.
    I have no idea what I did to cause this and I can't figure out a way to find out who is launching it.
    I looked in the loginwindow.plist files, the com.apple.loginwindow.plist files, the ttys file in /etc and in the RC files too.
    Is there an easy way to find out (maybe by putting something in that login.sh script) what is running it? I know it is the 'root' user.
    I thought maybe if I could search all files on my HD for the word "Login.sh" I could find the culprit. I do not know how to do that though.
    Any ideas?

    You look up the process in the same output and find out what the parent process is. (after crossing your fingers and hoping it's not something generic like launchd)

  • Can't listen for connections - Operation not supported

    Hi,
    We have install OSB Client on HP-UX 11i V2 HP rx5670 Server as per Oracle Secure backup Installation Guide.
    But we are getting following error message. Please help us to solve the issue:
    2010/12/29.10:23:02 can't listen for connections - Operation not supported
    # /sbin/init.d/OracleBackup start
    Starting Oracle Secure Backup services daemon.
    2010/12/29.10:23:27 can't listen for connections - Operation not supported
    Thanks
    Khairul/Bangladesh

    Have a look at the observiced.log file to see if that has any more detail, this is in /usr/tmp.
    I would check to see if there is something else on the system that is using TCP port 400 or 10000. On Solaris I've seen the webmin installation using port 10000. Both those ports need to be free for OSB to be able to start.
    With OSB stopped, you can "telnet <hostname> 400" and "telnet <hostname> 10000" to see if it connects. If it does then something is listening on that port.
    You should be able to do "netstat -na" as well, to show you listening ports.
    Rich

  • Can you listen to music without the headphones?

    Can you listen to music on the iPod Classic without the headphones?

    The Classic does not have an internal speaker, so either you need to:
    plug in headphones
    connect the iPod to an amplifier and speakers (from the headphone socket)
    connect it to an iPod Dock cable and plug that into an amplifier
    Place the iPod into the Dock on something that has a Dock connector and amplifier built in.

  • How can you listen to music and play a game at the same time?

    How can you listen to music and play a game at the same time?
    I am playing music, by starting the Crash Baandicoot Nitro Kart 3D game it shuts off the music playing. Is there a way around this?
    It seems like this should be possible.
    Message was edited by: RuthlessVengeance
    Message was edited by: RuthlessVengeance

    Select the music play list you want to listen to and start it playing. Go back to the home screen and start the app you want to use, music will stop. Press the home button two time quickly and it will bring up a simple control for controling the music. This works for me with all of the apps I have purchased including games. Just a note you can pull up the same music control if the iPod is a sleep and locked by pressing the button three times quickly.
    Mike

  • How can you listen to music without headphones?

    How can you listen to music without headphones?

    - Try cleaning out/blowing out the headphone jack. Try inserting/removing the plug a dozen times or so.
    Try the following to rule out a software problem
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup
    - Restore to factory settings/new iPod.
    - Make an appointment at the Genius Bar of an Apple store. Seems you have a bad headphone jack.
    Apple Retail Store - Genius Bar
    Apple will exchange your iPod for a refurbished one for this price. They do not fix yours.
    Apple - iPod Repair price
    A third-party place like the following will replace the jack for less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the jack yourself
    iPod Touch Repair – iFixit

  • !Can you record live while game playing with adobe audition? PLEASE HELP!

    Can you record live while game playing with adobe audition? I have a youtube channel and I want to record voice as I'm playing of course and cancel out the noise maybe put a nice effect on it.. But how do I do this? Please help! I only see ones for recording like after.. But I want to record it as it's happening is this possible!? it has to be. thanks *ADOBE AUDITION CC*

    That'll depend on the capabilities of the sound card/audio interface you're using.  If that interface can feed the right things to Audition, it can record it.  For just the game, look for "Wave Out" or "What U Hear" on the list of audio sources but not every system has this.  Also, if you want to record your own contributions as well as the game sound, that gets more complex too.
    I know that there are specialist pieces of software that are designed to record live gameplay (which don't rely simply on your local sound card).  I know of a couple called "Action!" and "XSplite" but I have not personal experience with either.
    However, before going that direction, check out the "Record Devices" menu in your sound system and see what it allows.

  • How many devices can you use for your itunes account?

    how many devices can you use for your itunes account?

    PT wrote:
    Macistotle wrote:
    Unless you have DRM still haunting your tunes ... Then you can only use those songs on 5 devices. Otherwise, connect as many as you like (as stated above).
    No, you can sync your DRM tracks to an unlimited number of iPods (but only authorized to play on 5 different computers/user accounts)
    Patrick
    So I can sync two iPods to my iTunes account and sync the same digital copy movies that come with some o' my DVDs to both ipods? Do movies make a difference really, DRM-Wise? Thanks in advance.

  • HT204387 can you listen to music with your ipod touch 4g and a bluetooth handsfree device

    can you listen to music with your ipod touch 4g and a bluetooth handsfree device

    Yes if the BT device supports the profiles supported by the iPod. See:
    iOS: Supported Bluetooth profiles
    The A2DP provide is used with speaker and headphones
    The Hands Free profiles (HFP) is typically used with headset (headphones and mic).

  • TS3212 can you listen to purchased music on android phone?

    Can you listen to purchased itunes on an android phone?

    How do I do that. I very recently purchased an album and songs from my desk top.  When I use my Ipa
    Pad, it plays but when I use my Gallaxy cell phone, I don't know it works.  I am so frustrated.  HELP

  • Can you listen to the radio without internet on the ipod touch?

    Can you listen to the radio without internet on the ipod touch? (like the nano?)

    RainyRain958 you are just BSs. There is no cellular iPod. Here is the comparison
    http://www.apple.com/ipod/compare-ipod-models/
    You can get iPads that have a cellular radio
    RainyRain958 wrote:
    They sell 5G iPods that are all the same, except that you have cellular. Go to the iPod model comparison page on Apple's website-- the cellular iPod is labeled Wi-Fi + Cellular.

  • Can you listen to AM radio with I pod?

    Can you listen to FM and AM radio on an I pod?

    No.
    You can listen to internet radio

  • Can you ask for a specific time for your package to be delivered

    can you ask for a specific time for your package to be delivered

    You can only arrange that with the shipper after your package is shipped (and before it is deliverd.) When the package is shipped Apple usually emails the tracking information.

Maybe you are looking for

  • HT1449 can i use this process for moving my library to an external drive?

    My iMac is dying a slow death and I want to run itunes and iphoto off my external drive as the data may get corrupted if it stays on the computer hard drive. If I designate a folder on my external drive and then cosolidate will that allow me to run i

  • Standard Bank Reconciliation and Customer and Vendor Statement of Accounts

    Hello Experts, I am implementing ECC6.0 now.  I'm noit very familiar with the version so I am very hopeful that you could help me find the following standard reports in SAP. If these are not standard, then I need to recommend customization since the

  • Digital or Digitized Signatures

    Hey - Doing some research, as we're looking into having digital/electronic signatures perhaps for documents that require multiple signatures within the company - save money/etc. Has anyone ever looked into or discovered products that will also allow

  • Crystal Reports Grand Totals and int not working

    I am new to Crystal Reports, I am using the Visual Studios version. I have a couple of different questions. My report is a cross tabs report. In one of the cells I want to include a name and the total number of records for the person. To make it visu

  • Timer interrupt for LED

    Hello guys, My program has radio buttons to control blinking rate of LED. I need to put interrupt (timer) to switch off LED after 10seconds. Lets say SW0 is pressed, LED starts blinking 10 seconds and then switch off. Here I have some problems, when