AppleScript GUI scripting WGM

In preparation for adding over 700 users, we've written an AppleScript script that uses GUI scripting on WGM. Everything works as expected, except that data entered into the Comment field (Advanced tab) disppears after switching to a different user and then returning to the newly-added user. All other fields are fine, it's just Comments.
Has anyone else done AppleScript GUI scripting on WGM?

I can't answer directly, but there are numerous other reports of text fields not 'sticking' via UI scripting (not just in WGM).
If it's not too late, I wouldn't recommend using UI scripting for such a large task. There are too many variables that could mess it up.
If you haven't run the import yet I'd recommend taking a look at dscl, the Directory Service Command Line tool - it lets you manipulate any data in your directory via a command line interface. It should be more robust than UI scripting when dealing with mass updates like this.

Similar Messages

  • AppleScript GUI scripting problem.

    Hi All,
    I've created a script that will automatically open new document in Indesign CS2. But when i run the script i'm getting system events error as "NSReceiverEvaluationScriptError: 4". I tried following the instruction given in forums but still couldn't figure out. Below is the script i wrote. Can any one tell where and what i'm missing.
    tell application "Adobe InDesign CS2" to activate
    tell application "System Events"
    tell process "Adobe InDesign CS2"
    tell menu bar 1
    tell menu bar item "File"
    tell menu "File"
    tell menu item "New"
    tell menu "New"
    click menu item "Document"
    end tell
    end tell
    end tell
    end tell
    end tell
    click button "Ok" of window 1
    end tell
    end tell
    This is the submenu of menu New. This might be the problem cos the below script works for for which i'm clicking the menu not sub menu
    tell application "Adobe InDesign CS2" to activate
    tell application "System Events"
    tell application process "Adobe InDesign CS2"
    tell menu bar 1
    tell menu bar item "Help"
    tell menu "Help"
    click menu item "Welcome Screen..."
    end tell
    end tell
    end tell
    end tell
    end tell
    My Mac version 10.4.10
    Any help would be appreciated.
    -Jacintha

    Using GUI scripting is the road to madness; it's for emergency use only.<br />Try:<br /><br />tell application "Adobe InDesign CS2"<br />make document<br />end tell<br /><br />-- <br />Shane Stanley <[email protected]>

  • Applescript GUI scripting, selecting a window element

    HI everyone,
    I have an issue where I need to programmtically generate a list of Activation Requests for the ColorEyes Display Pro application. In order to get the info I need, I have to launch the app while holding the command and shift keys, then select from a drop down list. The information does present as a field that I can select and copy, but I can't figure out how to simulate a click on that field.
    I have every piece of this together except what UI element I need to access and how to select it so I can save it in a varialbe or at least copy and paste it.
    I’m only interested in the request number item of Show Field Data. Here is the code I’ve written so far:
    tell application "System Events"
        key down command
       key down shift
       do shell script "open '/Applications/ColorEyes Display Pro/ColorEyes Display Pro.app'"
        delay 10
        key up command
       key up shift
       tell process "QuickLicenseRT"
            delay 3
            click pop up button 1 of window "License Options"
            key code 125 -- down arrow key
           key code 125 -- down arrow key
           keystroke return
           delay 1
            click UI element 33 of window "License Options" --- this doesn't seem to be right. Don't know what it would be
            --delay 1
           --keystroke return
           --delay 1
           --keystroke return
       end tell
    end tell
    and the events I get when running the code:
    tell application "System Events"
       key down command
       key down shift
       do shell script "open '/Applications/ColorEyes Display Pro/ColorEyes Display Pro.app'"
           --> error number -10004
    end tell
    tell current application
       do shell script "open '/Applications/ColorEyes Display Pro/ColorEyes Display Pro.app'"
           --> ""
    end tell
    tell application "System Events"
       key up command
       key up shift
       click pop up button 1 of window "License Options" of process "QuickLicenseRT"
           --> pop up button 1 of window "License Options" of application process "QuickLicenseRT"
       key code 125
       key code 125
       keystroke "
       click UI element 33 of window "License Options" of process "QuickLicenseRT"
           --> missing value
    end tell
    Result:
    missing value
    The script runs and opens color eyes and gets to the show field data window and selects it. I can see the request number, but cant get that data into a variable.
    This is what a short applescript I found to list the elements of a given window says about this QuickLicenseRT window:
    I also have screen shots of what the QuickLicenseRT window looks like:
    The request number is different on each Mac, and I need to know which ones are active and which aren't. These activations are distributed globally so I HAVE to be able to do this programmatically.
    Any ideas?
    TIA!
    Andrew

    I can't answer directly, but there are numerous other reports of text fields not 'sticking' via UI scripting (not just in WGM).
    If it's not too late, I wouldn't recommend using UI scripting for such a large task. There are too many variables that could mess it up.
    If you haven't run the import yet I'd recommend taking a look at dscl, the Directory Service Command Line tool - it lets you manipulate any data in your directory via a command line interface. It should be more robust than UI scripting when dealing with mass updates like this.

  • Tool Tip / GUI-script battle

    I've got a slider that invokes a handler that performs some AppleScript GUI scripting ( ... unfortunate, yes, but there's no other way.)
    The slider has a Tool Tip.
    If I click and drag outside of the slider's mouseDown region, no problem. The GUI stuff works as expected.
    If I drag inside the slider's mouseDown region, the ToolTip appears at it designated time, as if I were hovering. This causes a NSReceiverEvaluationScriptError: 4 (1) error. Certainly makes sense that I'd get an error when the Tool Tip comes to the front. But I'm confused as to why it appears. None of my non-GUI related sliders have this problem.
    Suggestions?
    Here are a few other Tool Tip questions:
    1) Can I increase or decrease the display length for all tool tips?
    2) Is it possible to keep tool tips visible indefinitely while the user hovers the mouse over the object, closing on mouseLeave?
    3) Can I toggle all Tool Tips to enabled or disabled?
    Thanks, John

    I've got a slider that invokes a handler that
    performs some AppleScript GUI scripting ( ...
    unfortunate, yes, but there's no other way.)
    The slider has a Tool Tip.
    If I click and drag outside of the slider's mouseDown
    region, no problem. The GUI stuff works as expected.
    If I drag inside the slider's mouseDown region, the
    ToolTip appears at it designated time, as if I were
    hovering. This causes a
    NSReceiverEvaluationScriptError: 4 (1) error.
    Certainly makes sense that I'd get an error when the
    Tool Tip comes to the front. But I'm confused as to
    why it appears. None of my non-GUI related sliders
    have this problem.
    Suggestions?
    Just noticed: on another computer (a powerBook) I get the NSReceiver error at any click or drag. Cleaned all targets and got the same result.
    I set a one second delay to make sure the GUI window gets time to come to the front but to no avail. There's a error at every click or drag.
    John

  • Enabling GUI scripting via AppleScript

    So I have a launch-daemon that needs to utilize GUI scripting.  I need to be able to enable it through AppleScript (or really any scriptable, automated means).  I am trying to do this:
    tell application "System Events" to if not UI elements enabled then
              set UI elements enabled to true
              return UI elements enabled
    end if
    but it doesn't seem to do anything.  The return query is just to check that it worked, but it never does.  I have tried saving the script and running it as administrator (sudo osascript myScript.scpt) but it still doesn't work.  I never get prompted for admin credentials.  This occurs when logged in as administrator or non-admin user.  Any ideas?

    tell application "System Events"
              set UI elements enabled to true
    end tell
    tell application "System Events"
              return UI elements enabled
    end tell
    The second part is just to test what the current setting it.  It always stays false.

  • Using AppleScript to re-format with GUI scripting

    Background:
    I use Pages 4.1 under Mac OSX 10.6.8.
    I use medical practice software called Genie, built on 4D. When I create a new letter based on a template in Genie, some formatting is required before the letter is sent. This is repetitive and frequent - just the sort of task for scripting. With help from many people on Apple discussions, I now have a script that converts the text in Pages from A (starting and ending with =====) to B (starting and ending with +++++). The text and the script are edited, as there are about 30 lines in the real Mental State Exam.
    The script uses Styles within Pages to change the formatting of the headings. It uses GUI scripting with find and replace to add spaces before measurement abbreviations. It use GUI scripting to italicise some sub-headings.
    I tried to use GUI scripting of the Advanced tab of the Find & Replace window, but I was unsuccessful, as I don't know how to find out the names of the various items in the Find & Replace window. (E.g. Where it says "Style:" with a dropdown menu starting with "Any", I don't know how to refer to this dropdown menu).
    Although this script works, it's slower than I would like, and it's a bit clunky because of the way I have incorporated elements of scripts more knowledgable users, and cobbled them together.
    I would appreciate any advice on how to improve the script.
    Thanks,
    Peter
    =====
    MEDICATIONS:
    Lexapro  10mg  Tablets one daily with the evening meal
    Panadol Osteo  665mg  Modified release tablets ii mane
    Seroquel  102mg  Tablets one nocte
    MENTAL STATE EXAMINATION
    Appearance and Behaviour
    General appearance: Casually dressed. 
    Patient Attitude: Cooperative
    Psychomotor Activity: Normal
    Insight and Judgement
    Insight: Good
    Aware of abnormal phenomena: Yes
    Attributes to Illness: Yes
    Willing to accept treatment: Yes
    Judgement: Consistent with personality
    =====
    +++++
    MEDICATIONS:
    Lexapro 10 mg Tablets one daily with the evening meal
    Panadol Osteo 665 mg Modified release tablets ii mane
    Seroquel 102 mg Tablets one nocte
    MENTAL STATE EXAMINATION
    Appearance and Behaviour
       General appearance: Casually dressed.
       Patient Attitude: Cooperative
       Psychomotor Activity: Normal
    Insight and Judgement
       Insight: Good
          Aware of abnormal phenomena: Yes
          Attributes to Illness: Yes
          Willing to accept treatment: Yes
       Judgement: Consistent with personality
    +++++
    Script:
    property replacements : {¬
       {"0mg ", "0 mg "}, ¬
       {"1mg ", "1 mg "}, ¬
       {"2mg ", "2 mg "}, ¬
       {"3mg ", "3 mg "}, ¬
       {"4mg ", "4 mg "}, ¬
       {"5mg ", "5 mg "}, ¬
       {"6mg ", "6 mg "}, ¬
       {"7mg ", "7 mg "}, ¬
       {"8mg ", "8 mg "}, ¬
       {"9mg ", "9 mg "}, ¬
       {"  ", " "}, ¬
       {"  ", " "} ¬
    tell application "Pages" to activate
    tell application "System Events" to tell process "Pages"
       keystroke "f" using command down
       repeat until exists window "Find & Replace"
       end repeat
       tell window "Find & Replace"
          repeat with thisReplacement in replacements
             set {X, Y} to thisReplacement
             set value of text area 1 of scroll area "Find:" of tab group 1 to X
             set value of text area 1 of scroll area "Replace:" of tab group 1 to Y
             click button "Replace All" of tab group 1
          end repeat
          click button 1
       end tell
    end tell
    property styleHeadings : {¬
       {"MENTAL STATE", "MSE Heading 1"}, ¬
       {"Appearance and B", "MSE Heading 2"}, ¬
       {"General appe", "Indent-single"}, ¬
       {"Patient attit", "Indent-single"}, ¬
       {"Psychomotor ", "Indent-single"}, ¬
       {"Rapport:", "Indent-single"}, ¬
       {"Insight and j", "MSE Heading 2"}, ¬
       {"Insight:", "Indent-single"}, ¬
       {"Judgement:", "Indent-single"}, ¬
       {"Aware of abn", "Indent-double"}, ¬
       {"Attributes to i", "Indent-double"}, ¬
       {"Willing to acc", "Indent-double"} ¬
    on stylise()
       tell application "Pages"
          tell document 1
             set paragraphTexts to paragraphs of body text
             repeat with p from (count paragraphTexts) to 1 by -1
                set paraText to item p of paragraphTexts
                repeat with k from 1 to (count styleHeadings)
                   set {marker, styleName} to item k of styleHeadings
                   if (paraText begins with marker) then
                      set paragraph style of paragraph p of body text to paragraph style styleName
                      exit repeat
                   end if
                end repeat
             end repeat
          end tell
       end tell
    end stylise
    stylise()
    set italicHeadings to {"General appearance:", "Patient Attitude:", "Psychomotor activity:", "Rapport:", ¬
       "Insight:", "Aware of abnormal phenomena:", "Attributes to Illness:", ¬
       "Willing to accept treatment:", "Judgement:"}
    tell application "Pages" to activate
    tell application "System Events" to tell process "Pages"
       repeat with findPhrase in italicHeadings
          keystroke "f" using command down
          repeat until exists window "Find & Replace"
          end repeat
          tell window "Find & Replace"
             set value of text area 1 of scroll area "Find:" of tab group 1 to findPhrase
             click button "Next" of tab group 1
             keystroke "w" using command down
             keystroke "i" using command down
          end tell
       end repeat
    end tell

    Hi,
    This can be done without "Gui Scripting" when the document does not contain many lines, otherwise it's much slower.
    Here is an example:
    tell application "Pages" to tell document 1
        set tWords to (words whose it ends with "mg")
        repeat with i from (count tWords) to 1 by -1
            set thisWord to item i of tWords
            if (length of thisWord) > 2 and text -3 of thisWord is in "1234567890" then
                set (word i whose it ends with "mg") to (text 1 thru -3 of thisWord) & " mg"
            end if
        end repeat
        set L to character offset of characters whose it = " " or it = " "
        set n to -2
        repeat with i from (count L) to 1 by -1
            set n2 to item i of L
            if n - 1 = n2 then delete character n2
            set n to n2
        end repeat
        set styleHeadings to {{"MENTAL STATE", "Sous-section 2"}, ¬
            {"Appearance and B", "MSE Heading 2"}, ¬
            {"General appe", "Indent-single"}, ¬
            {"Patient attit", "Indent-single"}, ¬
            {"Psychomotor ", "Indent-single"}, ¬
            {"Rapport:", "Indent-single"}, ¬
            {"Insight and j", "MSE Heading 2"}, ¬
            {"Insight:", "Indent-single"}, ¬
            {"Judgement:", "Indent-single"}, ¬
            {"Aware of abn", "Indent-double"}, ¬
            {"Attributes to i", "Indent-double"}, ¬
            {"Willing to acc", "Indent-double"}}
        repeat with k from 1 to (count styleHeadings)
            set {marker, styleName} to item k of styleHeadings
            set paragraph style of (paragraphs whose it begins with marker) to paragraph style styleName
        end repeat
        set italicHeadings to {"General appearance:", "Patient Attitude:", "Psychomotor Activity:", "Rapport:", ¬
            "Insight:", "Aware of abnormal phenomena:", "Attributes to Illness:", ¬
            "Willing to accept treatment:", "Judgement:"}
        repeat with findPhrase in italicHeadings
            set len to length of findPhrase
            tell (first paragraph whose it begins with findPhrase) to if exists then
                set italic of characters 1 thru len to true
                -- you can add other line to change properties of this paragraph or properties of specific word in this paragraph
            end if
        end repeat
        tell (paragraphs whose it contains "MENTAL STATE EXAMINATION" or it contains "Insight and Judgement") to if exists then
            set underline type to single underline
            -- you can add other line to change properties of these paragraphs or properties of specific word in these paragraphs
        end if
    end tell

  • Easy AppleScript/TextEdit scripting problem...

    Hi All:
    I'm new to AppleScript, and we recently upgraded to Lion. We had a simple AppleScript we were using to strip quotation marks out of a .csv file using TextEdit, but the keystroke commands in Lion are different.
    Here is the original script, which worked under Leopard/SnowLeopard:
    tell application "TextEdit" to activate
    tell application "System Events" to tell process "TextEdit"
              keystroke "f" using command down
              keystroke "\"" & tab
              keystroke delete key
              click button "Replace All" of window "Find"
              keystroke "s" using command down
    end tell
    This would tell TextEdit to take the current file, replace all the quotation marks with nothing, then save the file again. Now, TextEdit uses a floating menu bar to do Find/Replace. I can get the script to go as far as selecting all the quotation marks:
    tell application "TextEdit" to activate
    tell application "System Events" to tell process "TextEdit"
      keystroke "f" using command down & option down
      keystroke tab using shift down
      keystroke "\""
    end tell
    ...but I can't figure out how to tell it to click the "All" then "Done" buttons to strip the quotes. Any assistance would be appreciated. Thanks!

    If all you're doing is stripping quotation marks out of a CSV file, then you are making your life difficult by GUI scripting. TextEdit is scriptable, so something like this should work without breaking across OS revisions:
    tell application "TextEdit"
              set documentText to text of document 1
              set {oldTID, my text item delimiters} to {my text item delimiters, "\""}
              set textBits to text items of documentText
              set my text item delimiters to ""
              set text of document 1 to textBits as text
              set my text item delimiters to oldTID
    end tell
    if you're wanting to do this to multiple documents rather than just one already-open document, you shouldn't even use TE; just open the document in applescript, modify it, and save it back to disk.

  • Having trouble GUI scripting

    Hi there,
    I'm trying to script a small app called Deeper (that doesn't work natively with ascript).
    I tried GUI scripting with apple script editor but I'm not how it works so I put that aside and went trying with UI Element Inspector.
    So I'm trying to select something from a scroll menu, and then click a start button.
    What it does is it activates the Flurry screensaver as a background, but some bugs turn it off, so I wanted that by running this script, it would use Deeper to turn it back on without having to do it manually.
    I tried as best as I can to stick with the example given in the UIElementInspector page, but I am really a starter in scripting.
    First, I did:
    tell application "Deeper"
    activate
    end tell
    tell application "System Events"
    tell process "Deeper"
    tell menu "PopUpButton"
    But then I found out there was no way to distinguish that pop up menu from others (with UIElementInspector) other than by the size and location of the menu in the app.
    So first I'd need help finding out how to tell the script wich menu to go check in, and then probably stick with the example page.
    As you can see, I'll really trying to learn applescript from the start, because it looks so useful.
    Thanks to anyone for helping!

    You shouldn't need this:
    "open application file "Deeper.app" of folder "Applications" of startup disk"
    as this activates your app for you:
    "activate application "Deeper""
    activate application "Deeper"
    delay 1
    tell application "System Events"
    tell process "Deeper"
    click button "General" of tool bar 1 of window "Deeper"
    delay 0.5
    tell pop up button 4 of window "Deeper"
    click
    click menu item "Flurry" of menu 1
    end tell
    delay 0.5
    click button "Start" of window "Deeper"
    delay 0.5
    tell application "Finder"
    quit application "Deeper"
    end tell
    end tell
    end tell
    Budgie

  • GUI scripting question -am I sunk?

    Hi all,
    I am working on an Applescript to bring up two different non-Applescript-able applications (ie. ones w/o a dictionary) and am getting the error:
    NSReceiverEvaluationScriptError : 4 from Applescript.
    I have "Enable access for assitive devices" checked in SystemPreferences and am GUI scripting.
    Here's the snippet of code that gives the error:
    tell application "System Events"
    if UI elements enabled then
    activate application "TRx Recorder"
    tell button " Record " of tool bar 1 of window "TRx Recorder"
    click
    end tell
    end if
    end tell
    I generated the code "tell button ..." from the Prefab's UI Browser.
    I've tried clicking via the name of the button, and via the position of the button. Same error.
    Does this mean I'm sunk and can't get the app to respond to my Applescript?
    When I select the Action of button " Record " from within the UI Browser, it works fine.
    What am I doing wrong?
    Thanks!
    Ed

    Hi Camelot,
    Yes indeed I needed a "tell process ..." block, as well as, 2 extra spaces in the label for the Record button.
    I got the following to work:
    tell application "System Events"
    if UI elements enabled then
    activate application "TRx Recorder"
    tell process "TRx Recorder"
    click button " Record " of tool bar 1 of window "TRx Recorder"
    end tell
    end if
    end tell
    I dug around using UI Browser and discovered that I needed 2 blanks in front of and 2 blanks behind of the label "Record" to correctly access the button. I originally had 1 space in front of Record and 1 space after Record within the quotes. With only 1 space I get the Applescript error I mentioned. With 2 I don't get the error.
    Many thanks for the tip, it made me look closer at the labels of the buttons in UI Browser.
    Ed

  • Error in executing eCATT GUI Script

    Hi
    I am getting following error (in bold) while executing eCATT GUI Script. This happens only for GUI Scripts and not for TCD scripts. Please help me to solve this issue.
    <b>0000000195  Test Scrpt ZGUI_SCRIPT4 Version 1 - SECATT [Without Interruption]
    R01 800 SANDEEPK1 E 620 sapnw10 Windows NT MSSQL 26.05.2006 12:42:29
    ZGUI_SCRIPT4 [0,109 sec] Version 1 ZGUI_SCRIPT4
    Tgt System TEST_ECAT->ECATT_SAPNW10_800_E->T90CLNT090 (R01 800 ALEREMOTE E 620 sapnw10
    Windows NT MSSQL)
    Error in eCATT function SAPGUI
    Destination ECATT_SAPNW10_800_E RFC error
    service 'sapgw-1' unknown / CPI-C error CM_PRODUCT_SPECIFIC_ERROR.</b>
    Thanks in Advance.
    Regards,
    Sandeep K.

    Hi Sandeep,
        My self , Sreedhar D, working eCATT using SAPGUI recording.
        i think ur problem is resolved. Can u help for the below issue.
          Scenario:       
           And i working on testing server which does not have any trasaction, i have to record the transaction using RFC connection to different machine.
           I did all the that process and able to connect  remote machine.
          i started doing the recoding in SAPGUI after creation of sys. Data container by specifying RFC connection.
            I recorded the script, but when i try to execute the same this attached error r coming.
           But i recorded the same using TCD(Recorded) using remote connection and able to sucessfully execute.
           One more thing also, we used write the script for reading the test data from Excel and pass as parameters using TCD(Recording).
    Below is the error
         Target sys ECATT_SAPTD120_400_E_0002
         Destination ECATT_SAPTD120_400_E_0002 RFC Error
          Waiting for ur response. Thanks in Adavance.
    Sreedhar d

  • SAP GUI Scripting Wizzard Windows7 does not work

    Dear Experts,
    I am quite a novice when it comes to SAP GUI scripting (let alone any other development), therefore my question might be rather stupid. After my PC was migrated from XP to Windows 7 it is no longer possible to use the SAP GUI scripting wizzard. When you select it from the menue, simply nothing happens.
    Does anyone have an idea what I need to do to have this useful tool back on my PC?
    We are running SAP GUi 7.1
    Thanks for your help
    Theo

      Here is SAP GUI wizard replacement tool...its in auto IT - enjoy
    http://www.autoitscript.com/forum/topic/149540-sapwizardudf/
    I had the tech guys here install ,  the latest GUI patch level 15,
    and the script development tools not working issue has been fixed
    They (SAP?) removed the 'script development tools' menu option!?
    I have not installed the MS hotfix, but
    My question is,  it true the 'Script development tools' is gone?
    Other methods
    a) This (free) non SAP solution seems to work however...any other ideas?
    Scripting Tracker Lite
    http://scn.sap.com/docs/DOC-32728
    b) The Activate GuiXT tool in SAP GUI also does give you some clues in the element window
    and could be an alternative way , to get control names.
    eg a radio button is R[P_CONTROL_ID] when it should be radP_CONTROL_ID
    c) The SAP script recording and playback ,  to a vbs script will give you the control names also, if you edit the script.
    You must of course have GUI scripting on in rz11
    I can't read this note https://service.sap.com/sap/support/notes/1633639 - need a password!

  • Variables in a SAP GUI Script

    Hi All,                                                                                -
    Can somebody tell me, how can I use a variable instead of hardcoded value into a SAP GUI script?
    Because the recorded file is a vbs-file, I have tried to declare a variable as usual:
    Dim Count As Integer
    Count  = 58
    But when I try to execute the updated script, even without assigning the Count variable to any places from the script, an error occurs u2013 u2018expected end of statementu2019 (the same error also occurs if I use Count instead of 58). Actually I want to replace all occurrences of number 58 in the script below. Can anybody help me?
    Thanks,
    Svetlana
    If Not IsObject(application) Then
       Set SapGuiAuto  = GetObject("SAPGUI")
       Set application = SapGuiAuto.GetScriptingEngine
    End If
    If Not IsObject(connection) Then
       Set connection = application.Children(0)
    End If
    If Not IsObject(session) Then
       Set session    = connection.Children(0)
    End If
    If IsObject(WScript) Then
       WScript.ConnectObject session,     "on"
       WScript.ConnectObject application, "on"
    End If
    session.findById("wnd[0]").maximize
    session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell").contextMenu
    session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell").currentCellColumn = "DATA"
    session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell").contextMenu
    session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell").modifyCell 0,"DATA","M_FORMOFADDR"
    session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").insertRows "58"
    session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").modifyCell 58,"PNAME","M_FORMOFADDR"
    session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").modifyCell 58,"PTYP","I"
    session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").setCurrentCell 58,"PTYP"
    session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").firstVisibleRow = 53
    session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").pressEnter
    Edited by: Svetlana Balinova on Jul 21, 2009 3:12 PM
    Edited by: Svetlana Balinova on Jul 21, 2009 3:13 PM

    Hi Svetlana,
    if I have understood correctly, could it be that the following link you could use a bit:
    Referencing a variable in 'session findbyId' command (SAP GUI Scripting)
    Regards,
    ScriptMan

  • Calling GUI Scripting from ABAP program

    Is it possible to call GUI Scripting from ABAP and thus to use GUI Scripting as an alternative to CALL TRANSACTION?
    Is the class CL_JAVA_SCRIPT suitable to access GUI Scripting engine? Accessing ABAP data object would work as well in this case as i think. What SAP Logon and WAS releases are required? Is the 6.20 release sufficient for this case?
    I would appreciate if somebody could post an example.

    Hi,
    CL_JAVA_SCRIPT has nothing to do with SAPGUI Scripting.
    Calling SAPGUI Scripting API from ABAP could be possible for programmes experienced with OLE automation calls from ABAP coding.
    The hardest thing will be, to access the scripting engine handle as an entry point. Once you have a handle in your abap session, any api function can be invoked.
    Best regards
    Jens
    BTW: SAP testtool eCATT does call SAPGUI-Scripting from ABAP.

  • SAP GUI Scripting: Script Is Running.....Help!

    Hello all,
    I'm new to the forums and have an SAP question problem. I'm an end user of SAP and have been using it since 2002. A couple of weeks ago when I logged into SAP I noticed a red/white icon in the lower right corner of my screen. When I hover over it it says "SAP GUI Scripting: Script Is Running". The problem is, I have never created a script. When I start working in SAP I have noticed a lot of the screens have a different format now and I get a lot of ABAP errors.
    After doing some research I found under "Customize Local Layout", "Options" I can uncheck the box "Enable Scripting". I click "Apply" and "OK". Now the red/white icon goes away in the lower right corner and all my screens go back to normal with no ABAP errors.
    The problem now is that every minute or two I get a pop up window that says "Scripting support is disabled by the user".
    Has anyone else had this problem?
    1. I've never created a script. Why is one running now?
    2. Is there a way to stop the pop up message "Scripting support is disabled...." if I uncheck "Enable Scripting"?
    Thanks for any feedback

    Here's the properties of the connection....
    http://www.lstwo.com/images/97735141499811194923.jpg
    http://www.lstwo.com/images/27092678568585605702.jpg
    http://www.lstwo.com/images/02572789823840845106.jpg
    Here's the properties of the desktop icon....
    http://www.lstwo.com/images/36703668322706084468.jpg
    http://www.lstwo.com/images/40729387005252851113.jpg
    http://www.lstwo.com/images/48149337890555671928.jpg
    I agree, I'm stumped. I even tried looking through the SAP entries in my registry to see if I could find anything. It's a bit confusing but I didn't see anything out of place.

  • Simple GUI script with a list

    Good day
    As my first Powershell project i'd like to write a script which will present to the user a GUI with a list of servers. The user then chooses a server and on click of the OK button connects to it with MSTSC. The window can look like this:
    Probably a script accomplishing a similar task already exists. Can you point it out? Also i'd like to learn more about developing specifically GUI scripts. Can you direct me to a source of information on that subject? A book maybe?
    Regards
    Kamil

    I know you want to learn how to build GUI, but what you asked for can actually be accomplished with just a few lines of code. The downside is you will not have any control over the layout.
    You can load the list of servers from CSV:
    $CSV = @"
    "Name","OperatingSystem","Description"
    "SERVER01","Windows Server 2008 R2","File Server"
    "SERVER02","Windows Server 2012 R2","Domain Controller"
    "SERVER03","Windows Server 2012","Print Server"
    $Servers = ConvertFrom-Csv $CSV
    $Servers | Out-GridView -Title "Select a server" -PassThru | Select Name |
    %{Start-Process "$env:windir\system32\mstsc.exe" -ArgumentList "/v:$($_.Name)"}
    Or you can get them directly from Active Directory:
    Get-ADComputer -Filter 'Name -like "SERVER*"' -Properties OperatingSystem, Description |
    Select Name, OperatingSystem, Description |
    Out-GridView -Title "Select a server" -PassThru | Select Name |
    %{Start-Process "$env:windir\system32\mstsc.exe" -ArgumentList "/v:$($_.Name)"}

Maybe you are looking for

  • Span columns problem with Table of Contents order

    Hello, I'm having a strange issue with headings that span columns and Table of contents order. My document has a heading paragraph in a coloured box, which is then inserted in-line into a 2-column text box. The paragraph style for the box (set to in-

  • How do you debug the individual Flex components?

    How do you debug the individual Flex components?

  • Basic sql query

    Hi all, I am trying to get a report using sql, but I do not get the data out. Select data1, sum(data2) from table1 where date1 between '01-JAN-2007' and '01-JAN-2009' group by data1 I know I have data because the query runs in sql+ I do not get any e

  • Is it safe to install adobe flash player on my new MacBook Pro?

    I just got a MacBook Pro for college, and I'm wondering if it is safe to download adobe flash player on it?

  • Erase page-breaks at beginning of string

    hi, we have lots of strings in a column, which have 1-n page-breaks right at the beginning. i couldnt come up with a solution yet to erase ONLY the page-breaks at the BEGINNING of the string. obviously REPLACE(column, CHR(10), '') with erase all of t