How to capture a screen by using robot class
how to capture a screen by using robot class
open the apidocs for the Robot class
read the methods - you won't get far when one of the methods will stand out
if you can't get it working, copy the method name and paste it into the 'search forums' box,
where you'll find plenty of sample code
Similar Messages
-
How to capture the screen of the remote computer
sir
i need help for my project how to capture the screen of the remote
system plaese give idea for doing the projectRun a daemon on the remote computer which uses java.awt.Robot.
-
How to capture selection-screen values
Hi,
How to capture selection-screen values when user pressing F3 or Back button after the display of report.
Regards,
Bujji.Hi Bujji,
select-option are actually ranges or more general internal tables with the structure:
SIGN: 'I'nclusive or 'E'xclusive
OPTION: 'EQ', 'BT', 'NE', 'GE', 'CP', ....
LOW: low value of type of the curresponding "FOR table-field"
HIGH: high value of type of the curresponding "FOR table-field"
You may just code:
TABLES: mara.
SELECT-OPTIONS s_matnr FOR mara-matnr.
LOOP AT s_matnr.
WRITE: / s_matnr-sign,
s_matnr-option,
s_matnr-low,
s_matnr-high.
ENDLOOP.
If you find my answer useful, please don't forget the reward.
Regards,
Juergen -
How to capture the screen and send it to attachment for that mail
hi sir ,
how to capture the screen shot and attach with that e-mail , whether it is possible or not ..
Regards,
kumarhi sir,
i am asking about while creating the support message from help menu in sap..
while creating the support message we have to give component , priority and text also .. after that click the send icon in that support desk message .. while clicking the send button the entire screen ( what we have entered in that creen na ) i have to capture the screen ( it may be save in local file also ) after that it will attach into attachment and then send it to ...
Regards,
kumar -
How to capture the screen for sending the mail
dear sir,
How to capture the screen for sending the mail .. Is there any funtion module or anyother way ? .. How to do this .. Please tell me..
Regards,
Kumardear sir,
s thats my problem ?
Regards,
kumar -
Can I capture full screen and save it as a image?
ThanksYes, use this robot method, where the bounds it requires can come from GraphicsEnvironment.
-
How to blank laptop screen when using external monitor/
Hi there
I need some help with figuring out how to configure my xorg.conf for my Arch Linux 64 bit installation on a HP Pavilion dv 5000 laptop so that I can automatically blank my laptop screen when using an external monitor. I have Arch Linux installed along with Ubuntu Feisty. In Ubuntu my external monitor (Viewsonic 1912WB) was not detected at the time of installation but with the native 1280X800 resolution that is good for the laptop takes effect for the external monitor automatically when the external monitor is plugged in. The laptop monitor goes blank when the external monitor is plugged in.
In my Arch Linux installation I have not been able to configure a dual head configuration using the ATI Radeon drivers (fglrx). I have the native 1280X800 resolution set up for the laptop monitor and this resolution takes effect for the external monitor also. However the laptop monitor also continues to function when the external monitor is plugged in. I would like to blank the laptop monitor when using the external monitor.
I am attaching my Arch Linux xorg.conf and the Ubuntu xorg.conf below. Thanks for anyone who can help, I am having a lot of difficulty in figuring out how to set up xorg.conf among all the things that I have had to learn so far in Linux and I am a relative newcomer to the whole thing. I have tried to compare the two xorg.conf files and edit my Arch xorg.conf in accordance with the Ubuntu one but it did not work and I keep getting errors!
I am using XFCE as my Desktop environment.
Arch Linux xorg.conf
# File generated by xorgconfig.
# Copyright 2004 The X.Org Foundation
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# The X.Org Foundation BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Except as contained in this notice, the name of The X.Org Foundation shall
# not be used in advertising or otherwise to promote the sale, use or other
# dealings in this Software without prior written authorization from
# The X.Org Foundation.
# Refer to the xorg.conf(5) man page for details about the format of
# this file.
# Module section -- this section is used to specify
# which dynamically loadable modules to load.
# Files section. This allows default font and rgb paths to be set
# Server flags section.
# Input devices
# Core keyboard's InputDevice section
# Core Pointer's InputDevice section
# Other input device sections
# this is optional and is required only if you
# are using extended input devices. This is for example only. Refer
# to the xorg.conf man page for a description of the options.
# Section "InputDevice"
# Identifier "Mouse2"
# Driver "mouse"
# Option "Protocol" "MouseMan"
# Option "Device" "/dev/mouse2"
# EndSection
# Section "InputDevice"
# Identifier "spaceball"
# Driver "magellan"
# Option "Device" "/dev/cua0"
# EndSection
# Section "InputDevice"
# Identifier "spaceball2"
# Driver "spaceorb"
# Option "Device" "/dev/cua0"
# EndSection
# Section "InputDevice"
# Identifier "touchscreen0"
# Driver "microtouch"
# Option "Device" "/dev/ttyS0"
# Option "MinX" "1412"
# Option "MaxX" "15184"
# Option "MinY" "15372"
# Option "MaxY" "1230"
# Option "ScreenNumber" "0"
# Option "ReportingMode" "Scaled"
# Option "ButtonNumber" "1"
# Option "SendCoreEvents"
# EndSection
# Section "InputDevice"
# Identifier "touchscreen1"
# Driver "elo2300"
# Option "Device" "/dev/ttyS0"
# Option "MinX" "231"
# Option "MaxX" "3868"
# Option "MinY" "3858"
# Option "MaxY" "272"
# Option "ScreenNumber" "0"
# Option "ReportingMode" "Scaled"
# Option "ButtonThreshold" "17"
# Option "ButtonNumber" "1"
# Option "SendCoreEvents"
# EndSection
# Monitor section
# Any number of monitor sections may be present
# Graphics device section
# Any number of graphics device sections may be present
# Standard VGA Device:
# Device configured by xorgconfig:
# Screen sections
# Any number of screen sections may be present. Each describes
# the configuration of a single screen. A single specific screen section
# may be specified from the X server command line with the "-screen"
# option.
# ServerLayout sections.
# Any number of ServerLayout sections may be present. Each describes
# the way multiple screens are organised. A specific ServerLayout
# section may be specified from the X server command line with the
# "-layout" option. In the absence of this, the first section is used.
# When now ServerLayout section is present, the first Screen section
# is used alone.
# Section "DRI"
# Mode 0666
# EndSection
Section "ServerLayout"
# The Identifier line must be present
# Each Screen line specifies a Screen section name, and optionally
# the relative position of other screens. The four names after
# primary screen name are the screens to the top, bottom, left and right
# of the primary screen. In this example, screen 2 is located to the
# right of screen 1.
# Each InputDevice line specifies an InputDevice section name and
# optionally some options to specify the way the device is to be
# used. Those options include "CorePointer", "CoreKeyboard" and
# "SendCoreEvents".
Identifier "Simple Layout"
Screen 0 "aticonfig-Screen[0]" 0 0
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
Section "Files"
# The location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
# RgbPath "/usr/share/X11/rgb"
# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)
# FontPath "/usr/share/fonts/TTF"
# FontPath "/usr/share/fonts/Type1"
# FontPath "/usr/lib/X11/fonts/local/"
# FontPath "/usr/lib/X11/fonts/misc/"
# FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
# FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
# FontPath "/usr/lib/X11/fonts/Speedo/"
# FontPath "/usr/lib/X11/fonts/Type1/"
# FontPath "/usr/lib/X11/fonts/TrueType/"
# FontPath "/usr/lib/X11/fonts/freefont/"
# FontPath "/usr/lib/X11/fonts/75dpi/"
# FontPath "/usr/lib/X11/fonts/100dpi/"
# The module search path. The default path is shown here.
# ModulePath "/usr/lib/modules"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/100dpi:unscaled"
FontPath "/usr/share/fonts/75dpi:unscaled"
EndSection
Section "Module"
# This loads the DBE extension module.
# This loads the miscellaneous extensions module, and disables
# initialisation of the XFree86-DGA extension within that module.
# This loads the font modules
# Load "type1"
# This loads the GLX module
# Load "glx"
# This loads the DRI module
# Load "dri"
Load "dbe" # Double buffer extension
SubSection "extmod"
Option "omit xfree86-dga" # don't initialise the DGA extension
EndSubSection
Load "freetype"
# Load "xtt"
EndSection
Section "InputDevice"
# For most OSs the protocol can be omitted (it defaults to "Standard").
# When using XQUEUE (only for SVR3 and SVR4, but not Solaris),
# uncomment the following line.
# Option "Protocol" "Xqueue"
# Option "Xleds" "1 2 3"
# Option "LeftAlt" "Meta"
# Option "RightAlt" "ModeShift"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc105"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# These are the default XKB settings for Xorg
# Option "XkbRules" "xorg"
# Option "XkbModel" "pc105"
# Option "XkbLayout" "us"
# Option "XkbVariant" ""
# Option "XkbOptions" ""
# Option "XkbDisable"
Identifier "Keyboard1"
Driver "kbd"
Option "AutoRepeat" "500 30"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
# Identifier and driver
# the following line.
# Option "Protocol" "Xqueue"
# Mouse-speed setting for PS/2 mouse.
# Option "Resolution" "256"
# Baudrate and SampleRate are only for some Logitech mice. In
# almost every case these lines should be omitted.
# Option "BaudRate" "9600"
# Option "SampleRate" "150"
# Mouse wheel mapping. Default is to map vertical wheel to buttons 4 & 5,
# horizontal wheel to buttons 6 & 7. Change if your mouse has more than
# 3 buttons and you need to map the wheel to different button ids to avoid
# conflicts.
# Emulate3Timeout is the timeout in milliseconds (default is 50ms)
# Option "Emulate3Buttons"
# Option "Emulate3Timeout" "50"
# ChordMiddle is an option for some 3-button Logitech mice
# Option "ChordMiddle"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "Auto" # Auto detect
Option "Device" "/dev/input/mice"
# When using XQUEUE, comment out the above two lines, and uncomment
Option "ZAxisMapping" "4 5 6 7"
# Emulate3Buttons is an option for 2-button mice
EndSection
Section "Monitor"
# HorizSync is in kHz unless units are specified.
# HorizSync may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
# HorizSync 30-64 # multisync
# HorizSync 31.5, 35.2 # multiple fixed sync frequencies
# HorizSync 15-25, 30-50 # multiple ranges of sync frequencies
# VertRefresh is in Hz unless units are specified.
# VertRefresh may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
Identifier "My Monitor"
HorizSync 30.0 - 62.0
VertRefresh 50.0 - 70.0
EndSection
Section "Monitor"
Identifier "aticonfig-Monitor[0]"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection
Section "Device"
# The chipset line is optional in most cases. It can be used to override
# the driver's chipset detection, and should not normally be specified.
# Chipset "generic"
# The Driver line must be present. When using run-time loadable driver
# modules, this line instructs the server to load the specified driver
# module. Even when not using loadable driver modules, this line
# indicates which driver should interpret the information in this section.
# The BusID line is used to specify which of possibly multiple devices
# this section is intended for. When this line isn't present, a device
# section can only match up with the primary video device. For PCI
# devices a line like the following could be used. This line should not
# normally be included unless there is more than one video device
# intalled.
# BusID "PCI:0:10:0"
# VideoRam 256
# Clocks 25.2 28.3
Identifier "Standard VGA"
Driver "vga"
VendorName "Unknown"
BoardName "Unknown"
EndSection
Section "Device"
#VideoRam 131072
# Insert Clocks lines here if appropriate
Identifier "* Generic VESA compatible"
Driver "vesa"
EndSection
Section "Device"
Identifier "aticonfig-Device[0]"
Driver "fglrx"
EndSection
Section "Screen"
Identifier "Screen 1"
Device "* Generic VESA compatible"
Monitor "My Monitor"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 8
Modes "1280x800" "800x600" "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
Modes "1280x800" "800x600" "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x800" "800x600" "640x480"
EndSubSection
EndSection
Section "Screen"
Identifier "aticonfig-Screen[0]"
Device "aticonfig-Device[0]"
Monitor "aticonfig-Monitor[0]"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Ubuntu xorg.conf
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
# Edit this file with caution, and see the xorg.conf(5) manual page.
# (Type "man xorg.conf" at the shell prompt.)
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "Files"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
# path to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Section "Module"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "vbe"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizScrollDelta" "0"
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/input/wacom"
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/input/wacom"
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/input/wacom"
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "Device"
Identifier "ATI Technologies Inc ATI Radeon XPRESS 200M 5955 (PCIE)"
Driver "ati"
BusID "PCI:1:5:0"
EndSection
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "ATI Technologies Inc ATI Radeon XPRESS 200M 5955 (PCIE)"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1280x800"
EndSubSection
SubSection "Display"
Depth 4
Modes "1280x800"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x800"
EndSubSection
SubSection "Display"
Depth 15
Modes "1280x800"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x800"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x800"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
EndSection
Section "DRI"
Mode 0666
EndSectionXrandr 1.2 provides means for this. But today the only supported configuration is xorg-server-1.3 + xf86-video-intel-2.0. So for Radeon you'll have to wait for drivers that support Randr 1.2.
On my laptop (Thinkpad x60s) that would be:
xrandr --output VGA --auto
xrandr --output LVDS --off -
How to capture JPEG files by using camera
Hi, now I have a problem, I need your help, I am trying to use a camera that capture JPEG files from camera, I have used those related classes(JMF), but I still can not capture any JPEG files from it.
Although there are some examples about the video capture(just for mov or avi files), it does not mention how to capture JPEG files.
Thank you for your help!I have the same problem.
please,help us. -
How to capture SOAP fault when using "Do not use SOAP envelope" parameter
Hi,
we have a synchronous RFC -> XI -> Web Service scenario. The Web Service requires some custom SOAP header elements for user authorization which forced us create the entire SOAP message in a message mapping and to set the "Do not use SOAP envelope" parameter in the receiving SOAP adapter.
In order to capture the SOAP fault message from the Web Service we have created a message interface with a fault message and also created an interface mapping with a fault message mapping.
Our problem is that the fault message is not populated when we get a SOAP fault message back from the Web Service. Is this due to the fact that we have set the "Do not use SOAP envelope" parameter?
Thanks in advance!
Stefan
Message was edited by:
Stefan NilssonHi Bhavesh,
I have exaactly same scenario. But the only difference is that the Successful payload is also not coming into PI.
The request is successfully hittng the webservice.
Please guide me on how to capture the paylod.
I am using the WSDL provided by the thirdparty but sill the message is not coming into PI. -
Hi,
I would like to know if is possible capture Linux screens, in
order to produce Linux screencasts using Captivate 3.
I'm thinking about it. Are there ways to do it?
Thanks in advice.Hi again,
I don't actually use Linux. I was just suggesting an
alternate method that would work across operating systems.
Captivate works primarily by showing still images (individual
screen captures), which when viewed as a series of slides,
simulates the behavior of an application.
We take our still images as .PNG files using SnagIt on
Windows, but there are numerous alternatives for pretty much every
operating system.
I can't offer any recommendations for Linux, so I would
suggest doing a web search for "screen capture utility <linux
distribution>", where <linux distribution> is the name the
distribution you're looking to take screenshots in (i.e. Ubuntu,
Red Hat, etc.).
Since, as you noted, Captivate only works in Windows, the
basic idea would be this:
1) In Linux, launch the application you wish to capture.
2) Launch your screen capture utility in Linux (some
utilities are built into various Linux distributions, others
aren't... you'll need to decide which one you want to use).
3) In your Linux application, carry out the desired workflow,
taking a screen capture after EVERY change in your application
(every moust click, every text entry, every menu being selected,
screen data changing, etc.). This series of screenshots will be
used to recreate the process in Captivate.
4) Save each screen capture in .PNG format using a name that
reflects what the capture shows (such as
"main_screen__before_filemenu_clicked.png",
"main_screen_after_filemenu_clicked.png", and so on).
Depending on the process(es) you are documenting, you may end
up with a lot of images, so be consistent with your naming
convention and it will be easier to find the right image later.
I've found that I can pretty much rely on the creation date to
determine the order of screenshots, but every once in awhile I have
to go back and take one that I missed, at which point having a
detailed filename is very helpful.
5) After capturing all your screenshots, copy them to your
Windows machine. This can be done via a USB drive, burning them to
a CD, copying to a shared network location... whatever.
6) On the Windows machine, launch Captivate and create a new
project at the same size as the application you captured in Linux.
7) Insert each image as a background in Captivate (or, if
you're technically advanced, crop only the changed elements out of
the image and insert it as an image over an unchanged common
background).
8) Add a caption as needed to provide instructions to the
user.
9) Add any interactions needed to recreate the functionality
in the Linux application (buttons, click boxes etc.).
10) Insert a new slide and repeat steps 7-9 until you have
recreated the functionality of the original application using all
your static screenshots.
The process seems laborious at first, but you can really
start banging out the slides once you get the process down.
You don't get the automatic captions and automatic creation
of interactive objects that would come from capturing directly from
Captivate, but in our case, Captivate's built-in screen capture
tool does such a poor job with our particular applications that
we're better off doing everything ourselves.
Best of luck,
John -
How to Capture a UEFI Image Using ImageX
Is there any special steps needed to capture a UEFI Windows 7 or 8 Image? Do I need to capture all partitions or just the Windows Partition?
I have found articles describing how to apply the image but not how to capture it.
Yeah Buddy!Hi,
Here are 2 ways to capture the image,
1st using Windows Deployment Server,
http://www.petenetlive.com/KB/Article/0000735.htm
2nd using Imagex my Step
by Step Guide
Please bear in mind, that my answer is based on the details given in your post. The more I get the better the answer, Slan go foill, Paul -
How to capture the remot desktop using RMI?
Hi friends..
I am doing a mini project to capture the remot desktop using RMI. I am very new with this subject. So 'm waiting for the help of experts...You can't. RMI doesn't do that. After you have captured it, some other way, you can transmit it via RMI, or plain Sockets, or several other ways.
-
How to take a screen shot using Java
I'd like to get a screenshot while a user is playing a game such as Quake or Half-life. Is this at all possible using Java or do I have to stupe to using OS dependent functions?
MattIn SDK 1.3 there's a createScreenCapture method in the java.awt.Robot class.
-
Problem figuring out annotation using Robot class
HI
I have made a desktop sharing tool using the robot class in java. On the server end it captures screen and on the client end i have used a jlabel to diplay it....
Now i want to extend it to allow users to draw on screen while that is being transmitted to the client end.
The major problem for me is i dont know how do i get the frame being transmitted as the window i create to diplay the contents being capture would come to the top and hence its contents will be captured by the robot class......
How can i solve this????
Thanx in advance...I can suggest to you a solution to "draw" on the screen, but you won't be able to see what you're drawing as you draw it.
You'll need a seperate thread to poll the position of the mouse every 20 or so milliseconds. You can use
java.awt.MouseInfo.getPointerInfo().getlocation();to get the location of the mouse.
You then implement your drawing algorithms to draw on a BufferedImage of TYPE_4BYTE_ABGR or any of the other types that support transparency. Of course, the image needs to be the size of the screen. Then on every single image you stream, you draw your ABGR image ontop of the one you are about the stream. Voila.
As I said though, you can't actually see what you're drawing. In order to see what you are drawing you need to display it in a window that scales down the images and is unobtrusive. Of course, this window in turn will be caught by the screen capture, so the clients will be able to "see" your helper window.
On the other hand, if all you are doing is streaming images of a *single java window* (not the whole desktop) and all you need to do is draw on that single java window, then I can reccomend to you a better solution that utilizes the GlassPane for drawing. By using the the glass pane, the drawings will appear directly on the window, and you don't need a helper window to see your drawings. -
Doing Shift-End using Robot class
I am trying to use the Robot class to do a Shift-End in order to select the text in a window from the cursor to the end of the line. However, the following code only moves the cursor to the end of the line without selecting the text.
robot.keyPress(KeyEvent.VK_SHIFT);
robot.keyPress(KeyEvent.VK_END);
robot.keyRelease(KeyEvent.VK_END);
robot.keyRelease(KeyEvent.VK_SHIFT);
Note that I have been able to make the following code work. So the problem with the code above does not seem to be with the Shift key per se or with the ordering of the statements.
robot.keyPress(KeyEvent.VK_SHIFT);
robot.keyPress(KeyEvent.VK_A);
robot.keyRelease(KeyEvent.VK_A);
robot.keyRelease(KeyEvent.VK_SHIFT);
Any idea how to make the Shift-End work? I am using an XP PC.My ENTIRE code follows. Not surprisingly, the shiftEnd.actionPerformed gets a nullPointerException during execution. And being new to Java, I get the feeling I might be missing a whole bunch of stuff. For example, do I need to register for events? Do I need to generate a shift-End ActionEvent somehow? It is only the last 4 lines that are at issue here. Everything down to that point accomplishes what I want, i.e., position the mouse in a text window in the upper right-hand corner of my screen, move the cursor to the top of that window, then go down 5 lines. At that point, I want to do the shift-End to select all text in the line.
import java.awt.*;
import java.awt.event.*;
import javax.swing.KeyStroke;
import javax.swing.JTextField;
public class KeyStrokeTest {
/** Creates a new instance of KeyStrokeTest */
public KeyStrokeTest() {
* @param args the command line arguments
public static void main(String[] args)
throws AWTException{
Robot robot = new Robot();
// Position mouse over Test Director test
robot.mouseMove(600,300);
// Press and release left mouse button to set focus in Test Director test
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
// Go to top of Test Director test
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_HOME);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyRelease(KeyEvent.VK_HOME);
// Go down to first line of request
for(int i=0;i<5;i++) {
robot.keyPress(KeyEvent.VK_DOWN);
robot.keyRelease(KeyEvent.VK_DOWN);
robot.delay(1000);
// Do a shift End
KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_END,KeyEvent.VK_SHIFT);
JTextField textComponent = new JTextField("String");
ActionListener shiftEnd = textComponent.getActionForKeyStroke( keyStroke );
shiftEnd.actionPerformed( null );
Maybe you are looking for
-
Hi, I am using wlst offline downloaded from dev2dev site, which i believe is based on jython. Anyway, i am trying to create a domain. All is well untill i try to write the domain using writeDomain(). It fails with the following error "java.io.IOExcep
-
Trouble syncing calendar with itunes 7.3.2
After downloading the newest version of Itunes, my iPOD is no longer syncing my Calendar from Outlook 2003. I've tried resetting the iPod and enabling disk use. Is there a bug in this version that needs to be worked on?
-
Limiting the no. of EJB instances??
hi there.. am building a J2EE application where i want to limit the no. of instances created of one of my session beans,"FreeInfoBean", to only one instance no matter what is the no. of users visits my site; in other words, i wana have only "one" bea
-
List of Immutable Classes?
Is there a list of the classes in the standard lib. which are immutable (or claim to be immutable, or are designed to be immutable)?
-
What is 'Express Replacement Service'?
What is 'Express Replacement Service' and is it worth it?