Multiple keyPress + tween scripts

I am doing a flashlite project (AS2) for an embedded application and am having trouble figuring something out. I want a single instance of a menu button that I can move with keyboard cursor presses to specific locations on the Y axis. Figuring out that part was easy but I am stumped on adding multiple commands to the same button.
The initial script I am working with is:
on (keyPress "<Down>") {
import mx.transitions.Tween;
import mx.transitions.easing.*;
var xPosT:Tween = new Tween(high, "_y", regular.easeOut, -234.8, -186.8, 6, false);
Then I wanted to add something to the effect of:
on (keyPress "<Down>") {
if (y == "-186.8") {
var xPosT:Tween = new Tween(high, "_y", regular.easeOut, -186.8, -135, 6, false);
To tell it that if the button is at -186.8 go to -135.6. So obviously I am having trouble using keyPress "<Down>" twice. What would be the best way to approach this? I would like to have numerous keyPress "<Down>" and keyPress "<Up

You are right your code works fine. This is what I have:
on (keyPress "<Down>") {
import mx.transitions.Tween;
import mx.transitions.easing.*;   
     var finalY = -186.8; // some default value
     if (high._y == -234.8) {
          finalY = -186.8;
     } else if(high._y == -186.8) {
          finalY = -135;
} else if(high.y == -135) {
  finaly = -86.2;
} else if(high.y == -86.2) {
  finaly = -38;
} else if(high.y == -38) {
  finaly = 10;
} else if(high.y == 10) {
  finaly = 58.2;
} else if(high.y == 58.2) {
  finaly = 106.2;
} else if(high.y == 106.2) {
  finaly = 156.2;
} else if(high.y == 156.2) {
  finaly = 206.2;
} else if(high.y == 206.2) {
  finaly = 255.2;
     var xPosT:Tween = new Tween(high, "_y", regular.easeOut, high._y, finalY, 6, false);
I had to put the import commands inside the on handler to make it work. The only problem I am having now is with the line:
var finalY = -186.8; // some default value
In your example you had that set to 0. On the first keyPress <"Down"> the button went directly to 0 on the Y axis. I tried putting the value for the first stop on the Y axis, -186.8 and I am having trouble understanding whats happening. On the first keyPress <"Down"> the button goes to -186.8, the second goes to -135 but the third goes back up to -186.8. If I change the value to something higher like the final stop, 255.2 then on the first keyPress <"Down"> it goes directly to 255.2. I have attached the CS4 fla and swf for you to see.

Similar Messages

  • Multiple Keypresses in FL 1.1

    Hi guys,
    How do you capture simultaneous multiple keypresses in FL
    1.1? I used a key catcher (button) to catch all events like:
    quote:
    on(keyPress "1"){call("moveUp1")}
    on(keyPress "7"){call("moveDown1")}
    on(keyPress "3"){call("moveUp2")}
    on(keyPress "9"){call("moveDown2")}
    There are 2 objects on the stage and I want them to move up
    and down independently. In most cases, users get to press 2 keys at
    the same time. When this happens, the object stops moving.
    Please help! Thanks!
    Jon

    I think Flash Lite only responds to 1 key press, and ignores
    any subsequent key press, until the user releases the first
    key.

  • [AS][CS5] Multiple action folder scripts only 1 Indesign app

    Hi,
    With this post, I would like to ask a question.
    If you use multiple action folder scripts that processes multiple files using only 1 Indesign application, can problems occure when multiple files are submitted at the same time?
    How does applescript/indesign handles multiple use of the same application? Will an error be trown? Or do I have to build a check mechanisme to know if the app is "in use"?
    Has the Indesign application a property "busy" or "In use"?
    Kind regards
    John

    Hi Mark,
    Thanks for your feedback.
    If build a lock/unlock mechanisme in my folder action script to prevent simultaneous use of Indesign. In my script I write the current application state into a textfile.
    John

  • Multiple KeyPress - Ctrl + A to start an event

    Hi All,
    PL HELP....
    The application require multiple keypress to trigger an
    event, for example, press CTRL + A to go to other frame.
    I have used the following function, It does not work out.
    _root.onEnterFrame=function()
    someListener = new Object();
    someListener.onKeyDown = function () {
    if (Key.isDown(65) and Key.isDown(66)) {
    gotoAndPlay("v1");
    Key.addListener(someListener);
    Thanks in advance
    Sonum

    ok the issue here seems to be that this is within an
    onEnterFrame event - this is not needed, it's continually tell the
    timeline to play the label over and over - as a result, does
    nothing.

  • Multiple properties tween class

    im having trouble figuring out how to script a tween in AS3 with multiple properties.  I have the single property syntax down, like such,
    import fl.transitions.Tween;
    import fl.transitions.TweenEvent;
    import fl.transitions.easing.*;
    var name:Tween = new Tween( gar, "x",  Regular.easeInOut, 60, 300 , 3, true);
    but if I want multiple properties, im having trouble finding that info.
    thanks.

    i think ive got it.  I dropped the var and just did the new Tween statement like such;
    new Tween( gar, "x",  Regular.easeInOut, 60, 300 , 3, true);
    new Tween( gar, "y",  Regular.easeInOut, 60, 300 , 3, true);
    each new tween acted out at the same time.

  • Having multiple problems with script - NTFS Permissions and AD Groups

    Hi, all!  I'm having multiple problems with my first script I've written with Powershell.  The script below does the following:
    1. Prompts the user for a corporate division under which a shared folder will be created, and adjusts variables accordingly.
    2. Prompts if the folder will be a global folder or an office/location-specific folder, and makes appropriate adjustments to variables.
    3.  If a global folder, prompts for the name.  If an office/location-specific folder, prompts for each component of the street address, city and state and an optional modifier.  I've prompted for this information in this way because the information
    is used differently later on in the script.
    4.  Verifies the entered information and requests confirmation to proceed.
    5.  Creates the folder.
    6.  Creates an AD OU and/or security group(s).
    7.  Applies appropriate security groups to the new folder and removes undesired permissions.
    Import-Module ActiveDirectory
    $Division = ""
    $DivAbbr = ""
    $OU = ""
    $OUDrive = "AD:\"
    $FolderName = ""
    $OUName = ""
    $GroupName = ""
    $OURoot = "ou=DFS Restructure Testing OU,ou=Pennsylvania Camp Hill 4410 Industrial Park Rd,ou=Locations,ou=Camp Hill,dc=jacobsonco,DC=com"
    $FSRoot = "E:\"
    $FolderPath = ""
    $DefaultFolders = "Archive","Customer Service","Equipment","Inbounds","Management","Outbounds","Processes","Projects","Quality","Reports","Returns","Safety","Schedules","Time Keeping","Training"
    [bool]$Location = 0
    do {
    $userInput = Read-Host "Enter CLS Division: (W)arehousing, (S)taffing, or (P)ackaging"
    Switch ($userInput)
    W {$Division = "Warehousing"; $DivAbbr = "WHSE"; $OU = "ou=Warehousing,"; break}
    S {"Staffing is not yet implemented."; break}
    P {"Packaging is not yet implemented."; break}
    default {"Invalid choice. Please re-enter."; break}
    while ($DivAbbr -eq "")
    write-host ""
    write-host ($Division + " was selected.")
    $FolderPath = $Division + "\"
    write-host ""
    $choice = ""
    do {
    $choice = Read-Host "Will this be a (G)lobal folder or (L)ocation folder?"
    Switch ($choice)
    G {$Location = $false; break}
    L {$Location = $true; $FolderPath = $FolderPath + "Locations\"; $OU = "ou=Locations," + $OU; break}
    default {"Invalid choice. Please re-enter."; $choice = ""; break}
    while ($choice -eq "")
    write-host ""
    write-host ("Location is set to: " + $Location)
    write-host ""
    if ($Location -eq $false) {
    $FolderName = Read-Host "Please enter folder name:"
    $GroupName = $DivAbbr + " " + $FolderName
    } else {
    $input = Read-Host "Please enter two-letter state abbreviation:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter city:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter street address number only:"
    $FolderName = $FolderName + $input
    $GroupName = $DivAbbr + " " + $FolderName
    $FolderName = $FolderName + " "
    $input = Read-Host "Please enter street name:"
    $FolderName = $FolderName + $input
    $input = Read-Host "Please enter any optional information to appear in folder name:"
    if ($input -ne "") {
    $FolderName = $FolderName + " " + $input
    $OUName = $FolderName
    write-host
    write-host "Path for folder: "$FSRoot$FolderPath$FolderName
    write-host "AD Path: "$OUDrive$OU$OURoot
    write-host "New OU Name: "$OUName
    write-host -NoNewLine "New Security Group names: "$GroupName
    if ($Location -eq $true) { write-host " and "$GroupName" MGMT" }
    write-host
    $input = Read-Host "Please confirm creation of new site/folder: (Y/N) "
    if ($input -ne "Y") { Exit }
    write-host
    write-host -NoNewLine "Folder exists: "; Test-Path ($FSRoot + $FolderPath + $FolderName)
    if (Test-Path ($FSRoot + $FolderPath + $FolderName)) {
    Write-Host "Folder already exists! Skipping folder creation..."
    } else {
    write-host "Folder does not exist. Creating..."
    new-item -path ($FSRoot + $FolderPath) -name $FolderName -itemtype directory
    Set-Location ($FSRoot + $FolderPath + $FolderName)
    if ($Location -eq $true) {
    $tempOUName = "ou=" + $OUName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "OU exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "OU already exists! Skipping OU creation..."
    } else {
    write-host "OU does not exist. Creating..."
    New-ADOrganizationalUnit -Name $OUName -Path ($OU + $OURoot) -ProtectedFromAccidentalDeletion $false
    $GroupNameMGMT = $GroupName + " MGMT"
    if (!(Test-Path ($OUDrive + "CN=" + $GroupName + "," + $tempOUName + $OU + $OURoot))) { write-host "Normal user group does not exist. Creating..."; New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    if (!(Test-Path ($OUDrive + "CN=" + $GroupNameMGMT + "," + $tempOUName + $OU + $OURoot))) { write-host "Management user group does not exist. Creating..."; New-ADGroup -Name $GroupNameMGMT -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    # $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    write-host $BIUsersSID.Value
    # out-string -inputObject $BIUsers
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $objUser = New-Object System.Security.Principal.NTAccount($ADGroupName)
    $objUser.Translate([System.Security.Principal.SecurityIdentifier]).Value
    write-host $ADGroupName
    write-host $objUser.Value
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    $ADGroupName = "JACOBSON\" + $GroupNameMGMT
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    } else {
    $tempOUName = "cn=" + $GroupName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "Group exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "Security group already exists! Skipping new security group creation..."
    } else {
    write-host "Security group does not exist. Creating..."
    New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ($OU + $OURoot)
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $FolderACL.SetAccessRuleProtection($True,$True)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"Modify","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    My problems right now are in the assignment/removal of security groups on the newly-created folder, and the problems are two-fold.  Yes, I am running this script as an Administrator.
    First, I am unable to remove the BUILTIN\Users group from the folder when this is an office/location-specific folder.  I've tried to remove the group in several different ways, and none are having any effect.  Oddly, if I type in the lines directly
    into Powershell, they work as expected.  I've tried the following methods:
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    In the first case, the script goes through and has no apparent effect because afterwards, I do a get-acl and the BUILTIN\Users group is still there, although when looking through the GUI, inheritance appears to have been broken from the parent folder.
    In the second case, I get the following error message:
    Exception calling "RemoveAccessRuleAll" with "1" argument(s): "Some or all identity references could not be translated."
    At C:\Users\tesdallb\Documents\FileServerBuild.ps1:110 char:5
    +     $FolderACL.RemoveAccessRuleAll($Ar)
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : IdentityNotMappedException
    This seems strange that the local server is unable to translate the SID of a BUILTIN account.  I've also tried explicitly putting in the BUILTIN\Users SID in place of the variable in the New-Object line, but that gives me the same error.  I've
    also tried the solutions given in this thread:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/ad59dc58-1360-4652-ae09-2cd4273cbd4f/remove-acl-issue?forum=winserverpowershell and at this URL:
    http://technet.microsoft.com/en-us/library/ff730951.aspx but these solutions also failed to have any effect.
    My second problem is when I try to apply the newly-created security groups, I also will get the "Some or all identity references could not be translated."  I thought I had found a workaround to the problem by adding the -PassThru option to
    the New-ADGroup commands, because it would output the SID of the group after creation, however a few lines later, the server is unable to translate the account to apply the security groups to the folder.
    My first Powershell script has been working well up to this point and now I seem to have hit a showstopper.  Any help is appreciated.
    Thanks!

    I was hoping to stay with strictly Powershell, but unless I can find a Powershell solution, I may resort to ICACLS.
    As for the problems with my groups not being translatable right after creating them, I think I have solved this problem by using the -Server parameter on all my New-ADGroup commands and this example code seems to have gotten around the translation problem,
    again utilizing the -Server parameter on the Get-ADGroup command:
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    # Add the new normal users group to the folder with Read and Execute permissions
    $GroupSID = Get-ADGroup -Identity $GroupName -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    # Add the management users group to the folder with Modify permissions
    $GroupMGMTSID = Get-ADGroup -Identity $GroupNameMGMT -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupMGMTSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    Going this route seems to ensure that the Domain Controller I'm creating my groups on is the same one that I'm querying for the group's SID to use in the FileSystemAccessRule.  It's been working fairly consistently.
    Still having issues with the translation of the BUILTIN\Users group, though. 

  • Place multiple page PDF script no longer runs correctly

    I have place multiple PDFs into ID java script. Recently, when running the script, I'm no longer prompted to use current doc or new doc. I also don't get a prompt to place PDF starting on page x. It just opens a new 8.5 x 11 doc and places the PDF pages.
    I haven't deleted my prefs yet (haven't made a note of what they are). Nor have I deleted the script. Thought I'd check here first before nuking prefs or script. I get a lot of PP presentations as PDFs for printing so I need the ability to place into an 11 x 8.5 file.
    AFAIK, I haven't added anything new to my workstation which is running CS3 on Dual G5 with OS10.4.11. I have a tendency to troubleshoot after a 12 hour day and I've found out after the fact I did a lot of unneeded busy work by not thinking on it out more or asking around beforehand.
    Thanks in advance for any help.

    Does any other script show any dialog at all?
    If not, some rogue (or interrupted) script switched off User Interaction. You can enable it again with this one line javascript:
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;

  • Multiple pages in scripts.

    Hi ,
    Could you please tell me how is multiple pages trigerred in scripts.
    Say the second page.
    Is this done through the print program?
    Are there any specific control commands to do so?
    <<text removed by moderator>>
    Thanks in advance,
    Suchi.
    Edited by: Matt on Nov 13, 2008 2:04 PM - do not use ASAP or urgent.

    Hello all,
    Thanx a lot for ur replies.
    In the debugger mode ,I am able to see the page changing from first to next page,
    but then while executing the print program I see only a single page.
    I have used the following code:
    *& Report  Z_75354_SCRIPT_SESSION
    REPORT  z_75354_script_session.
    TABLES : z75354_emp.
    TYPES :BEGIN OF ty_empdetail,
            zempno TYPE z75354_emp-zempno,
            zmailid TYPE z75354_emp-zmailid,
            zpu TYPE z75354_emp-zpu,
            zmark1 TYPE z75354_emp-zmark1,
      zmark2 TYPE z75354_emp-zmark2,
      zmark3 TYPE z75354_emp-zmark3,
      zmark4 TYPE z75354_emp-zmark4,
      zmark5 TYPE z75354_emp-zmark5,
      zmark6 TYPE z75354_emp-zmark6,
      zmark7 TYPE z75354_emp-zmark7,
      zmark8 TYPE z75354_emp-zmark8,
      zmark9 TYPE z75354_emp-zmark9,
      zmark10 TYPE z75354_emp-zmark10,
      zgrade1 TYPE z75354_emp-zgrade1,
      zgrade2 TYPE z75354_emp-zgrade2,
      zgrade3 TYPE z75354_emp-zgrade3,
      zgrade4 TYPE z75354_emp-zgrade4,
      zgrade5 TYPE z75354_emp-zgrade5,
      zgrade6 TYPE z75354_emp-zgrade6,
      zgrade7 TYPE z75354_emp-zgrade7,
      zgrade8 TYPE z75354_emp-zgrade8,
      zgrade9 TYPE z75354_emp-zgrade9,
      zgrade10 TYPE z75354_emp-zgrade10,
      v_total TYPE i,
    END OF ty_empdetail.
    DATA : i_empdetail TYPE STANDARD TABLE OF ty_empdetail WITH HEADER LINE,
          wa_empdetail TYPE ty_empdetail,
          wa_empdetail_temp  TYPE ty_empdetail,
          l_sum1 TYPE i.
         v_total TYPE char250.
    SELECT-OPTIONS : i_empno FOR z75354_emp-zempno .
    START-OF-SELECTION.
      SELECT zempno
            zmailid
            zpu
            zmark1
            zmark2
            zmark3
            zmark4
            zmark5
            zmark6
            zmark7
            zmark8
            zmark9
            zmark10
            zgrade1
            zgrade2
            zgrade3
            zgrade4
            zgrade4
            zgrade5
            zgrade6
            zgrade7
            zgrade8
            zgrade9
            zgrade10
            FROM z75354_emp INTO CORRESPONDING FIELDS OF TABLE i_empdetail
      WHERE zempno IN i_empno.
      SORT i_empdetail BY zempno zmark10.
      LOOP AT i_empdetail INTO wa_empdetail.
        wa_empdetail_temp = wa_empdetail.
        l_sum1 = wa_empdetail_temp-zmark1
        + wa_empdetail_temp-zmark2 + wa_empdetail_temp-zmark3 +
    wa_empdetail_temp-zmark4  + wa_empdetail_temp-zmark5 +
    wa_empdetail_temp-zmark6 +
    wa_empdetail_temp-zmark7
        + wa_empdetail_temp-zmark8 + wa_empdetail_temp-zmark9 +
    wa_empdetail_temp-zmark10.
        AT END OF zempno.
          MOVE l_sum1 TO wa_empdetail_temp-v_total.
          MODIFY i_empdetail FROM wa_empdetail_temp TRANSPORTING
           v_total.
          CLEAR :
         l_sum1,
               wa_empdetail_temp,
               wa_empdetail.
        ENDAT.
        ENDLOOP.
    END-OF-SELECTION.
      CALL FUNCTION 'OPEN_FORM'
       EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
         form                              = 'Z_TEST_75354'
         language                          = sy-langu
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
      SPONUMIV                          =
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
    EXCEPTIONS
      CANCELED                          = 1
      DEVICE                            = 2
      FORM                              = 3
      OPTIONS                           = 4
      UNCLOSED                          = 5
      MAIL_OPTIONS                      = 6
      ARCHIVE_ERROR                     = 7
      INVALID_FAX_NUMBER                = 8
      MORE_PARAMS_NEEDED_IN_BATCH       = 9
      SPOOL_ERROR                       = 10
      CODEPAGE                          = 11
      OTHERS                            = 12
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT i_empdetail.  "
        CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element                        = 'MAIN'
        FUNCTION                       = 'SET'
        TYPE                           = 'BODY'
          window                         = 'MAIN'
      IMPORTING
        PENDING_LINES                  =
      EXCEPTIONS
        ELEMENT                        = 1
        FUNCTION                       = 2
        TYPE                           = 3
        UNOPENED                       = 4
        UNSTARTED                      = 5
        WINDOW                         = 6
        BAD_PAGEFORMAT_FOR_PRINT       = 7
        SPOOL_ERROR                    = 8
        CODEPAGE                       = 9
        OTHERS                         = 10
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    COMMAND = 'NEW-PAGE'
    EXCEPTIONS
    UNOPENED = 1
    UNSTARTED = 2
    OTHERS = 3
    IF SY-SUBRC NE 0.
    *MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      ENDLOOP.
      CALL FUNCTION 'CLOSE_FORM'
      IMPORTING
        RESULT                         =
        RDI_RESULT                     =
      TABLES
        OTFDATA                        =
      EXCEPTIONS
        UNOPENED                       = 1
        BAD_PAGEFORMAT_FOR_PRINT       = 2
        SEND_ERROR                     = 3
        SPOOL_ERROR                    = 4
        CODEPAGE                       = 5
        OTHERS                         = 6
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Please help.

  • Listening for multiple keypresses simultaneously

    I'm trying to move a rectangle around with arrow keys.
    The current code of keyPressed method is
         public void keyPressed(KeyEvent e){
    /*           switch(e.getKeyCode()){
                   case 37: x=(Math.max(0,x-3));break;
                   case 38: y=Math.max(0,y-3); break;
                   case 39: x=Math.min(200,x+3);break;
                   case 40: y=Math.min(200,y+3);break;
              int a = e.getKeyCode();
              if(a == 37){x=Math.max(0,x-3);}
              if(a == 38){y=Math.max(0,y-3);}
              if(a == 39){x=Math.min(200,x+3);}
              if(a == 40){y=Math.min(200,y+3);}
              repaint();
         }The problem is that when pressing multiple keys at the same time only one registers.
    So how do I register multiple key presses ad change x and y accordingly?
    thank you

    It seems to me that the problems mentioned in that link with the "hold" could be solved with using a state flag set on keyPressed and then reset on keyReleased. When you release even one you should get the keyReleased event and until then, you should be in a hold state.

  • How to deal with multiple language SQL script?

    Hi All,
    We now want to create a SQL script that contains multiple languages(English, Chinese, Japanese), this script need to be run at there different database installed on different OS, for example, Oracle9i on Windows 2000 English Edition/Chinese Edition/Japanese Edition.
    If I save the file as ANSI format, this file will only be recognized at local OS(e.g. the Chinese and Japanese character will not be normally displayed on other OS, if I run the script, the CH/JP characters will not be stored normally in DB).
    If I save the file as Unicode format, this file can be recognized by all three OS, but Oracle SQL Plus will not recognize it, thus we can't run the script.
    Who can tell me how to deal with this issue? Is it possible to save only one script that can run on different language OS?
    Thanks,
    Spark

    Hi,
    The ISQLplus supports multiple languages, but there will be following problems for my case:
    1.ISQLplus don't support Unicode format script too, so I must save the file as ANSI format.
    2.To display the characters normally depends on the database server's platform. I create a script contain three languages with ANSI format in Chinese OS, but if I want to load this script to database server installed on English OS via ISQLplus, the Chinese characters will not be displayed normally too.
    PS:
    So, I think this is not only related with Oracle but also the Windows OS, it is hard to create one file with ANSI format that can be displayed normally in different platforms.
    Thank you all the same,
    Spark

  • Pulling/Extracting Data from Multiple SAP Systems - Scripting, ABAP?

    Hello All,
    I am working as an analyst for a large company that has multiple SAP installations across the world.  What I am trying to do is create some global reporting metrics based on data from all of those systems on an ad-hoc basis without having the other units send the data to a central repository.  I can receive access to all of the systems but I am unsure how to pull the data. The access to one of the systems I have currently does not allow the use of ABAP or RFC but does allow scripting.  If I have a good business case I could ask for ABAP access and RFC as well.
    I have researched and read through many posts and articles within the forums but I am yet to find a solution.  I have experience in VB, VBA, and MS Access.
    Can anyone suggest any ways to move forward? 
    Thanks!

    According to my understanding, you may use vba in your excel or a just vb by programming against rfcsdk(librfc32.dll) or the newly nwrfcsdk, or use jco or nco..., but all these method are based on rfc function call.
    You may write a simple abap side data extraction agent, just a function select some table with the data you interest, and then call this function from outside regularly, then you may save the returned table to a csv then bcp to sqlserver(c + batch), or just write to excel sheets(vba).
    The simple table read function you may check RFC_READ_TABLE, but it has some limits and are not released. The more functional agent is also can be found from other vendors, eg ms sqlserver2005 kit`s sap adapter...
    I do not have idoc or services experience, maybe in that senerio you will find a easier solution.Good luck, you may reach me at <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • Export multiple SSIS Packages- Script Required(SQL Server 2008R2 onwards)

    Team,
    I have the below requirement:
    Script to export multiple packages(Say 100) and take a backup on filesystem.
    Script to Import multiple packages (100) at a time in batch.
    This should be compatible with SQL Server 2005, 2008R2 and 2012. Please help me with this.
    Regards,
    Sharath

    Thanks Much Arthur, I am able to export the packages. However for Import should I use the below?
    Copy-isitemfiletosql
    -path
    "C:Program FilesMicrosoft SQL Server100DTSPackages*"
    -destination
    "msdbsqlpsx"
    -destinationServer
    "$env:computername"
    -connectionInfo
    @{SSISCONFIG=".SQLEXPRESS"}
    To import, I'd use DTUtil http://msdn.microsoft.com/en-us/library/ms162820.aspx it is just much easier to iterate over the package files off the file system.
    Arthur
    MyBlog
    Twitter

  • How can I Reconcile all tables on multiples mappings with scripting????

    I have OWB 9.2.0.2.8
    I have to reconcile all tables and external tables on multiple mappings.
    How can I do it with scripting language, please?
    Thanks very much in advance!!!!

    Good afternoon Claudio,
    Should be something like this:
    foreach mapName [OMBLIST MAPPINGS] {
      puts "Checking $mapName"
      foreach tabName [OMBRETRIEVE MAPPING '$mapName' GET TABLE OPERATORS] {
        puts "Reconciling $tabName"
        OMBRECONCILE TABLE '$tabName' \
          TO MAPPING '$mapName' \
          OPERATOR '$tabName' \
          USE (RECONCILE_STRATEGY 'REPLACE', MATCHING_STRATEGY 'MATCH_BY_OBJECT_ID');
    }If you want to alter reconcile and/or matching strategy, check documentation on OMBRECONCILE in the OWB Scripting Reference.
    Good luck, Patrick

  • Mass print for multiple po in script

    Dear User,
    I have problem , user will give invoice in range (Multiple choice ) and need to do mass print in script
    like one invoice in one page..
    How to trigger new page for each invoice??

    Dear,
    CALL the script FM inside the loop...

  • Multiple keypress using applescript

    Hi there.
    I would like to be apple to have a script to quickly press three keyboard key (q,w,e) when I hold them down. I'm playing a videogame slowly breaking my hand... :-(. I tried to write it in applescript, but I'm really a newbie. Could someone help me. I don't mind the script to be in function outsite the game application (it would then be a "simple" multiple key hold repetition). I would really appreciate help...
    Max

    Be careful what you ask for:
    The literal answer to your question looks like:
    tell application "System Events"
      key down "q"
      key down "w"
      key down "e"
    end tell
    However, that only addresses half the problem. This will run indefinitely, and I'm assuming at some point you want to let go of the keys, too? You don't specify that part of the equation. How do you intend to signal the keys to be released.
    Ultimately the script should include corresponding 'key up' commands to release the keys. You just need to work out the mechanics of how to do that.

Maybe you are looking for

  • How to store a pdf file in a table

    Hi In my project i have to store a pdf file in the table column. can anyone tell what wil be the column type while creating the table in oracle 7.3.4 Thanks Alok

  • Sql tuning with siebel 8.0

    hi all i am currently working with siebel 8.0 with oracle as database (10g) , can any one provide me with sql tuning docs as i have never worked with siebel and most of the tuning work is to be done on dynamic sql thanx in advance

  • Forms based on  PL/SQL table/ref_cursor

    I fail to tetrieve selected records from a stored package.procedure(which I have created as a ref_cursor to PL/SQL table and specifying a criteria in the forms where clause) Please any one suggest ?

  • What is THE best video file format to import into Premiere Pro CS6?

    What is THE best video file format to import into Premiere Pro CS6? I am tired of the guess work of "this might work if you do this." Just tell me which is, flat out, the easiest for Premiere to read?? I generally animate in Adobe Flash, and some tim

  • Archieving case histories in CRM Interaction center

    Hi there, I am not a CRM guy but we have requirement on crm to archive case histories as we have lot of case on IC. How can we archive the cases ? if we do can we access after archive? Thanks Ravi