Get current windows window name?

Is it possible to get the current open task used in windows with java?
I'd like to take screenshots of the users screen, but only of a certain task / if the task/window is open.
ty

Hi, Gunther,
The only way to do this is to read the ABAP Call Stack in an internal table.
Code:
TYPES: BEGIN OF t_s_abap_callstack,
         mainprogram LIKE sy-repid,
         include LIKE sy-repid,
         line TYPE i,
         eventtype LIKE abdbg-leventtype,
         event LIKE abdbg-levent,
         flag_system,
       END OF t_s_abap_callstack.
variable for ABAP callstack
DATA: g_callstack TYPE STANDARD TABLE OF t_s_abap_callstack,
      g_callstack_wa TYPE t_s_abap_callstack.
call 'ABAP_CALLSTACK' id 'DEPTH' field 99
                        id 'CALLSTACK' field g_callstack.
g_callstack now contains the program and routine names called, in sequence. 
Pls be careful in using this C Call; in particular, usage in a Productive environment should only be envisaged with the utmost caution.
Philippe

Similar Messages

  • Get current SQL instance name with PowerShell

    Hi all,
    I'm preparing SQL agent job that will backup all jobs on SQL server. Main step is PoswerShell script. I want that job to be universal for all servers. The first parameter that I need to send to script is instancename.
    I want to use variable as InctanceName parameter. So, when I run this job on particular server this variable must get current SQL instance name.
    I can use $env:computername for default instances but I cannot use it with named instances or with clustered instances. Some solutions like using 'HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL' keys won't work because of number of
    instanses can be running on one machine.
    How to get only current SQL instance name?

    Hi, 
    Thank you for your answers.
    I found this solution:
    $serverInstance = "$(ESCAPE_DQUOTE(SRVR))"
    Working perfect.

  • Jquery/JavaScript to get current browser's name and its version

    Hi,
    I using sharepoint 2010, 
    Is it possible using Jquery/JavaScript to get current browser's name and its version.
    when my sharepoint site home page opens i need to display a popup msg of current browser name and its version.
    can anyone help me on this.
    With Regards,
    RK

    Please use the below code snippet:
    And here is the source code that performed the browser detection:
    var nVer = navigator.appVersion;
    var nAgt = navigator.userAgent;
    var browserName = navigator.appName;
    var fullVersion = ''+parseFloat(navigator.appVersion);
    var majorVersion = parseInt(navigator.appVersion,10);
    var nameOffset,verOffset,ix;
    // In Opera 15+, the true version is after "OPR/"
    if ((verOffset=nAgt.indexOf("OPR/"))!=-1) {
    browserName = "Opera";
    fullVersion = nAgt.substring(verOffset+4);
    // In older Opera, the true version is after "Opera" or after "Version"
    else if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
    browserName = "Opera";
    fullVersion = nAgt.substring(verOffset+6);
    if ((verOffset=nAgt.indexOf("Version"))!=-1)
    fullVersion = nAgt.substring(verOffset+8);
    // In MSIE, the true version is after "MSIE" in userAgent
    else if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
    browserName = "Microsoft Internet Explorer";
    fullVersion = nAgt.substring(verOffset+5);
    // In Chrome, the true version is after "Chrome"
    else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) {
    browserName = "Chrome";
    fullVersion = nAgt.substring(verOffset+7);
    // In Safari, the true version is after "Safari" or after "Version"
    else if ((verOffset=nAgt.indexOf("Safari"))!=-1) {
    browserName = "Safari";
    fullVersion = nAgt.substring(verOffset+7);
    if ((verOffset=nAgt.indexOf("Version"))!=-1)
    fullVersion = nAgt.substring(verOffset+8);
    // In Firefox, the true version is after "Firefox"
    else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
    browserName = "Firefox";
    fullVersion = nAgt.substring(verOffset+8);
    // In most other browsers, "name/version" is at the end of userAgent
    else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) <
    (verOffset=nAgt.lastIndexOf('/')) )
    browserName = nAgt.substring(nameOffset,verOffset);
    fullVersion = nAgt.substring(verOffset+1);
    if (browserName.toLowerCase()==browserName.toUpperCase()) {
    browserName = navigator.appName;
    // trim the fullVersion string at semicolon/space if present
    if ((ix=fullVersion.indexOf(";"))!=-1)
    fullVersion=fullVersion.substring(0,ix);
    if ((ix=fullVersion.indexOf(" "))!=-1)
    fullVersion=fullVersion.substring(0,ix);
    majorVersion = parseInt(''+fullVersion,10);
    if (isNaN(majorVersion)) {
    fullVersion = ''+parseFloat(navigator.appVersion);
    majorVersion = parseInt(navigator.appVersion,10);
    document.write(''
    +'Browser name = '+browserName+'<br>'
    +'Full version = '+fullVersion+'<br>'
    +'Major version = '+majorVersion+'<br>'
    +'navigator.appName = '+navigator.appName+'<br>'
    +'navigator.userAgent = '+navigator.userAgent+'<br>'
    VARIABLES
    DESCRIPTION
    navigator.appCodeName 
    The code name of the browser 
    (e.g. Mozilla) 
    navigator.appName
    The name of the browser 
    (e.g. Netscape or Microsoft Internet Explorer) 
    navigator.appVersion
    The browser version (e.g. 3.0 or 4.0) 
    navigator.userAgent
    The header information for the browser. 
    (e.g. Mozilla/4.0) 
    navigator.platform
    The users operating system
    (e.g. WIN32)
    http://www.w3schools.com/js/js_window_navigator.asp
    Click on Propose as Answer if the solutions works for you.

  • To get current data block name

    Hi;
    I have 2 data blocks on my form and I want to get current data block name on my form. How can I do this???
    Thank you

    Like Rosario said, use the :SYSTEM.CURSOR_BLOCK.
    you can also use :SYSTEM.TRIGGER_BLOCK in triggers to find which block was responsible of the firing event of a trigger.
    Do not use :SYSTEM.CURRENT_% variables in Forms 9i and above, those are only there for compatibility reasons.
    You can also check the online help for more details on :SYSTEM.% system variables.
    Tony

  • Getting current windows user name

    Hi all,
    In my BSP application, i would like to fetch the current windows logged in username. I did it using
    Active X Controls. If i ActiveX Objects, i need to change my browser settings. Which i don't want to do.
    Could you tell me anyother way doing it using JAVASCRIPT or VBSCRIPT or anything.
    Regards,
    Ravi Varma

    Halo Durairaj,
    I have seen your answer in the mentioned posting.We are getting a problem if we try the code which you have mentioned in the posting. The problem is that, we need to change security setting of the web browser. Otherwise, the solution is not working. We need to change the setting, because the solution which you have provided works based on ActiveX Controls. Is there any other way, to do the same in BSP?
    Thanks & regards,
    Ravi varma

  • Get the Window Name by jsp

    Hello
    How can I get the Name of the Window with JSP
    If I use a JavaScript I can Set a Name by
    window.open('jex5.jsp','mywindow');
    A New Window Open and
    The Window Calls on 'mywindow'
    On JavaScript i can read the Name by
    Parent.name
    But how I can get the Name with JSP
    Trank you
    Sid

    Hi Sid,
    You can get the detail of the browser from JSP using request.getHeader("User-Agent");
    But you cannot get window name using JSP. I can be done only via Javascript.
    Thanks & Regards,
    Murali.
    ===========

  • Get current FORM-Routine Name

    Hi,
    during runtime i want to know the current form-routine-name to write it in a variable and put it in an itab. The background-idea is to print out all procedures that have been executed after running the program.
    Any hints, suggestions how to get this done?
    Thanks in advance
    Gunther

    Hi, Gunther,
    The only way to do this is to read the ABAP Call Stack in an internal table.
    Code:
    TYPES: BEGIN OF t_s_abap_callstack,
             mainprogram LIKE sy-repid,
             include LIKE sy-repid,
             line TYPE i,
             eventtype LIKE abdbg-leventtype,
             event LIKE abdbg-levent,
             flag_system,
           END OF t_s_abap_callstack.
    variable for ABAP callstack
    DATA: g_callstack TYPE STANDARD TABLE OF t_s_abap_callstack,
          g_callstack_wa TYPE t_s_abap_callstack.
    call 'ABAP_CALLSTACK' id 'DEPTH' field 99
                            id 'CALLSTACK' field g_callstack.
    g_callstack now contains the program and routine names called, in sequence. 
    Pls be careful in using this C Call; in particular, usage in a Productive environment should only be envisaged with the utmost caution.
    Philippe

  • How to get Current Background Job name and Job Count programmically?

    Hi all,
            I have a requirement wherein I need to get the Current Background Job name and Job Count in the program and store it in a custom table. In other words, whenever I schedule a particular program ( This is a Std program) in background, I need to update this table with the Job Name and Job Count. This will be used by another program later to read the Job Information from table TBTCO. TBTCO has key fields Job Name and Job ID. The sheduled program will be a SAP standard program and I'll be writing the logic to get the info in an Implicit Enhancement Spot.
    Is there anyway I can do this? Any FM to get this information?
    Thanks,
    Mahesh.

    Hey Adrian,
                             Thanks a lot. This is what exactly i was looking for. Appreciate it.
    Mahesh.

  • Get current field's name

    I can't remember, is there a way for a field to get it's own name into a variable?
    for example.
    var me = getField(currentField);
    Is this doable?

    What is your intention? Do you need the field name, or are you trying to get a reference to the field itself? Under the correct context, you could just use event.target to reference the field. I'm assuming you are using this in a field event.

  • How to get Current Page(region)  Name/ID   in OA 11i

    We need to get the name or id of the current page, and based on the pagename, we retrieve configuration to launch specific web service.
    pageContext.getPageLayoutBean().getPageFunctionName() is no sufficient. Since one page function sometimes contain multiple pages (eg, each individual page maps to one train node, all the train nods maps to one page function).
    are there OA apis that I can use to get the Current Page name in controller?
    I tried pageContext.getParameter("CurrrentPage") , it works great for iExpense application. However, in iRrecuiment, the parameter "CurrentPage" was not set at all.
    Please advise.

    First let me explain what I want to achieve:
    I am writing one region (choice list displays the webservices based on the container region) along with the controller, and that region will be embed inside any OA application pages via OA personalization. On the runtime, I need to detect the current page (container region) name. Then, based on the configuration stored in my table, I need to query out the web services endpoint to call.
    Now let me answer your question:
    For example, OIEMAINPAGE.xml (OIEMainPageContainer) contains OIEReview, OIEDetail, OIEGeneral, etc, each inner region will be rendered as a page when you click the train node or link of other page. (from end user perspective)
    If I call pageContext.getPageLayoutBean().getPageFunctionName() on those inner regions, it will return OIEMAINPAGE, so I can not figure out which region are rendered (displayed) on runtime. (My region are embed inside OIEMAINPAGE pagelayout region )
    If I call pageContext.getParameter("CurrrentPage"), it will return (OIERview, OIEDetail etc), which are exactly what I want.
    However, I have to make sure my code works for other OA application, and I already noticed that some application does not set parameter CurrentPage, instead they may set parameter Page. So, I want to know if there is API provided by OA or fnd team to return current container region (page), very similar to Form Block name.
    In form, One Form function could have multiple Blocks, and they are not displayed at same time.
    In OA, one function could have multiple inner container region, and they are not displayed at same time.
    In form, One Form function could have mutlple Blocks, and they are not displayed at same time.
    In OA, one funciton could have mulple container region, and they are not displayed at same time.

  • How to get current Work Repository Name?

    Hi,
    Is there any API function to get the Name of the current Work Repository the session is running on?
    THanks

    Hi-
    As of now there is no such API in ODI but there is other API's which is used to retrieve schema/dataserver details etc.
    Hope ODI will release this API in future release. Does it help you.
    Thanks,
    Saravanan Rajavel

  • How can I get current Number file name in a cell ?

    I want to write current Number (3.5) file name in a cell.
    It was working in previous version of Number but not with latest one. Thanks.

    Yes, you can click the title bar of any document (the down arrow) to access the current file name:

  • How to get Current User Group NAME

    I am using the com.sun.security.auth.module.NTSystem to obtain information on the current user logged into the NT System. This class gives me the user name, all the group SIDs associated with the current user and also the current user's primary group SID.
    But I am not able to retrieve the group Name based on these SIDs.
    Please tell me how to find out the Group Name such as "Workgroup" etc. instead of Group SID.
    This is very urgent. So please help me.
    Thanks in advance!!!

    I'm having the same problem.
    If you found a solution could you post it here.
    Thanks.

  • Get current attribute field name

    Hello,
    how can i read the attribut field name of the current attribute - like the F2 help.
    I need the attribute name within a event handler method.
    Thanks,
    TomSd
    Edited by: Thomas Strehle on Dec 7, 2009 7:26 PM
    Edited by: Thomas Strehle on Dec 7, 2009 7:27 PM
    Edited by: Thomas Strehle on Dec 7, 2009 7:27 PM

    Hi Prasenjit,
    i've the issue to read the attribute name to use a on_sell event methode dynamic for more than one field.
    Within that method i need the attribute name, to consider what to do.
    Regards,
    TomSd

  • Xmonad actions.windowbringer; x11 process name in window name

    I have been struggling with a small problem that concerns XMonad.Actions.WindowBringer. This module uses dmenu in order to bring some window into focus. Dmenu is called with a list of current names of all windows and  users can either select one window using arrows or search by a string in window names.
    The problem is that some applications set window name in such a way that there is no mention about the name of application itself. For instance, my browser simply set the opened url in focused tab, but does not mention the name of the browser.
    What I want to achieve is simply put the process name together with the window name, so that it can simplify the window search.
    I believe there are two ways of achieving it:
    -- the first one is to change the format of the window name in Xorg. Thus, to append to window name, also the name of the process (when I say the name of the process, I mean something like the output of this command: ps -q $(xdotool getwindowfocus getwindowpid) -o command). If there is such a way that one can configure the window name title in Xorg, I would appreciate if one can indicate it. And this would be then a global solution that does not concern xmonad or haskell programming.
    -- Another approach I tried is  to find a way to get "getwindowpid" property from inside the haskell in order to modify Action.WindowBringer module for my taste. But I have not found any modules that can achieve that, i.e. getting pid of the windows or getting the process names of the windows. So, if you are aware of any, please reply.
    Thank you!

    This is exactly where I have started.
    Inside the windowbringer module they use the getname function from util.namedwindow, which simply equivalent to "xdotool getwindowname". All other functions in windowbringer module are related to what can be done with the selected window: dragged to the current workspace, jump to the workspace where the window is and focus on it, etc.
    Unfortunately, in util.namedwindow there is only one available function which simply get the window name. And I have not find the xmonad module which provide with the same functionality as xdotool program.

Maybe you are looking for

  • Visual Studio 2005, embedded Crystal Report problem

    I am very new at .NET, and this is my first post to this forum. I've created a Crystal Report within a project using Visual Studio 2005 Professional Edition, on a Windows XP machine.  I set the report as the ReportSource for a CrystalReportViewer on

  • Open Block Diagram After Deployment on a Non-LabVIEW PC

    Hello all, I have a application created in LabVIEW which will be deployed on a PC which does not have LabVIEW Development System installed in it, but only the RTE. With this application, I am also deploying the dependent VIs in a separate folder. My

  • Is iLife 5 compatible with OS 10.6.8?

    Is iLife 5 (iDVD) compatible with OS 10.6.8? I had to restore OS 10.6.8 and now I have  compatibility issues.

  • Is there any shareware tool ?

    sorry this is not a Logic question. but I hope some of you know an answer.I just wanted to make a new partition on my external firewire HD. And now I lost the data that was on there already. I haven't writen anything on it sense then and tryed some d

  • Canon 7 d mkII photos not reading in lightroom...what do i need to do?

    I am attempting to upload RAW photos shot with a Canon 7D Mk II...Lightroom indicates preview not available...any suggestions? Thanks!