Find a window in XMonad and apply some actions to it

Hi everyone, I think this should be really easy for someone who's good at Haskell but I just couldn't figure it out as I'm bad at it.
Basically I want to search through the list of windows in the current workspace, find one matching some condition and apply some action to it; if not found then create this window.
I had a skeleton code like this
import qualified XMonad.StackSet as W
import XMonad.Actions.WindowGo
findWindow condition actionIfFound actionIfNotFound =
ifWindow (condition <&&> member W.current) windowFound actionIfNotFound
where windowFound = ask >>= w -> do actionIfFound w

Hi guymatsuda,
If you are having an issue locating a previously purchased song, you may find the following articles useful:
iTunes: Finding lost media and downloads
http://support.apple.com/kb/TS1408
Apple Support: Downloading past purchases from the App Store, iBookstore, and iTunes Store
http://support.apple.com/kb/HT2519
Cheers,
- Brenden

Similar Messages

  • Find/Change words (with GREP) and apply a style...

    I need a Script for Find/Change words with GREP, and apply a paragraph style...
    Thanks...

    Hi Marcos,
    If you want the script to create character styles: Bold , Italic, Bold Italic, etc, and replace local formatting with these styles, use scripts in post #3.
    But if you want find and change words, or/and replace local formatting with styles defined by you, use FindChangeByList script.
    If the latter, I recommend you to download and install Record Find Change script (written by Martin Fisher).
    Then choose settings you need in Find-Change dialog – make sure they work as expected – and run Record Find Change script. A Notepad/TextEdit file will pop up with a line containing the recorded setting. Copy it, open FindChangeList.txt, delete the contents of this file and paste the line you just copied (or add it to the bottom of the file).
    Repeat the process for all find-change operations you need.
    Finally run FindChangeByList.jsx to make all changes in one go.
    However, while using Record Find Change script, you may encounter a problem: it doesn’t record paragraph and character styles placed inside a group. But you can write references to such styles like so:
    appliedParagraphStyle:app.activeDocument.paragraphStyleGroups.item("Style Group 1"). paragraphStyles.item("Paragraph Style 1")
    Kasyan

  • Hello there, if i had installed a windows on bootcamp and for some reasons the windows had infected, does the mac gets infected or harmed? sorry im transforming from pc to mac and i just want to know .. thank you

    if i had installed a windows on bootcamp and for some reasons the windows had infected, does the mac gets infected or harmed?

    Yes, when you run Win via BootCamp, the computer is a "real" Windows computer and just as vulnerable as any other Windows machine. It its the operating system, not the hardware, that creates vulnerability.
    However, it also means you basicaly have two independent computers that happen to share the same physical space. The Mac side, as others have said, is not vulnerable to assaults that are made on the Windows side, so do not go installing a pile of anti-virus garage on the Mac side. It is unneeded at this time and will basically ruin your Mac's performance. The Windows side WILL need some form of protection.

  • How to detect window close event and do some task before exiting

    Hi 
    Anyone knows how to detect window close event and do some task before exiting ?
    Sridhar
    Solved!
    Go to Solution.
    Attachments:
    window close event.JPG ‏34 KB

    Yes .You can discard the panel close event by passing "TRUE" boolean value to the "discard ?" terminal which is lied in the right side of that panel close(filter) event.& It will work in executables.  See attached picture.
    Attachments:
    Panel Close.JPG ‏12 KB

  • Auto Launch Application and perform some action

    Hello Friends,
    I am working on Autoback, want to launch application and perform some action to take backup.
    Can any one please update me what all the J2ME phone supports this kind of feature and basic needs to implement Autobackup, any sample code available please let me know
    Thanks,
    Kumar.M.R

    Something sketchy.
    I had the same message appear. It resized my window to the smallest possible size (not minimize!) and when I resized it larger, it had opened a new tab with that message. It was on "c510a1.minersaver1.com" which sounds like a related site. It tried to download "avmast_2004-4_mst5.exe"and I was going to try and refind this site on my Linux box, but forgot to save the exact URL (oops!).
    Running Firefox 4.0b11 on 64-bit Windows 7 Home Premium.
    EDIT: Found a LIVE link
    http://c510a1.minersaver1.com/defender/?44a=pccfjf&8d1ad=glslkkqpgl&eb45=gpqmpkkcmc&03f67=3

  • Find without small caps italic and apply cstyle

    Hi All,
    I have small caps (nested) line with italic text (see the screenshot), I have tried to apply the "small caps italic" character style successfully. After that I will apply the "small caps" cstyle to only small cap's text, but not working my script, can you please correct this.
    var itals = ["Italic", "Light Italic", "LightItalic", "Book Italic", "Cursive", "Light Condensed Italic", "Book Condensed Italic", "Ultra Condensed Italic", "Ultra Italic", "Condensed Italic", "ThinItalic", "BookItalic", "LightItalic", "BookItalic", "UltraItalic"]
    var smallCaps = ["Small Caps & Oldstyle Figures", "55Roman Small Caps & Oldstyle Figures", "smallCaps"];
    Fix_All_SmallCaps_Italic()
    function Fix_All_SmallCaps_Italic()
        try
            var myCStyle7 = app.activeDocument.characterStyles.item("15 Small Caps Italic").name;
        catch(myError)
            var myCStyle7 = app.activeDocument.characterStyles.add({name: "15 Small Caps Italic", capitalization: Capitalization.SMALL_CAPS, fontStyle: "Italic"})
        for(i=0; i<itals.length; i++)
            app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
            app.findTextPreferences.fontStyle = itals[i];
            app.findTextPreferences.capitalization = Capitalization.SMALL_CAPS;
            app.changeTextPreferences.appliedCharacterStyle = "15 Small Caps Italic";
            app.activeDocument.changeText();
    //~ exit(0);
    Fix_All_SmallCaps();
    function Fix_All_SmallCaps()
    try
        var myCStyle6 = app.activeDocument.characterStyles.item("15 Small Caps").name;
    catch(myError)
        var myCStyle6 = app.activeDocument.characterStyles.add({name: "15 Small Caps", capitalization: Capitalization.SMALL_CAPS})
    for(sc=0; sc<smallCaps.length; sc++)
        app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
        app.findTextPreferences.fontStyle = smallCaps[sc];
        app.changeTextPreferences.appliedCharacterStyle = "15 Small Caps";
        app.activeDocument.changeText();
    //find attribute and apply character style
    var myDoc = app.activeDocument; 
    var mcstyle = app.activeDocument.characterStyles.item("15 Small Caps Italic").name;
    app.findTextPreferences = app.changeTextPreferences = null;
    app.findTextPreferences.capitalization = Capitalization.SMALL_CAPS;
    app.changeTextPreferences.appliedCharacterStyle = "15 Small Caps";
    var myFind = myDoc.findText(); 
    for(var j=0; j<myFind.length; j++){
    if(myFind[j].appliedCharacterStyle.name == mcstyle){
        alert(myFind[j].contents)
        continue;
    else if (myFind[j].appliedCharacterStyle.name != mcstyle){
    app.activeDocument.changeText();}

    Hi Jarek,
    I can't get the output,
    itals = ["Italic", "Light Italic", "LightItalic", "Book Italic", "Cursive"]
    Fix_All_SmallCaps_Italic()
    function Fix_All_SmallCaps_Italic()
        try
            var myCStyle7 = app.activeDocument.characterStyles.item("15 Small Caps Italic").name;
        catch(myError)
            var myCStyle7 = app.activeDocument.characterStyles.add({name: "15 Small Caps Italic"})
        try
        var myCStyle6 = app.activeDocument.characterStyles.item("15 Small Caps").name;
    catch(myError)
        var myCStyle6 = app.activeDocument.characterStyles.add({name: "15 Small Caps"})
        for(i=0; i<itals.length; i++)
            app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
            app.findTextPreferences.capitalization = Capitalization.SMALL_CAPS;
            app.findTextPreferences.fontStyle = itals[i]
            var myFind = app.activeDocument.findText();
            for (j=0; j<myFind.length; j++)
            if (app.findTextPreferences.fontStyle == itals[i])
                app.changeTextPreferences.appliedCharacterStyle = "15 Small Caps Italic";
                app.activeDocument.changeText();
            else if (app.findTextPreferences.fontStyle != itals[i])//I locked here
                app.changeTextPreferences.appliedCharacterStyle = "15 Small Caps";
                app.activeDocument.changeText();
    Can you please correct this.
    selva

  • Find Change window too large and I cannot make it smaller

    In Indesign CC the find/change window is continually resizing. This happens when I place a larger block of text into the find or replace field. After a few such changes I end up with a window as wide as my screen. I am able to get rid of it by restarting Indesign and resetting the preferences at restart. This is not a solution. How can this window be reduced in size or better yet set to remain at a fixed size.
    I am operating on a Mac with system: 10.10.2
    Thanks
    Scott

    In Indesign CC the find/change window is continually resizing. This happens when I place a larger block of text into the find or replace field. After a few such changes I end up with a window as wide as my screen. I am able to get rid of it by restarting Indesign and resetting the preferences at restart. This is not a solution. How can this window be reduced in size or better yet set to remain at a fixed size.
    I am operating on a Mac with system: 10.10.2
    Thanks
    Scott

  • Where do I find the Windows 8 software and license for mye X1 Carbon?

    Hi, I have a 20A7-model of the Thinkpad X1 Carbon. It has preinstalled Windows 7 and there was not any Windows 8 upgrade media in the package. How do I get the software for upgrading to Windows 8, and where do I find my license key?
    Best regards, Amund

    Hi amund,
    If I understand your question, the info that was included with your order shows it as having Windows 7 as well as Windows 8 pre-installed.
    Usually, I run Speccy (Free) when I need more information regarding what is on my computer. I do not know if it will help in this case, but it is worth a try.
    Screenshots: https://www.piriform.com/speccy/screenshots <-- After running the tool, when each section on the left of those windows is expanded by clicking on them you will see more details.
    *Note: I noticed before installing Speccy that there are two items that have been pre-checked to install. If you do not want them (toolbars, etc.) UNcheck them before installing Speccy.
    I hope this helps.
    ThinkPad: T530 / X1 Gen 2 / Helix - Yoga: Tablet 2 Pro (Win) / Yoga 3 Pro
    If you find a post helpful and it answers your question, please click the "Accept As Solution" button.
    Lenovo Advocate ~ I am not employed by Lenovo or Microsoft. I am a volunteer.
    Microsoft MVP - Consumer Security
    SpywareHammer

  • Obnoxious finder/screen/window behavior -- oh, and crashes

    I'm getting increasingly angry at this Beta release Apple sold us all.
    Am I the only one experiencing random finder crashes? Literally in the MIDDLE of just typing a sentence on a forum I was on this morning, everything stopped. No more typing. I could move the mouse around, but it wouldn't let me click or select anything. I couldn't do anything but force a reboot. I had a similar crash this morning in the middle of drawing a curve in Illustrator, one in the middle of opening a new browser window, and one when opening up a folder from the dock. Yeah, that's FOUR CRASHES in one day. So far.
    Also, when I'm scrolling around in messages, I get all sorts of weird artifacts in the screens -- like polygons shearing in a bad video game, only the polygons are parts of the screen/window I'm in. I also get an occasional pink shadow (square, solid in one corner with a sort of fading gradient toward the opposite corner) popping up from time to time randomly.
    On top of the headache over trying to get Mail to work properly again, I'm now convinced that Apple has rushed an unfinished release out too early.
    (I think they've gone more than just putting Intel inside the Mac -- they've now firmly adopted the Microsoft system-marketing mentality.)
    Does anyone know a fix to keep the damned thing from crashing? I've gotten so paranoid I save every 30 seconds, but when working on posts I am living in fear that a long post such as this may just disappear with the next crash, and I'll have to start all over again. (again.)
    Tony

    Find outthe graphics card you are using and do a search on Leopard forums for > graphics problems - it may be a matter of reinstalling the drivers.
    You can also search for the graphics card name.
    One example of a similar issue
    http://discussions.apple.com/thread.jspa?messageID=5884566&#5884566

  • I can't find my windows HD icon and my MB has shut down randomly

    Hi everybody!
    I am an new Mac user from Hong Kong. I bought this MB around 20 of May, then installed the Boop Camp and everythings keep going good. However, the nightmare was came 2 weeks ago.
    My MB randomly shutted down at lease 4 to 6 times, but I could stand that because it wasn't serious for me. OK...the problem is here...now my MB lost my windows partition!
    The windows icon used to show on the desk, but I haven't seen it any more. I try to search it in the computer but found nothing, then I was going to restart my computer and pressing the option key to chose the windows partition, but once again it shutted down. Once, it did run around 10 seconds and showed loading the windows XP but it shutted down again.
    Can anyone tell me what should I do? Should I bring it to the Applecare? But the problem is related to Boomcamp, so will they assist this issue for me? Is it means I lost all of the files in the Windows Partition?
    A thousand thanks to all you guys!
    MacBook   Mac OS X (10.4.6)   1 Gig Ram and 80 Gig HD

    This random issue of shutting down isn't isolated to Boot Camp. It's a hardware issue that needs to be addressed with AppleCare. So yes you should take it to them. It's possible that the drive losing power multiple times may have affected the drive and messed up your partition information.
    I'd try booting with the OS X install disc 1 in the drive and holding down C. Once it's loaded, chose the drop down menu Utilities > Disk Utility and run the option to "repair disk". See if that helps any.
    Nick

  • How can I parse email activation link and do some action?

    I have som email activation link
    http://localhost:8085/application/activate.jsf?id=10&key=35435454654654654646
    I want when user clicked on this url ,
    automatically do action in bean and activate his account or not.
    I receive parameters key and id from requestParameterMap, but I do not want put on the page commandLink and do action after clicking on it.
    key = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("key");
        id = (String) FacesContext.getCurrentInstance().getExternalContext()
                .getRequestParameterMap().get("id");
        How can I do this?
    I have some method activation () and I want run it after receiving key and uid ,
    May be I need phase listener? If yes, can you provide simple example.

    I'm afraid you'll have to use some kind of action listener; that's how jsf commandLink and commandButtons are design to work
    OR
    you could achieve your goal by writing a servlet mapped to the url . capture your request parameters and do the activation in your servlet.

  • How to drive javafx webview to navigate a few webpages and do some actions?

    I want to drive webview to open one url, click on some button, then get the result and then open another url and do something else.
    I can process event by javascript called from java. but I am confused with the javafx thread model. How can I drive a javafx thread?
    what I want is. Running javafx webview in background as a service.
    javafx thread:
        while(true){
            waiting command from other thread;
            if(command quit) break;
            switch  command
                case Nav:
                case Click:
            save result to someplace shared with other thread.
    driver thread:
        read command from somewhere such as standard input stream
        send command to javafx thread
        wait javafx result

    From the driver thread, just submit your tasks to the JavaFX thread using Platform.runLater(). Note that runLater() is asynchronous; you may need to employ locks or some callbacks to get results back to the driver thread.

  • HT1752 I both one Mac Pro 15" March 2009  and five month ago I have to change the harddrive and put some actional memories, since I have to make the upgrade for Lion IOS. Now the motherboard fails. What should I do or expect from Apple to solve this probl

    Hi everyone. I both a Mac Pro 15" in March 2009. Five month ago I  was forced to buy by one new hard drive and extent the memory, because I had to make the upgrade (and pay) to install the new Lion operation system. Four days ago the Mother-board fails. To change it will cost a fortune. What should I do or expect from Apple to solve this problem? I am very disappointed because my trust on Apple was destroyed.

    I am not sure why you are upset with Apple. Electronics equipment does fail. If the product is out of warranty or you do not have AppleCare there's not much you can do with Apple. Apple will charge you for the repair. Suggest you look for a third party repair store since they are usually less expensive than Apple. Alternatively you can buy one for about $850US and install it yourself. Sorry, but there aren't many choices in this situation.

  • Find/Change window freezes - Appleworks 6.2.9

    When I use the Appleworks Find/Change window for the first time after booting up my new iMac, the Find/Change window freezes up and then disappears and then the opened document on my desktop disappears from my desktop, too. I have Appleworks 6.2.9 and a new iMac purchased a few months ago. Why does the Find/Change window freeze up and do that? How do I fix this? Thanks for any help!

    The most likely cause is corrupt preferences & is easily fixed by deleting the AppleWorks preferences.

  • Windows error 126 and avfoundation missing dll

    Hi all,
    I am hoping someone is able to help me with the following errors. I tried to open itunes with my asus laptop which is currently running windows 7 32bit, and for some reason it will not open, and the following messages will appear,
    Windows Error 126
    avfoundation missing dll.
    Please if there is anybody out there that can assist me I would be forever greatful.

    Taken at face value, you've got a damaged Apple Application Support program file, balda. (iTunes needs a properly functioning Apple Application Support in order to work correctly.
    On a 32-bit Windows 7 system, I'd try the following set of instructions:
    http://discussions.apple.com/thread.jspa?messageID=11901253&#11901253

Maybe you are looking for

  • Qosmio G40 hangs and some programs are not responding

    Hello and happy holidays to all. Please could i get some help with my G40? The pc is hanging and refusing to work. Ccreens lock and i get constant messages that the program(s)are not responding. I have run all checks i could find, chkdsk in cmd promp

  • Has anyone got a script for displaying a message when attribute combo = 0 stock on hand

        Looking for a script to display the wording back order when stock = 0. I am currently using {tag_instock, true, Please choose your customisation,Back Order} but that onle displays back order when product disable dont want to disbale product

  • BOM Explosion messages

    Dear Friend, I got below 2 messages in sales orders while BOM Explosin 1)Material XXXXXX has status-under development 2)material XXXXXX is not copied from BOM. after bom exploded in sales order excluding material XXXXXX. please inform what id the rea

  • MSAD upgrade to 2008 R2 - user authentication - HFM FDM 9.3 DM 11.1

    Looking to see if planned MSAD upgrade from 2003 to 2008 R2 will require any HFM, FDM or Disclosure Management administration to avoid possible user authentication errors? I understand they are compatible, but that doesn't necessarily mean connection

  • How to burn a dvd from Bridge, through the Output Module to a DVD?

    How do I burn a dvd pdf slideshow?  I have CC, ACR, Bridge and I have loaded the Output Module.  I know how to create the slideshow in Bridge.  How do I get from Bridge through the Output Module to the DVD?