Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34

Thread: Who can drop few lines of code?Send you beer!

  1. #1
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Kubuntu 11.04 Natty Narwhal

    Who can drop few lines of code?Send you beer!

    Ok,need some code:

    that "presses Shift+F9" after given time and interpreted any next keyboard/mouse input as Shift+F9

    thats all.

    Will send you 2 bottles german beer,not that export stuff,wherever you live!

  2. #2
    Join Date
    Jul 2009
    Location
    Nyack, Ny
    Beans
    84
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Who can drop few lines of code?Send you beer!

    In what application (ex. HTML, Python, Others) for what purpose (Malicious, otherwise), and, as a seemingly random question, is this for the rain function with Compiz? Because there are other ways to set that up.

    Oh, and I don't want your beer.
    If you are not free to choose wrongly and irresponsibly, you are not free at all. – Jacob Hornberger (1995)
    Ignorance is dependency, and dependency almost always results in imminent death.

  3. #3
    Join Date
    Jun 2009
    Beans
    89

    Re: Who can drop few lines of code?Send you beer!

    There seems to be a Python library for this.

    http://www.daniweb.com/forums/thread139376.html
    wat

  4. #4
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: Who can drop few lines of code?Send you beer!

    Quote Originally Posted by ArmenianLeader4 View Post
    In what application (ex. HTML, Python, Others) for what purpose (Malicious, otherwise), and, as a seemingly random question, is this for the rain function with Compiz? Because there are other ways to set that up.

    Oh, and I don't want your beer.
    yep,randomly right....rainplugin as screensaver

  5. #5
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: Who can drop few lines of code?Send you beer!

    Quote Originally Posted by ArmenianLeader4 View Post
    In what application (ex. HTML, Python, Others) for what purpose (Malicious, otherwise), and, as a seemingly random question, is this for the rain function with Compiz? Because there are other ways to set that up.

    Oh, and I don't want your beer.
    No?
    http://en.wikipedia.org/wiki/Beerware


    Can you tell me more about the other ways please?

  6. #6
    Join Date
    Jul 2007
    Location
    Luleå, Sweden
    Beans
    573
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Who can drop few lines of code?Send you beer!

    Code:
    sudo apt-get install xautomation
    Code:
    #!/usr/bin/env bash
    
    while [ 1 ]
    do
        xte "keydown Shift_L"
        xte "key F9"
        xte "keyup Shift_L"
        sleep 60s # Change this for longer intervals
    done
    Now how about that beer?

  7. #7
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: Who can drop few lines of code?Send you beer!

    Quote Originally Posted by Nevon View Post
    Code:
    sudo apt-get install xautomation
    Code:
    #!/usr/bin/env bash
    
    while [ 1 ]
    do
        xte "keydown Shift_L"
        xte "key F9"
        xte "keyup Shift_L"
        sleep 60s # Change this for longer intervals
    done
    Now how about that beer?
    Cannot test it til tuesday evening,not at my machine now.But made one mistake:
    wanted it as compiz/rainplugin screensaver:

    ...that "presses Shift+F9" after given time of Mouse/Keyboard inactivity and interpreted any next keyboard/mouse input as Shift+F9

    Sorry,forgot that.Can this be done?
    What beer you prefer?Dark and strong?Bavarian?Weissbier?

  8. #8
    Join Date
    Jul 2007
    Location
    Luleå, Sweden
    Beans
    573
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Who can drop few lines of code?Send you beer!

    Quote Originally Posted by realzippy View Post
    Cannot test it til tuesday evening,not at my machine now.But made one mistake:
    wanted it as compiz/rainplugin screensaver:

    ...that "presses Shift+F9" after given time of Mouse/Keyboard inactivity and interpreted any next keyboard/mouse input as Shift+F9

    Sorry,forgot that.Can this be done?
    What beer you prefer?Dark and strong?Bavarian?Weissbier?
    I'm not sure I follow you. You want it to wait for you to stop moving your mouse, and once you do, a timer should start. At a certain interval, you want to simulate pressing Shift + F9. Once you move your mouse again, the timer should stop?

    And it can't be a standalone application, but it has to be somehow incorporated into compiz?

    The first part I might be able to handle, but there's no way I could work it into compiz.

  9. #9
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: Who can drop few lines of code?Send you beer!

    Quote Originally Posted by Nevon View Post
    I'm not sure I follow you. You want it to wait for you to stop moving your mouse, and once you do, a timer should start. At a certain interval, you want to simulate pressing Shift + F9. Once you move your mouse again, the timer should stop?

    And it can't be a standalone application, but it has to be somehow incorporated into compiz?

    The first part I might be able to handle, but there's no way I could work it into compiz.

    I want to start rain plugin as screensaver (manually started and stopped by Shift+F9)....so the script should detect that there is no Keyboard/Mouse action for given time,start rain plugin,and stop it by any mouse/keyboard action.
    It can be a stand-alone-application;thought to put the script somewhere in
    /etc/init.d/ ?

  10. #10
    Join Date
    Jun 2006
    Location
    $ pwd _
    Beans
    3,999
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Who can drop few lines of code?Send you beer!

    Quote Originally Posted by Nevon View Post
    Code:
    sudo apt-get install xautomation
    Now how about that beer?
    Thanks for that. Never heard of this tool before. Might come handy sometime.

Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •