Grab screen and send by Syphon

Hi! What i need is to get what happen behind my window and send it via Syphon. I tried using ofxScreenGrab, ofxTransparentWindow and, of course, ofxSyphon. When i try to see my Syphon signal in Syphon Client app, i have some strange behaviour.
When i launch my app i see the right thinks on the Syphon output, but the strange thing is that when i click on a window of finder or at some app (for example Skype), they disappear.
Any idea about this behaviour?

The code is not long, so i post here:

ofxSyphonServer outputSyphonTexture;
ofxTransparentWindow transparent;
ofxScreenGrab   grabber;

//--------------------------------------------------------------
void ofApp::setup(){
  ofEnableAlphaBlending();
  ofSetFrameRate(60);
  transparent.afterMainSetup(ofxTransparentWindow::NORMAL);
  grabber.setup(ofGetWidth(), ofGetHeight(), false);
}

//--------------------------------------------------------------
void ofApp::update(){
  transparent.update();
  grabber.grabScreen(ofGetWindowPositionX(), ofGetWindowPositionY());
}

//--------------------------------------------------------------
void ofApp::draw(){
  ofTexture tex = grabber.getTextureReference();
  outputSyphonTexture.publishTexture(&tex);
}

Are you trying to capture and send a screen’s content or a window’s content?

I’m trying to capture and send the screen’s content. In the end of all, i want to use Photoshop (or others draw-software) and record in real time what i do in Photoshop and send via Syphon.
I want to realize it, but maybe somebody know also a software that already do this stuff?

You might give Screener a quick look, I created it for a very similar purpose, and it publishes a selected display via Syphon on OS X 10.8+. It can be glitchy at times, so definitely continue looking if it isn’t doing what you need.

1 Like

Thanks pizthewiz, your app works very well! But the problem is that i need to use a software under your app’s window and i need to record just one portion of the screen.
Anyway, thanks a lot! I can study your code and try to understand something that maybe could help me!