Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 12, 2012, 03:22 PM   #1
Shadowbadger
macrumors newbie
 
Join Date: Jun 2012
Blackout a portion of the screen

I am not sure where to post this as there could be all kinds of solutions.

I watch the NFL online, it comes via what I think is an embedded Java app for streaming. The problem is that the channels which broadcast the games (CBS/Fox) put an update banner at the bottom of the screen showing the scores of games other than the one you are watching.

Over the course of the week I will watch many games and prefer not to know the result (living in the UK makes it easy to not be spoiled).

The effect I would like to achieve is blacking out this banne.

Some ideas I have are:
  1. Making an app which is just a black banner of x pixel thickness. This banner would be draggable and would have to be layered above the fullscreen Java applet which sits in Chrome
  2. Turning of entire lines of the display from say 750 to 800.
  3. Turning off entire lines in Chrome fullscreen (not sure if the applet would be affected by that).

Hopefully you can see what I am trying to do, any ideas?
Shadowbadger is offline   0 Reply With Quote
Old Jun 12, 2012, 04:30 PM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
Masking tape?

Or maybe some Post-its stuck on the screen, since their adhesive may be less trouble to remove than masking tape.

I would be looking for a solution that involves no programming or scripting whatsoever. And I say that as an experienced programmer.
chown33 is offline   0 Reply With Quote
Old Jun 12, 2012, 04:37 PM   #3
sero
macrumors member
 
Join Date: Aug 2008
Assuming you're on a mac, why not just use the zoom function? On my macbook, if I hold control and swipe 2 fingers up, the screen zooms in. You could just crop the screen this way.
sero is offline   0 Reply With Quote
Old Jun 12, 2012, 05:04 PM   #4
Shadowbadger
Thread Starter
macrumors newbie
 
Join Date: Jun 2012
Quote:
Originally Posted by chown33 View Post
Masking tape?
What I did last season :P

Quote:
Originally Posted by sero View Post
Assuming you're on a mac, why not just use the zoom function? On my macbook, if I hold control and swipe 2 fingers up, the screen zooms in. You could just crop the screen this way.
I am, sorry I should have said OSX 10.6, Mabcook Pro 3,1 2.2GHz

The zoom thing works although I lose about 1/5 of the width of the screen.

If there is a possible programming solution I am confident in being able to do it. I should have said that I am a software developer although working mostly with business systems. The correct route or terminology even to look at first would help a lot as I can go away and investigate it.

Just now I do not know where to start.
Shadowbadger is offline   0 Reply With Quote
Old Jun 12, 2012, 05:46 PM   #5
chown33
macrumors 603
 
Join Date: Aug 2009
Quote:
Originally Posted by Shadowbadger View Post
What I did last season :P
If it ain't broke, don't fix it.


Quote:
Just now I do not know where to start.
I would start by finding out exactly how the content is being presented now. Is it a Java applet? Is it something else?

If it's a Java applet, is it possible to wrap the applet in a different webpage with different HTML, and specify a height that clips the bottom part off? Or how about using HTML5 with CSS and absolute positioning, to overlay the applet's subview with a floating CSS object that's opaque black?

If it's not a Java applet, is some other HTML surround possible?

Since you haven't told us anything about where the website is, no one else can look at it and make informed suggestions.

As to an app that shows a black banner you can overlay, how about QuickTime Player opening an audio file. Or there are any number of text editors that would let you configure the window color and text color. Open a window, paint it black, position window as desired.
chown33 is offline   0 Reply With Quote
Old Jun 12, 2012, 09:06 PM   #6
Shadowbadger
Thread Starter
macrumors newbie
 
Join Date: Jun 2012
It is "broke".

If I judged it adequate I would not be looking for another solution and would not have posted here.

Taking it off all the time is annoying and I cannot leave it on the big TV all the time as I am not the only one who uses it and the NFL is not the only thing I watch.

It is a Flash player, not sure why I thought it was Java, possibly it was in the past as the player did change a couple of years back. The reason I did no link it was I assumed you did not want to pay for it in order to answer this post.

I tried putting the flash in an iframe but even with a really high z-index I could not get another element to go on top of the flash when the flash is in fullscreen mode (the player cannot be resized, it is the slightly bigger youtube size (close to at least) or fullscreen

I have made some progress though. Opening a folder in slideshow mode (Opt-Cmd-Y) but not in fullscreen gives a mostly opaque draggable window. Better still, when dragged to the external monitor over the running, fullscreen flash video the slideshow is on top.

The problem though, it is not quite opaque enough. The file open of TextWrangler works as well but something black is easier on the eyes.

Something like the slideshow but darker is what I need. Be in the form of an existing app or creating something.

The programming question would be what do I need to call on a cocoa window to bring it to the foreground in exactly the same way as this slideshow . . . in front of the fullscreen external monitor.

Another solution could be making the slideshow backing less transparent, I cannot see how to do that though.

Which text editior allows you to configure the background of the file open window? Mine (TextWrangler) opens a standard OSX file browser.
Shadowbadger is offline   0 Reply With Quote
Old Jun 12, 2012, 10:38 PM   #7
chown33
macrumors 603
 
Join Date: Aug 2009
You didn't say it was pay-to-play, so how would I know?


When I referred to a text editor, I meant an open empty window, whose background color is set to black (TextWrangler can do this). Not that useful, though, because the title bar won't be black.


You haven't said what programming languages you know, so I'm unsure what to recommend there. Some might be easier (like Java). Others might be more difficult.

You haven't said if you have Xcode installed or not, or which version. Knowing your available tools would be useful.

You haven't said which OS version, either, so I don't know whether a simple Java JFrame would work or not. (Java isn't installed by default on Lion.)


Example:
Code:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

// To compile:  javac BlackBar.java
// To run:  java BlackBar

public class BlackBar
{
	public static void
	main( String[] args )
	{
		JFrame bar = new JFrame();
		bar.setUndecorated( true );  // no titlebar, etc.
		bar.setLocation( 10, 600 );  // x, y
		bar.setSize( 1000, 100 );  // width, height
		bar.setBackground( Color.black );
		bar.getRootPane().putClientProperty( "Window.shadow", Boolean.FALSE );
		bar.getRootPane().putClientProperty( "apple.awt.draggableWindowBackground", Boolean.TRUE );
		bar.setVisible( true );
	}
}
Copy and paste into a file "BlackBar.java". Compile and run per comments.
To change initial position or size, edit numbers of setLocation and setSize, recompile, rerun.

The bar is movable by clicking and dragging anywhere in the window.

Last edited by chown33; Jun 13, 2012 at 01:56 AM. Reason: add putClientProperty()
chown33 is offline   0 Reply With Quote
Old Jun 13, 2012, 04:30 AM   #8
davidambler
macrumors newbie
 
Join Date: Feb 2012
Is geektool an option here? Create a image of the right size and set it to always be on top of windows?
davidambler is offline   0 Reply With Quote
Old Jun 13, 2012, 11:37 AM   #9
Shadowbadger
Thread Starter
macrumors newbie
 
Join Date: Jun 2012
Quote:
Originally Posted by chown33 View Post
You didn't say it was pay-to-play, so how would I know?
Firstly,

Please take this the right way. You need to relax, like a lot.

Yeah so I forgot to mention absolutely everything in the initial post. There were so many possible solutions that I left it quite open. Try being less critical as well, more "which languages do you know" or "which operating system version are you using" and less "you did not tell us" or "you did not say". It is confrontational and needlessly critical.

This will help productive discussion as well as reduce your stress levels. If there are so many things wrong with my post then ignore it, you do not have to read it, or reply.

Perhaps you are not stressed, just unaware of how you come across on the internet . . . Richard.

I did in fact tell you that I was using OSX 10.6 earlier in the thread.

I did not mention which languages I know because I do not view programming that way. For something like this I felt able to implement in any language. What I needed were some pointers into which language, API or app was capable of something like this before I started blindly at the first on the list. I was expecting answers with Cocoa which I am not familiar with but felt confident in learning for a simple thing like this.

I compiled and ran the Java code, thank you for that. It created a black banner but it was not on top of the fullscreen video. I had a look at it though and added setAlwaysOnTop(true) which worked, now I just need to adjust the size of the border. I may make it into a proper little app and have the size adjustable through a config box.

I tried Geektool although as far as I got with it the background is the same kind of transparency as the slideshow, which is the same as stacks, it must be a fixed kind of window in OSX. Good suggestion though it looks like a cool little app, may come in handy at some point.

----------

Oh, and telling me that I need to not do this in the first place.

I see this a lot on forums, somebody asks a question then gets a reply from someone who does not have an answer but thinks the question is wrong. I have come across many a thread like this and I wanted the same answer as the original poster but all that has happened in the thread is he has been talked out of asking the question.
Shadowbadger is offline   0 Reply With Quote
Old Jun 13, 2012, 12:48 PM   #10
chown33
macrumors 603
 
Join Date: Aug 2009
Quote:
Originally Posted by Shadowbadger View Post
I compiled and ran the Java code, thank you for that.
You're welcome.
chown33 is offline   0 Reply With Quote
Old Jun 13, 2012, 05:15 PM   #11
ScoobyMcDoo
macrumors 65816
 
Join Date: Nov 2007
Location: Austin, TX
Looks to me like NFL network uses flash, not java.
ScoobyMcDoo is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone: blackout iOS7 OUT NOW luk492 Jailbreaks and iOS Hacks 9 May 18, 2014 06:36 PM
Lines showing up on the bottom portion of the screen fiction2040 iPad Tips, Help and Troubleshooting 2 Apr 28, 2013 07:57 AM
Please help! Attempted to fix screen blackout, now computer won't boot at all spacebetty MacBook Pro 11 Apr 24, 2013 08:25 PM
Solid State Drive Portion martosprint OS X 10.8 Mountain Lion 3 Apr 19, 2013 11:46 AM
Blackout blinds someguy Community Discussion 2 Jan 9, 2013 10:04 AM

Forum Jump

All times are GMT -5. The time now is 06:11 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC