Help with Script AS 2.0

I have this slideshow I've done and I'm wondering why it's stopping at the last image. I need it to continuely play in a loop. Any help?
holder_mc._alpha = 1;
whichPic = 1;
_root.onEnterFrame = function() {
if (holder_mc._alpha>2 && fadeOut) {
holder_mc._alpha -=2;
if (holder_mc._alpha<2) {
loadMovie("images/"+whichPic+".jpg", "holder_mc");
fadeOut = false;
fadeIn = true;
whichPic++;
if (holder_mc._alpha<100 && fadeIn && !fadeOut) {
holder_mc._alpha +=2;
} else {
if (whichPic>=12) {
} else {
fadeOut = true;

Hi,
I have the following actionscript which is working fine, but I would like to wait for some seconds each image once has reached the alpha in 100, if you see the example in the header (www.vmortiz.com/index2.htm) what it does is that the image fades in and when it gets to 100 starts fading out, and I want that when it gets the alpha in 100, keep it for let's say 5 seconds and then fade it out. Could ou please help to do so?
square._alpha = 0;
whichPic = 0;
_root.onEnterFrame = function() {
if (whichPic<4 && !fadeIn && !fadeOut) {
fadeOut = true;
whichPic++;
else if (whichPic>=4) {
whichPic = 1;
if (square._alpha>10 && fadeOut) {
square._alpha -= 2;
if (square._alpha<10) {
loadMovie("../images/banner/foto"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 5;
} else {
fadeIn = false;
Thanks
Regards

Similar Messages

  • Help with Scripting forms when additional characters added

    Hi,
    I am new to scripting in adobe professional, I thank anyone in advance for any advice or help they can give me.
    I am trying to use the calcuations within the forms that I am putting fields onto.  In the process I discovered that the program the forms are within are attaching a pipe and additional characters after the actual name that I have named them.  So, I am not able to use even the simple calculations within adobe to "sum" fields.   For example: I named the field "1_1Text" and this is what displays when you go into the calculations and pick the fields you want.  But the actual name is "1_1Text|1234567" so the calculations will not work.
    I take it then I need to use the advanced scripting but I am unsure of the format for a routine such as this.  I have a little knowledge of javascript but it has been awhile.  There must be a scan to find the pipe and then you should be able to chop off the extra characters since I will never know the characters the program adds on so then I can do calculations on these fields. Then you would have to put them into an array or something to save them?   Any help with a script or hints would surely be appreciated.
    Thanks!

    Could explain more fully how you are creating your forms and what programs you are using from the creation of the base document to which program and how you are adding fields.
    I think you are misunderstanding me.   I use Adobe Acrobat Professional 6.0.  I can get the calculations to work correctly if I use the form as it is after creating it. 
    But these forms are put into an SQL database and they get selected within a VB.net program or ASP.net program (both are used).  So these programs (VB.net or ASP.net) are adding the extra characters at the end, hence I do not know the names of the fields when the forms are being filled in.  So the calculations do not work with the "original names" that I created for the fields.
    I just figured if I created a routine that looped through and chopped off the extra characters these programs put on the end I would be able to do the calcuations and they would work.  I believe there is a substring operation within javascript.

  • Help with Script created to check log files.

    Hi,
    I have a program we use in our organization on multiple workstations that connect to a MS SQL 2005 database on a Virtual Microsoft 2008 r2 Server. The program is quite old and programmed around the days when serial connections were the most efficient means
    of connection to a device. If for any reason the network, virtual server or the SAN which the virtual server runs off have roughly 25% utilization or higher on its resources the program on the workstations timeout from the SQL database and drop the program
    from the database completely rendering it useless. The program does not have the smarts to resync itself to the SQL database and it just sits there with "connection failed" until human interaction. A simple restart of the program reconnects itself
    to the SQL database without any issues. This is fine when staff are onsite but the program runs on systems out of hours when the site is unmanned.
    The utilization of the server environment is more than sufficient if not it has double the recommended resources needed for the program. I am in regular contact with the support for the program and it is a known issue for them which i believe they do not
    have any desire to fix in the near future. 
    I wish to create a simple script that checks the log files on each workstation or server the program runs on and emails me if a specific word comes up in that log file. The word will only show when a connection failure has occurred.
    After the email is sent i wish for the script to close the program and reopen it to resync the connection.
    I will schedule the script to run ever 15 minutes.
    I have posted this up in a previous post about a month ago but i went on holidays over xmas and the post died from my lack or response.
    Below is what i have so far as my script. I have only completed the monitoring of the log file and the email portion of it. I had some help from a guy on this forum to get the script to where it is now. I know basic to intermediate scripting so sorry for my
    crudity if any.
    The program is called "wasteman2G" and the log file is located in \\servername\WasteMan2G\Config\DCS\DCS_IN\alert.txt
    I would like to get the email side of this script working first and then move on to getting the restart of the program running after.
    At the moment i am not receiving an error from the script. It runs and doesn't complete what it should.
    Could someone please help?
    Const strMailto = "[email protected]"
    Const strMailFrom = "[email protected]"
    Const strSMTPServer = "mrc1tpv002.XXXX.local"
    Const FileToRead = "\\Mrctpv005\WasteMan2G\Config\DCS\DCS_IN\alert.txt"
    arrTextToScanFor = Array("SVR2006","SVR2008")
    Set WshShell = WScript.CreateObject("WScript.Shell")
    Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
    Set oFile = objFSO.GetFile(FileToRead)
    dLastCreateDate = CDate(WshShell.RegRead("HKLM\Software\RDScripts\CheckTXTFile\CreateDate"))
    If oFile.DateCreated = dLastCreateDate Then
    intStartAtLine = CInt(WshShell.RegRead("HKLM\Software\RDScripts\CheckTXTFile\LastLineChecked"))
    Else
    intStartAtLine = 0
    End If
    i = 0
    Set objTextFile = oFile.OpenAsTextStream()
    Do While Not objTextFile.AtEndOfStream
    If i < intStartAtLine Then
    objTextFile.SkipLine
    Else
    strNextLine = objTextFile.Readline()
    For each strItem in arrTextToScanFor
    If InStr(LCase(strNextLine),LCase(strItem)) Then
    strResults = strNextLine & vbcrlf & strResults
    End If
    Next
    End If
    i = i + 1
    Loop
    objTextFile.close
    WshShell.RegWrite "HKLM\Software\RDScripts\CheckTXTFile\FileChecked", FileToRead, "REG_SZ"
    WshShell.RegWrite "HKLM\Software\RDScripts\CheckTXTFile\CreateDate", oFile.DateCreated, "REG_SZ"
    WshShell.RegWrite "HKLM\Software\RDScripts\CheckTXTFile\LastLineChecked", i, "REG_DWORD"
    WshShell.RegWrite "HKLM\Software\RDScripts\CheckTXTFile\LastScanned", Now, "REG_SZ"
    If strResults <> "" Then
    SendCDOMail strMailFrom,strMailto,"VPN Logfile scan alert",strResults,"","",strSMTPServer
    End If
    Function SendCDOMail( strFrom, strSendTo, strSubject, strMessage , strUser, strPassword, strSMTP )
    With CreateObject("CDO.Message")
    .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTP
    .Configuration.Fields.item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic
    .Configuration.Fields.item("http://schemas.microsoft.com/cdo/configuration/sendusername") = strUser
    .Configuration.Fields.item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = strPassword
    .Configuration.Fields.Update
    .From = strFrom
    .To = strSendTo
    .Subject = strSubject
    .TextBody = strMessage
    On Error Resume Next
    .Send
    If Err.Number <> 0 Then
    WScript.Echo "SendMail Failed:" & Err.Description
    End If
    End With
    End Function

    Thankyou for that link, it did help quite a bit. What i wanted was to move it to csript so i could run the wscript.echo in commandline. It all took to long and found a way to complete it via Batch. I do have a problem with my script though and you might
    be able to help.
    What i am doing is searching the log file. Finding the specific words then outputting them to an email. I havent used bmail before so thats probably my problem but then im using bmail to send me the results.
    Then im clearing the log file so the next day it is empty so that when i search it every 15 minutes its clean and only when an error occurs it will email me.
    Could you help me send the output via email using bmail or blat?
    @echo off
    echo Wasteman Logfile checker
    echo Created by: Reece Vellios
    echo Date: 08/01/2014
    findstr "SRV2006 & SRV2008" \\Mrctpv005\WasteMan2G\Config\DCS\DCS_IN\Alert.Txt > c:\log4mail.txt
    if %errorlevel%==0 C:\Documents and Settings\rvellios\Desktop\DCS Checker\bmail.exe -s mrc1tpv002.xxx.local -t [email protected] -f [email protected] -h -a "Process Dump" -m c:\log4mail.txt -c
    for %%G in (\\Mrctpv005\WasteMan2G\Config\DCS\DCS_IN\Alert.Txt) do (copy /Y nul "%%G")
    This the working script without bmail
    @echo off
    echo Wasteman Logfile checker
    echo Created by: Reece Vellios
    echo Date: 08/01/2014
    findstr "SRV2006 & SRV2008" \\Mrctpv005\WasteMan2G\Config\DCS\DCS_IN\Alert.Txt > C:\log4mail.txt
    if %errorlevel%==0 (echo Connection error)
    for %%G in (\\Mrctpv005\WasteMan2G\Config\DCS\DCS_IN\Alert.Txt) do (copy /Y nul "%%G")
    I need to make this happen:
    If error occurs at "%errorlevel%=0" then it will output the c:\log4mail.txt via smtp email using bmail.

  • Help with scripting: need to import Excel files into PS type layers

    Howdy all,
    I have a series of TV commercials provided to me as layered PS files.  I work in CS3 and export to Avid for editing.
    For customization, I need to import their Excel list of phone numbers and duplicate each one into a type layer with existing efx and placement.
    There are 30-60 #s, which appear in 2 locations, so automation is key (just finished a 45 # series, and they have more!)
    I dont know how to script this, and would appreciate any guidance. I am not asking for someone to do it for me, just help me learn what I have to do.
    Dave Koslow

    From Excel save your file out as either CSV or TDT from the drop down 'save as' options. Once you have a plain text file script will be able to read the text file using which ever delimiter best suits you and create an array of string variables that you can use within photoshop to assign to the contents of a text layer…

  • Help with script to eject an external drive and change Network Location?

    Hello,
    Could someone help me with a script that would do the following:
    -eject an external hard drive call "1TB_BU"
    -change the Network System Preferences Location from "Work" to "Home"
    I then need another that would change the Location from "Home" to "Work"
    THx!
    ~Von

    1. Use the following:
    tell application "Finder"
    eject disk "1TB_BU"
    end tell
    2. Click here for information.
    (35975)

  • Help with scripting a period in barcode between fields.

    Good Morning,
    I need help scripting a barcode that has a period as a separator in between fields.
    I have 3 fields that I need all encoded in to one barcode and need a period as separators.
    EMPID
    FormName
    EMPSSN
    I need barcode to read as follows
    EMPID.FormName.EMPSSN
    546514.Harvest123.555284569
    I am very new to this and any help would be greatly appreciated.

    When you go to the Barcode's Value tab and select "Custom calculation script", you get an empty template of how the barcode's value is calculated, which you can then fill-in with the names of the form fields. You can also edit the separator used between the values. I'm not sure the result is a valid barcode, strictly speaking, but it works. Here's the code I used:
    /* Customize: */
    function bMemberOf(strName, aStrNames)
        for (var nMembIdx in aStrNames)
            if (strName == aStrNames[nMembIdx])
                return true;
        return false;
    function strTabDelimited(oParam)
        var bNeedTab = false;
        var strNames = "";
        var strValues = "";
        for (var i = 0; i < oParam.oDoc.numFields; ++i)
            var strFieldName = oParam.oDoc.getNthFieldName(i);
            if ((null == oParam.aFields || bMemberOf(strFieldName, oParam.aFields))
                && (null == oParam.strXclField || strFieldName != oParam.strXclField)
                && (oParam.oDoc.getField(strFieldName).type != "button"))
                if (bNeedTab)
                    if (oParam.bFieldNames)
                        strNames += "."; // I changed these two lines so the separator is a period instead of the default tab
                    strValues += ".";
                if (oParam.bFieldNames)
                    strNames += strFieldName;
                strValues += oParam.oDoc.getField(strFieldName).value;
                bNeedTab = true;
        if (oParam.bFieldNames)
            return strNames + "\n" + strValues;
        else
            return strValues;
    try
        if ( app.viewerVersion >= ADBE.PMD_Need_Version )
            event.value = strTabDelimited({oDoc: this, aFields: ["EMPID", "FormName", "EMPSSN"], bFieldNames: true});
        else event.value = " ";
    catch (e)
        event.value = " ";

  • Need help with scripting Jumps

    Hi - hope someone can help me. I'm in over my head. I have a long (4 hrs.) commercial video track separated by dozens of markers (placed earlier in FCP). All my menu buttons work fine, but I want to include a button which serves as an "In-Store" demo loop featuring about 30-45 minutes of highlights (meaning favorite clips) looped endlessly for in-store sales. I can't seem to get the right combination going. New user of DVDSP but not of Mac. I managed to get it to jump to a marker, but so far, every attempt results in the program not recognizing the end of a segment. Struggling with the manual and need an expert to simplify things.

    Hi Hal -
    Just perfect. Thanks very much, Hal. I'd entirely skipped the "Stories" sections of my tutorials and manual automatically assuming (from prior experiences with Flash, SuperCard, etc.,) that scripting would be the solution. (Plus I'm rushing to complete the thing.) The best part is that it this extremely easy to do. If I need to shorten a clip I can just add a separate marker in DVDSP with no apparent down side. Stories are a sweet feature, and I'm sure I'll be using them over and over with each new production.
    So, you've just scored the "Expert" ranking in my book and I'm wondering you'd like to make it a daily double... Here's the next and hopefully last sticking point in my little project: I set up multiple angles in several clips in FCP, which don't seem to display in DVDSP. They might, I just can't tell from the sim. And yes, I'm aware that importing separate tracks and re-compositing them in DVDSP is a way to make angles happen, but I already did all this once, with great care, and I'm wondering how to get the Final Cut angles to change in the simulator in DVDSP. Any experience in these areas?
    Thanks again for the "stories" advice. Right on the money.

  • Need help with script

    There is request to dump every day’s data from one table into text file. I need to write shell script and sql script for that
    There are two tables (INSPECTION_RESULTS and NJAS) under NJSHDOWN schema. The table NJAS is child table of INSPECTION_RESULTS. The key is RES_SYS_NO. The script should get the MIN and MAX RES_SYS_NO from INSPECTION_RESULTS table for yesterday’s date. Then use these RES_SYS_NOs to fetch data from NJAS table. I then need to create comma delimited file for following columns. Also, to add the logic in shell script to check for oracle error (ORA-). If there is error, it should send email to DBAs group(first test it with your email address).
    Following columns are needed from NJAS table.
    NJA_RES_SYS_NO
    NJA_TEST_REC_NO
    NJA_LIC_ST_ID
    NJA_ETS_ID
    NJA_SW_VER
    NJA_TECH_ID
    NJA_VIN
    NJA_LIC_NO
    NJA_LIC_JUR
    NJA_LIC_SRC
    NJA_MODEL_YR
    NJA_MAKE
    NJA_MODEL
    NJA_VHCL_TYPE
    NJA_BODY_STYLE
    NJA_CERT_CLASS
    NJA_GVWR
    Okay- here is the script that I have so far but now, I am stuck. I cannot figure out how to get my script to finish output to comma delimited file and to check for oracle errors. Can anyone help me out here? Thanks!
    Initial script:
    SELECT NJA_RES_SYS_NO, NJA_RES_SYS_NO, NJA_TEST_REC_NO,
    NJA_LIC_ST_ID,
    NJA_ETS_ID,
    NJA_SW_VER,
    NJA_TECH_ID,
    NJA_VIN,
    NJA_LIC_NO,
    NJA_LIC_JUR,
    NJA_LIC_SRC,
    NJA_MODEL_YR,
    NJA_MAKE,
    NJA_MODEL,
    NJA_VHCL_TYPE,
    NJA_BODY_STYLE,
    NJA_CERT_CLASS,
    NJA_GVWR,
    NJA_ASM_ETW,
    NJA_ETW_SRC,
    NJA_NO_OF_CYL,
    NJA_ENG_SIZE,
    NJA_TRANS_TYPE,
    NJA_DUAL_EXH,
    NJA_FUEL_CD,
    NJA_VID_SYS_NO,
    NJA_VRT_REC_NO,
    NJA_ARMSTDS_REC_NO,
    NJA_RSN_F_N_TESTABLE,
    NJA_DYNO_TESTABLE,
    NJA_CURR_ODO_RDNG,
    NJA_PREV_ODO_RDNG,
    NJA_PREV_TEST_DT,
    NJA_TEST_TYPE,
    NJA_TEST_START_DT,
    NJA_TEST_END_TIME,
    NJA_EMISS_TEST_TYPE,
    NJA_TEST_SEQ_NO,
    NJA_LOW_MILE_EXEMP,
    NJA_TIRE_DRY,
    NJA_REL_HUMID,
    NJA_AMB_TEMP,
    NJA_BAR_PRESS,
    NJA_HCF,
    NJA_GAS_CAP_ADAP_AVL,
    NJA_GAS_CAP_REPL,
    NJA_OVERALL_GAS_CAP_RES
    FROM NJAS
    WHERE NJA_RES_SYS_NO IN (SELECT MIN(NJA_RES_SYS_NO) FROM INSPECTION_RESULTS WHERE NJA_RES_SYS_NO IN
    (SELECT MAX(NJA_RES_SYS_NO) FROM INSPECTION_RESULTS WHERE SYSDATE=SYSDATE-1)
    Thanks!
    Scott

    Thanks here is thus far what I have, focusing on the sql script part which is the trickiest:
    -- writedate.sql script for njas
    SELECT NJA_RES_SYS_NO||','||NJA_TEST_REC_NO||','||NJA_LIC_ST_ID||','||NJA_ETS_ID||','||NJA_SW_VER||','||NJA_TECH_ID||','||NJA_VIN||','||NJA_LIC_NO||','
    ||NJA_LIC_JUR||','||NJA_LIC_SRC||','||NJA_MODEL_YR||','||NJA_MAKE||','||NJA_MODEL||','||NJA_VHCL_TYPE||','||NJA_BODY_STYLE||','||NJA_CERT_CLASS||','||
    NJA_GVWR||','||NJA_ASM_ETW||','||NJA_ETW_SRC||','||NJA_NO_OF_CYL||','||NJA_ENG_SIZE||','||NJA_TRANS_TYPE||','||NJA_DUAL_EXH||','||NJA_FUEL_CD||','
    || NJA_VID_SYS_NO||','|| NJA_VRT_REC_NO||','|| NJA_ARMSTDS_REC_NO||','|| NJA_RSN_F_N_TESTABLE||','|| NJA_DYNO_TESTABLE||','||
    NJA_CURR_ODO_RDNG||','|| NJA_PREV_ODO_RDNG||','|| NJA_PREV_TEST_DT||','|| NJA_TEST_TYPE||','||
    NJA_TEST_START_DT||','|| NJA_TEST_END_TIME||','|| NJA_EMISS_TEST_TYPE||','|| NJA_TEST_SEQ_NO||','
    ||NJA_LOW_MILE_EXEMP||','||NJA_TIRE_DRY||','|| NJA_REL_HUMID||','|| NJA_AMB_TEMP||','||NJA_BAR_PRESS||','|| NJA_HCF||','||
    NJA_GAS_CAP_ADAP_AVL||','|| NJA_GAS_CAP_REPL||','|| NJA_OVERALL_GAS_CAP_RES
    FROM NJAS
    WHERE NJA_RES_SYS_NO IN (SELECT MIN(NJA_RES_SYS_NO) FROM INSPECTION_RESULTS WHERE NJA_RES_SYS_NO IN
    (SELECT MAX(NJA_RES_SYS_NO) FROM INSPECTION_RESULTS, (SELECT SYSDATE-1 FROM DUAL))
    =====================
    Output thus far:
    ======================
    NJA_RES_SYS_NO||','||NJA_TEST_REC_NO||','||NJA_LIC_ST_ID||','||NJA_ETS_ID||','||
    4,,04-MAR-03,R,27-MAR-03,27-MAR-03,O,,N,,,,,,,,Z
    10871630,5274,CIF000025,CL002901,4.13,INL004025,1B7GL22X7WS569744,VK765K,NJ,B,19
    98,DODGE,DAKOTA,T,3,TIER0,5200,3750,M,06,3.9,A,N,GASO,1446865,14663,3019,,Y,4654
    5,,21-MAR-03,I,21-MAR-03,21-MAR-03,O,,N,,,,,,N,N,P
    How do I strip the comments from the output file? Also not sure if my subquery is performing the output correctly. Thanks.
    Scott

  • Can anyone help with scripting problem?

    I finally figured our how to write my own scripting in InDesign (CS2) to format the schedules I work on. Now we upgraded to CS4 and they don't work anymore. I'm not knowledgeable enough to know why it's not working. I someone familiar with this? I could send you the script I wrote to see if you can possibly help me.
    Thanks so much
    PS, why couldn't they just leave it alone??!

    Hi Cheri,
    First, you can probably run your CS2 script in CS4 using script versioning. Put the script in a folder named "Version 3.0 Scripts" inside the Scripts Panel folder in the Scripts folder inside your InDesign folder.
    Next, why don't you come over to the InDesign Scripting forum? We'll be happy to help you update your script to CS4.
    Finally, scripting has to follow changes in InDesign's architecture and features. When those change, scripting has to change, as well. We try very hard not to break existing scripts, and provide script versioning to reduce the pain of upgrading, but there will always be some things we have to change.
    Thanks,
    Ole

  • Help with script error

    Hi all,
    I am facing error with the script logic
    Script Logic
    *XDIM_MEMBERSET P_ACCT=EXTSALES,ICSALES
    *WHEN P_ACCT
    *IS ICSALES,EXTSALES
    *REC(P_ACCT="TOTVAL")
    *REC(FACTOR=.08,P_ACCT="SALAFTERTAX")
    *ENDWHEN
    *COMMIT
    Error Message
    LOG BEGIN TIME:2010-04-16 15:59:39
    FILE:\ROOT\WEBFOLDERS\Student_DD \ADMINAPP\Sales\TEST.LGF
    USER:MICAIT\DEVANG
    APPSET:Student_DD
    APPLICATION:Sales
    *REC(P_ACCT="TOTVAL")
    ERROR LOG:
    CLASS: CL_UJK_WHEN_ENDWHEN
    METHOD: ADD_LINE
    TCODE: SE38
    MULTI MEMBERS HAVE BEEN SPECIFIED ON  DIMENSION:"P_ACCT" IN *IS SO DUPLICATE MEMBERS MAY BE GENERATED.
    LOG END TIME:2010-04-16 15:59:39
    UJK_VALIDATION_EXCEPTION:LINE:4 multi-member specified for dimension "4" in *IS
    Thanks,
    Diksha

    Hi,
    If you are in SP02, Go through this SAP Note [Note 1312132 - BPC7NW SCRIPT LOGIC: REC Behavior Fix|https://service.sap.com/sap/support/notes/1312132] that helps you in fixing this issue.
    Reply me for further clarifications.
    Regards,
    RajK

  • Need Help With Script Skipping Word Before Variable

    I borrowed and modified a skip I found here: http://forums.adobe.com/message/4808804 with code borrowed from elsewhere.
    I noticed that it seems to run fine, but it skips any word that appears right before a variable. The point of the script is to find any text using an italic override or bold override, and replace the override with the appropriate character format from the catalog.
    Can someone tell me why the code below skips words before a variable? I am sure it is a simple thing, but I am teaching myself Extendscript, and only recently started the attempt/
    Thanks,
    Marc
    var doc = app.ActiveDoc;
    removeOverrides (doc)
    function removeOverrides (pDoc)
        var vDocStart = pDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
        var vBoldFmt=pDoc.GetNamedCharFmt ('bold')
        var vItalicFmt=pDoc.GetNamedCharFmt ('italic')
        initFA_errno ();
        var vTextLoc = new TextLoc(vDocStart,0);
        var vFindParams=findOverrideParams (pDoc);
        while (FA_errno==Constants.FE_Success)
            var vTextRange=pDoc.Find(vTextLoc,vFindParams);
            if (vTextRange.beg.obj.ObjectValid())
                var vTextItems=pDoc.GetTextForRange (vTextRange, Constants.FTI_CharPropsChange)
                if (vTextItems.length==!0 )
                    $.writeln(vTextItems.String)
                    if (vTextItems[0].idata==Constants.FTF_WEIGHT)
                       pDoc.SetTextProps (vTextRange, vBoldFmt.GetProps())
                    if (vTextItems[0].idata==Constants.FTF_ANGLE)
                       pDoc.SetTextProps (vTextRange, vItalicFmt.GetProps())
                    }// else (Log (vLogFileName, '\nERROR: No items were found in the text format array but format override was found: '+pDoc.Name))
            vTextLoc = vTextRange.end
            vDocStart=vDocStart.NextPgfInFlow;
    function findOverrideParams (pDoc)
        var vFindParams = AllocatePropVals(1);
        vFindParams[0].propIdent.num = Constants.FS_FindObject;
        vFindParams[0].propVal.valType = Constants.FT_Integer;
        vFindParams[0].propVal.ival = Constants.FV_FindCharacterFormatOverride;
       return vFindParams;
      function initFA_errno()
             app.GetNamedMenu("!MakerMainMenu"); //If this fails, you've got bigger problems
             return;

    It looks like home assignment. Home assignment are not very welcome here. I can help you only a little. It's very simple application, but if you dont know basics in OO, you are in trouble.
    Create these three files, even empty with all points you need to accomplish in them as comments.
    Think about gui you need. If you do not know how to make menus and other fancy gui you can do only with one main panel with a few buttons and JOptionPanes appearing for every input.
    Buttons for each task:
    1. get available rooms; press and see JOptionPane telling what rooms are empty (information message)
    2. book: JOptionPane asking how many guests, you input, it checks for availability, if available rooms are not enough (or beds) another OP tells that it's impossible, if enough - offer to input room number, you input, check if the room is booked, then offer to input name, then offer quit.
    3. unbook.
    4.get report
    Once you design how it looks, every step becomes very simple. All methods you need to implement are simple array manipulations. Make report last, because it's just collection of printouts from methods you've already done.
    In book, you need to look for definitions of constructor, passing arguments to methods, returning results from methods, creating object with "new" operator, simple event handling, JOptionPane documentation and examples, which are in every decent textbook.
    Do not panic, it's really simple but rather tiresome application, if you do it by yourself you learn almost everything necessary to start programming in java.

  • Help with Script Logic

    Hi All
    I am trying to write the following script
    *INCLUDE ..\finance\system_constants.lgl
    *XDIM_MEMBERSET RATE=AVG,END
    *SELECT(%IP_Currencies%, "[ID]", "INPUTCURRENCYDIM", "[MD] = 'D' OR [MD]= 'M'") )
    *XDIM_MEMBERSET INPUTCURRENCY= %IP_Currencies%
    *XDIM_MEMBER RATESRC=RATEINPUT
    *WHEN INPUTCURRENCY.MD
    *IS "D"
    *REC(EXPRESSION=ROUND(1/%VALUE%,6),RATESRC="RATECALC")
    *ELSE
    *REC(RATESRC="RATECALC")
    *ENDWHEN
    *CLEAR_DESTINATION
    *DESTINATION RATESRC=RATECALC
    My LGX file looks like this.
    *XDIM_MEMBERSET RATE=AVG,END
    *XDIM_MEMBERSET INPUTCURRENCY= DZD,USD,ARS,AUD,ATS,BSD,BBD,BEF,BMD,BRL,GBP,BGN,CAD,CLP,CNY,CYP,CZK,DKK,XCD,EGP,EUR,FJD,FIM,FRF,DEM,XAU,GRD,HKD,HUF,ISK,INR,IDR,IEP,ILS,ITL,JMD,JPY,JOD,LBP,LUF,MYR,MXN,NZD,NOK,NLG,PKR,PHP,XPT,PLN,PTE,ROL,RUR,SAR,XAG,SGD,SKK,ZAR,KRW,ESP,XDR,SDD,SEK,CHF,TWD,THB,TTD,TRL,VEB,ZMK
    *XDIM_MEMBER RATESRC=RATEINPUT
    *WHEN INPUTCURRENCY.MD
    *IS "D"
    *REC(EXPRESSION=ROUND(1/%VALUE%,6),RATESRC="RATECALC")
    *ELSE
    *REC(RATESRC="RATECALC")
    *ENDWHEN
    *CLEAR_DESTINATION
    *DESTINATION RATESRC=RATECALC
    It gets validated fine and it also runs successfully through DPM. But the problem i am facing is that the above script is only running and posting data for USD  in RATECALC where as I have lot many currencies listed in "INPUTCURRENCYDIM". It does not execute for any other currency except for USD. I want to run it for all the currencies.
    Please suggest.
    Diksha.
    Edited by: Diksha Chopra on Jun 3, 2010 9:23 PM

    Hi Diksha,
    Please check in your inputcurrency dimension, how many members are there with the property MD as D?
    I would suggest you to change your scritp to
    *INCLUDE ..\finance\system_constants.lgl
    *XDIM_MEMBERSET RATE=AVG,END
    *XDIM_MEMBER RATESRC=RATEINPUT
    *WHEN INPUTCURRENCY.MD
    *IS "D"
       *REC(EXPRESSION=ROUND(1/%VALUE%,6),RATESRC="RATECALC")
    *IS "M"
       *REC(RATESRC="RATECALC")
    *ENDWHEN
    *COMMIT
    *CLEAR_DESTINATION
    *DESTINATION RATESRC=RATECALC
    Hope this helps.

  • Need Help with script For Bulk Users Name & Description Updation

    Hi Guys,
    I have below requirement :
    We are having one windows 2008 stand alone server with 200+ local users (No Active Directory Account).
    1. Requirement is to update each account's "Full name" and "Description field" with same text. Which means , Full name and Description field will be same with same text. No other changes are required. )Attached the screenshot)
    Can you guys pls help me out with any scripting (vbs , powershell , DOS .etc etc) method to accomplish this task quickly as manual process is very troublesome and take long time.
    Any help will be highly appreciated,
    Thanks,
    Suvajit Basu

    Hi,
    I dont have any script but seeking for a help.
    Thanks,
    Suvajit Basu
    In that case you should read this first:
    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/a0def745-4831-4de0-a040-63b63e7be7ae/posting-guidelines?forum=ITCG
    Prewritten scripts can be found in the repository (Brent has already suggested one for you):
    https://gallery.technet.microsoft.com/scriptcenter
    If you can't find what you need and you can't write your own, you can request a script here:
    https://gallery.technet.microsoft.com/scriptcenter/site/requests
    Let us know if you have any specific questions.
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Help with script to team NICs and assign IP in Win7 SP1

    Hi All,
    I have the following Power Shell script to team 2 NICs and assign IP, Gateway and DNS server:
    # Create TEAM1, by binding 'Ethernet' and 'Ethernet 2' NICs.
    New-NetLbfoTeam -Name TEAM1 -TeamMembers "LAN #1","LAN #2" -TeamingMode SwitchIndependent -LoadBalancingAlgorithm Dynamic -Confirm:$false
    # 20 second pause to allow TEAM1 to form and come online.
    Start-Sleep -s 20
    # Configure static IP Address, Subnet, Default Gateway, DNS Server IPs to newly formed TEAM1 interface.
    New-NetIPAddress –InterfaceAlias "TEAM1" –IPAddress 10.221.27.32 –PrefixLength 24 -DefaultGateway 10.221.27.1
    Set-DnsClientServerAddress -InterfaceAlias “TEAM1” -ServerAddresses 10.221.103.1
    I am trying to run the script in Windows 7 but I am getting the error that the cmdlets do not exist.  I fear that this is not possible to do with PS in Win7.  Is there a way to use PS in Win7 to accomplish this?
    If not, can this be done in Win7 with any other scripting language?  I have done some research but haven't had any luck.
    Thanks in advance for any help.
    Kind regards,
    Ken

    If the adapter vendor supports teaming they will have delivered a utility to create the teams.  The CmdLets are supported only for Windows 8/2012
    ¯\_(ツ)_/¯
    Thanks for your reply jrv.
    I need to team the nics via script.  Is it possible to do with VB?

  • Need Help with script: CS4 Flash Buttons

    I created a 3 button bar using Flash CS4. It will link to three different HTML pages in a website. This is one of the three scripts I have on the first frame of the main timeline, the code is for one of the buttons, the other two are really the same with differing button numbers. This code does now open the page up in a NEW BROWSER window, but I would like the page to open in the existing window and not in a new one. The 3 buttons also have down states identified by a frame label of “hold”, I would like the script to set the hold frame or down state to be displayed when the proper page is loaded in the browser .  Will someone please suggest to me what I need to add to this script to achieve this, your time and effort will be appreciated.
    stop();
    button1_btn.addEventListener(MouseEvent.CLICK, illus);
    function illus(e:MouseEvent):void {
        var targetURL:URLRequest=new URLRequest("illustrator.html");
        navigateToURL(targetURL);

    Thank you Todd... How about the code to display the Down stage when displayed,
    got any thoughts on this.
    Thanks'
    Bill

  • Need Help with scripting for Automator/AppleScript.

    Hi everybody,
    I am building a small app for my mac, What I need is a script that can rename a file that I drop on it.
    and example being:
    example.jpg
    (when I drop it on the app, I want the app to change the filename of the document to "Image.jpg"
    I have tried this with Automator, but it requires that I specify the file to be changed, what I need is something that will change the name of any file I drag onto it.
    I am using it for application specific files.
    Kind regards,
    Pete.
    iBook G4; 60GB Hard Drive, 512MB RAM, Airport Extreme    

    Open the Script Editor in the
    /Applications/AppleScript/ folder and enter the
    following:
    on open(the_file)
    tell application "Finder"
    set name of the_file to "Image"
    end tell
    end open
    Save this script as an application.
    (11347)
    this script compiled correctly; however when run it returned the following error "Can't set name of (the_file) to "Image.jpg"
    I am also given the option of editing the script or just quitting.
    thanks for your help

Maybe you are looking for

  • How can you delete an app?

    I tried to install an application, I got the icon on my home page and it says "loading" but it never loads. How can I delete it? When you hold it it wiggles but you dont have the X to delete it. I am sure this has been asked already sorry, why doesn'

  • My iPod will not sync with the computer shuts down programs

    Every time I try to sync my iPod with iTunes,iTunes freezes up and then windows explorer shuts down. My iTunes software is up to day,my computer is virus free and the computer shows the iPod as it is plugged in but it will not open into iTunes. What

  • Installing Windows 7 OEM on Maverick

    Apple Store advised me to get a Windows 7 OEM 64 bit disc for my 2013 macbook pro: http://www.amazon.com/Windows-Premium-System-Builder-Packaging/dp/B00H09BB16/ref =sr_1_1?s=software&ie=UTF8&qid=1393131478&sr=1-1&keywords=windows+7 .  This is a gener

  • How Line Item Dimensions

    Hi.. I found some dimensions need to be conveted into line items. but when checked with cube that dimension has more than 1 characteristics. In that case what i have to do..and how can i convert it into line items

  • Entry for InfoCube/DataStore object *** is invalid in table RSMDATASTATE

    Hello , Could not able to Roll up the request in the cube. When i am clicking the Roll up Tab its getting short dump . So while doing RSRV checks for the particular Cube getting below errors - "Entry for InfoCube/DataStore object *** is invalid in ta