Simple script tip please

Folks,
Lets say a button in my page works correctly with this path:
../../index.html
How do I change that path in action script when the button is
incorporated into a movie clip nav bar?
MeanIng, now the button is buried one level deeper in the fla
into the movie clip.
Thanks you for any advice!

there's not _root required for targetting a html file. you
should probably explain exactly what you're doing instead of trying
to extract what you think is important.
for example, show the code (using that attach code option)
you are using to atarget that html file. are you using getURL() to
target your html file?

Similar Messages

  • Could someone please sketch out this simple script for me?

    Could someone please sketch out a simple java script for me. I will have a document with one background
    layer and a layer set (group) called "Analyze" that consists of 63 adjustment layers. The layer names in that "Analyze" group(folder) will be
    "01" ...through "63" with 01 on the bottom and 63 at the top. Initially, all of the adjustment layers will be invisible and  the
    group will be closed (not expanded). I need a simple  script that will check for the first invisible layer in that group
    and make it visible without selecting that layer nor expanding the group. The script has to check
    for the first invisible layer every time it runs because other actions may have turned off a layer in the set.
    The point of this is so I can hotkey flipping on the layers one at a time without expanding the set or
    changing focus off the  background. It seems it should be a simple loop, but I just can't wrap  my head
    around all the objects (e.g. Layer as opposed to Layers  and  Artlayer as opposed to Artlayers)
    and the constants constants.
    for (i = 63; i>0; i--){                 /* I have found layer indexes 0 are the topmost layer */
      if( layerset[i] == INVISIBLE){
               layerset[i] = VISIBLE;
                  break;
    Could someone please write me a simple script that would do this?
    Edit I found this and its very close to what I need:
    var doc = app.activeDocument;
    for(var i = 0 ; i < doc.layers.length;i++){
      doc.layers[i].visible = (i % 2 == 0);
    From here : Function to show/hide layer with Photoshop script (JSX) - Stack Overflow
    In my case I would rewrite it to this
    for(var i = 62; i >=0; i--){
         if(  !doc.layers[i].visible){
              doc.layers[i].visible =TRUE;
              break;
    My problem is I just need  to traverse the layers in my layerset "Analyze"
    How do  I reference just those? Is there a doc.layersets["Analyze"].layers[i].visible = TRUE?
    Message was edited by: Shawn Laughlin To add more information

    Well this works:
    var doc = app.activeDocument;
    var analyze = doc.layerSets.getByName("Analyze").layers
    for(var i = 62 ; i >= 0; i --){
        if (!analyze[i].visible){
            analyze[i].visible =1;
            break;
    Hard to believe TRUE is not a constant in java.

  • Please help me to write a simple script.

    I wonder to tell a application named "Alien BBS", to input "right key" then wait for 5 seconds to input "left key".
    How can I do that by using a simple script ?
    tell application "AlienBBS"
    activate
    input ?
    end tell
    Please do me a favor to write~ cause I don't have any computer language background. Thanks in advance.

    Hi Tim,
    When you run an application it becomes a process. You can do stuff with the process. One thing is ui scripting which means that you're interacting with the user interface of tghe process. Some Processes don't have the same name as the application it was launched from, but usually they're named the same. You can try this:
    tell application "AlienBBS"
    activate
    end tell
    tell application "System Events"
    tell process "AlienBBS"
    keystroke (ascii character 29) -- right key
    delay 5
    keystroke (ascii character 28) -- left key
    end tell
    end tell
    You need to test it out and adjust.
    gl,

  • Simple focus magic script help please

    Dipping my toes for the first time - more code to learn - brain hurting.
    I've recorded a very simple script to run a basic sharpening step in focus magic before creating web galleries.   It works except it asks for a decision in focus magic which is a pain running 40-70 pictures through (200 in show jump season).
    the desired aim is each photo to be "out of focus" sharpening at 1 pixel @ 100% and what I have is as follows.  I think there may be a yes/no return step I want rid of and I'm hoping sorting this out will be a good first step in learning.  Thanks for any help
    REM =======================================================
    DIM objApp
    SET objApp = CreateObject("Photoshop.Application")
    REM Use dialog mode 3 for show no dialogs
    DIM dialogMode
    dialogMode = 3
    DIM idOpn
    idOpn = objApp.CharIDToTypeID( "Opn " )
        DIM desc1
        SET desc1 = CreateObject( "Photoshop.ActionDescriptor" )
        DIM idnull
        idnull = objApp.CharIDToTypeID( "null" )
        Call desc1.PutPath( idnull, "C:\\APRESSbox\\ExRaw2process\\0812GlensEX\\MagstoGO\\0812GlentoranWEB\\WK08008DS Glentoran.JPG" )
    Call objApp.ExecuteAction( idOpn, desc1, dialogMode )
    REM =======================================================
    DIM objApp
    SET objApp = CreateObject("Photoshop.Application")
    REM Use dialog mode 3 for show no dialogs
    DIM dialogMode
    dialogMode = 3
    DIM idFltr
    idFltr = objApp.CharIDToTypeID( "Fltr" )
        DIM desc2
        SET desc2 = CreateObject( "Photoshop.ActionDescriptor" )
        DIM idUsng
        idUsng = objApp.CharIDToTypeID( "Usng" )
        Call desc2.PutString( idUsng, "Fix Out-of-focus Blur" )
    Call objApp.ExecuteAction( idFltr, desc2, dialogMode )
    REM =======================================================
    DIM objApp
    SET objApp = CreateObject("Photoshop.Application")
    REM Use dialog mode 3 for show no dialogs
    DIM dialogMode
    dialogMode = 3
    DIM idCls
    idCls = objApp.CharIDToTypeID( "Cls " )
        DIM desc3
        SET desc3 = CreateObject( "Photoshop.ActionDescriptor" )
        DIM idSvng
        idSvng = objApp.CharIDToTypeID( "Svng" )
        DIM idYsN
        idYsN = objApp.CharIDToTypeID( "YsN " )
        DIM idN
        idN = objApp.CharIDToTypeID( "N   " )
        Call desc3.PutEnumerated( idSvng, idYsN, idN )
    Call objApp.ExecuteAction( idCls, desc3, dialogMode )

    The open and close steps you should be able to do using the DOM and not have to use scriptlistener.
    For the filter You might want to see if it can be recorded and played back as an action. If so then just calling that action would be an easy way to run the filter. If it can be recorded you may be able ( at least with javascript ) to make the executeAction call with dialogMode set to all and assign the results to a variable. That variable with contain an Action Descriptor. With most filters the setting you used in the filter dialog will be in that descriptor. You just need to pull the descriptor apart to find what the setting are. Or( again using javascript ) xtools has a script that will convert an action into javascript. It is mostly action manager( scriptlistener ) so you should be able to translate the output to VBS.

  • Simple Script - won't run - please help

    I've written a very simple script to check to see if a volume is mounted and then copy a directory to that volume if it is mounted:
    #!/bin/sh
    # check to see if network space mounted by looking for known folder
    if [ -d /Volumes/backupvolume ]; then
    cp –R /Users/username/Documents/foldertobebackedup /Volumes/backupvolume/username
    fi
    I made sure the cp command works by running it in the terminal - no trouble there.
    According to what I see in Xcode, all the syntax is correct and there are no errors.
    I then run the test on the script (per the Bombich instructions):
    sudo u+x /Users/user/backupscriptingtests/190520100730.sh
    I'm then required to enter the password (which I do and it accepts it)
    The next thing that happens though is the following error appears:
    sudo: u+x: command not found
    Any ideas on what I'm entering incorrectly here? Eventually, this script will be a logout hook to copy files for a user as a backup. This process seems like it should be very simple, which is why I'd rather do it this way instead of buying a backup program.
    Thanks!
    FYI: The -d command has brackets, left bracket with space at the beginning and space with right bracket just before the ;
    Message was edited by: mcguirek
    Message was edited by: mcguirek

    You need to include the actual backup volume name and home folder name where backupvolume, username, and user are. If the backup volume name contains spaces or other special characters, precede them with backslashes or put the whole path in single quotes.
    (53087)

  • Need help making a simple script for my webcam

    Hey everyone, fairly new to applescript programming. I just bought a usb camera for my macbook because I use it for video conferencing/playing around, and it is better quality than the built in isight. However, in order to use this camera I need to use drivers from a program called camTwist. This being said camTwist needs to be opened first and the usb camera must be selected from camTwist Step 1 list in order for any other application to use the camera. I just want to make a simple program that would open camTwist first, then select "webcam" from the list (double click it like I always have to in order to select it) in order to activate the driver, and then open photo booth which would then be using the camTwist driver in order to take pictures.
    I made a crude program but it does not automatically select "webcam" from the Step 1 list in camTwist:
    tell application "CamTwist" to activate
    delay 10
    tell application "Photo Booth" to activate
    that’s basically it. I set the delay to 10 seconds so that when camTwists boots up first I can manually select my webcam. HOWEVER, I would like to make a script that would boot up CamTwist first, select my webcam from the list automatically, and then open Photo Booth with the CamTwist webcam driver already selected.
    Don't know much about applescript so any help to make a working script to solve my problem would be greatly appreciated! Thanks!

    Solved my problem but now I need help with something else! First I used CamTwist user options to create user defined hot keys with the specific purpose to load the webcam. I chose Command+B. I tested it out in CamTwist and it worked. The program follows a logical order from there. First it loads CamTwist, then after a short delay it presses the hot keys in order to load the webcam from the video source list, then another short delay and Photo Booth is opened with the driver loaded from camTwist. Everything works Perfect! Here's the code:
    tell application "System Events"
    tell application "CamTwist" to activate
    delay 0.5
    --Press command+b which is a user defined hot key to load webcam
    key code 11 using command down
    end tell
    delay 0.5
    tell application "Photo Booth" to activate
    My Next question is, would it be possible with this same script to have both applications quit together. For example I always quit Photo Booth first, so when I quit photo booth is there a way to make CamTwist also quit and keep everything within the same script? Please let me know. This forum has been very helpful and lead me to a solution to my problem! Hoping I can solve this next problem as well! Thanks everyone.

  • Simple Script works on 10.6 but not 10.5.8

    Hi,
    Brand new to Applescript...I made a simple script (saved as an application) to rename Excel Sheet Tabs and it works on my MBP (10.6.2) however when I try sharing with other users (10.5.8), it fails to carry out properly. It opens a blank workbook rather than the "test.xls" workbook and won't go any further. Am thinking it might be due to:
    1) where the script and .xls file were originally created/saved?
    2) 10.6.2 vs. 10.5.8?
    3) method of sharing? Tried attaching to Mac OSX Server Wiki, NAS and e-mailing but still wouldn't work.
    here's the script-
    tell application "Microsoft Excel"
    try
    open workbook workbook file name "test.xls"
    activate object worksheet "names"
    set myRange to range "A2" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 3 to myName
    set myRange to range "A3" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 4 to myName
    set myRange to range "A4" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 5 to myName
    set myRange to range "A5" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 6 to myName
    set myRange to range "A6" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 7 to myName
    set myRange to range "A7" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 8 to myName
    set myRange to range "A8" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 9 to myName
    set myRange to range "A9" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 10 to myName
    set myRange to range "A10" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 11 to myName
    set myRange to range "A11" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 12 to myName
    end try
    end tell
    Any suggestions will be greatly appreciated! THANKS!

    more info:
    a co-worker with a MacBook (10.5.8) was able to download the script and .xls file from our server and it worked...
    An eMac (10.4.11) was not able to run the script.
    All machines are running 2008 Office for Mac

  • I need a simple script (Break Link To Style)

    Hi nice guys,
    Can someone please provide a simple script that will break the links to styles in all the paragraphs in a document.
    Thanks in advance
    Maria*
    *An non coder designer that simply is not capable of understanding javascript... (but I have tried!)

    Hi Maria,
    Jongware's post (http://forums.adobe.com/message/1890625#1890625) gave me a clue on how to do this.
    Give this a try:
    var i, j, myDoc = app.activeDocument,
              allStories = myDoc.stories,
              thisStory,
              thisPara;
    for (i = 1; i < allStories.length; i++) {
              thisStory = allStories[i];
              for (j = thisStory.paragraphs.length - 1; j >= 0; j--) {
                        thisPara = thisStory.paragraphs[j];
                        thisPara.applyParagraphStyle(myDoc.paragraphStyles[0], false)
    alert ("Job Done!");

  • Error while executing a simple script....

    Hi,
    I am trying to run the following simple script in Oracle 8i:
    UPDATE
    vcad_ocorrencias
    set tipo_situa_solic = 'E', desc_obs_atendente = 'ACERTO DE BASE -
    18/10/2004'
    where cod_solicitacao = 7
    and tipo_situa_solic in ('N', 'P')
    and cod_contrato_Inter not in ( 2247,2295,2296,2297,2278,2269,2168)
    and dthora_geracao < '07/10/2004'
    order by cod_contrato_inter;
    And it is returning the following message error:
    ERRO na linha 8:
    ORA-00933: SQL command not properly ended
    Well this script was made by a developer and now I have to run it in production environment...
    Does someone know why it is failing?

    Get rid of your 'order by statement'.
    order by cod_contrato_inter;
    Also make certain that the 'NLS_DATE_FORMAT' is set to 'DD/MM/YYYY' or change
    and dthora_geracao < '07/10/2004'
    to
    and dthora_geracao < to_date('07/10/2004','DD/MM/YYYY')
    UPDATE
    vcad_ocorrencias
    set tipo_situa_solic = 'E',
    desc_obs_atendente = 'ACERTO DE BASE - 18/10/2004' -- not sure if it is a date column
    where cod_solicitacao = 7
    and tipo_situa_solic in ('N', 'P')
    and cod_contrato_Inter not in ( 2247,2295,2296,2297,2278,2269,2168)
    and dthora_geracao < to_date('07/10/2004','DD/MM/YYYY')

  • My iPhone 4 no longer appears in iTunes. But it does charge. Tried most tips please help. Email or

    My iPhone 4 no longer appears in iTunes. But it does charge. Tried most tips please help someone!

    Hi there,
    No I didn't. Someone suggested in another thread that my iPod was registering as a disk instead of a device, so if I removed my iPod as a disk on Disk Utility then it would reload etc. and show up in iTunes. Which it didn't, and instead just cleared all my music (16,000 songs).
    So frustrating.
    Hope if you have the same problem you are able to find a better solution!

  • HT1751 I have moved my library from an external hard drive into my laptop music file but I am not able to open i-tunes when holding down the shift key as advised in step 4 and thus not seeing the library option box - any tips please??

    I have moved my itunes library from old computer to portable hard drive and then on, into new laptop, in music file. However I am then unable to open I-Tunes when holding down the shift button as directed in step 4 - this means I am not seeing the library choice box and cannot synch the tunes into ITunes library - any tips please?........Alan

    Close iTunes. Click the icon to launch iTunes and immediately press and hold down the left shift key. Keep holding until prompted to choose or create a library. If iTunes opens normally, close it,  and try again.
    tt2

  • I am trying to install final cut pro 6 onto my mac but a message keeps coming up saying its doesnt support a powerpc, anyone have any tips please?

    I am trying to install final cut pro 6 onto my mac but a message keeps coming up saying its doesnt support a powerpc, anyone have any tips please?

    If you have an Intel Mac and have recently upgraded to Lion or Mountain Lion; here is a post I made in another similar thread:
    I do not have any experience with Final Cut, but if you have existing projects that you MUST access; then you are in need of a solution on your new iMac in Mountain Lion!
    Unfortunately you got caught up in the minor miracle of Rosetta.  Originally licensed by Apple when it migrated from the PowerPC CPU platform that it had used from the mid-1990's until the Intel CPU platform in 2006, Rosetta allowed Mac users to continue to use their library of PPC software transparently in emulation.
    However, Apple's license to continue to use this technology expired with new releases of OS X commencing with Lion (and now Mountain Lion).  While educational efforts have been made over the last 6 years, the fact is that Rosetta was SO successful that many users were caught unaware UNTIL they upgraded to Lion or Mountain Lion.
    Workarounds:
    1. If your Mac will support it, restore OS X Snow Leopard;
    2.  If your Mac will support it, partition your hard drive or add an external hard drive and install Snow Leopard into it and use the "dual-boot" method to choose between Final Cut Pro or Lion/Mt. Lion;
    3.  Purchase a used Mac that will run Snow Leopard (with the optional Rosetta installed) and continue to run FCE on that Mac (you can actually use Screen Sharing with a "headless" used Snow Leopard Mac Mini and use the screen from your other Mac to view and work FCP in the Mac Mini environment);
    2.  Upgrade to an Intel compatible version of FCP (such as FCP X) and hope it converts your existing projects to its newer format correctly.  There is much debate that the newer version of Final Cut are eliminating many needed features; for example Final Cut Pro X vs. Final Cut Pro 6 -- many users are staying with version 6;
    3.  Install Snow Leopard (with Rosetta) into Parallels and then install FCE in the Snow Leopard environment:
                                  [click on image to enlarge]
    Full Snow Leopard installation instructions here:
    http://forums.macrumors.com/showthread.php?t=1365439
    NOTE: STEP ONE of the instructions must currently be completed on a Snow Leopard or Lion Mac and the resulting modified Snow Leopard.cdr install file can then be moved over to your Mountain Lion Mac for completion of the remaining steps.
    NOTE 2:  Computer games with complex, 3D or fast motion graphics make not work well or at all in virtualization.

  • HOW TO : Writing simple scripts in SQL Developer??

    Here is a simple script I run in SQL*Plus...
    the first SQL prints the QCSID, the second script prompts for a SID which is the QCSID from the first SQL... once provided it gives me the output I want...
    I just cannot do this in SQL DEVELOPER..... or Can I?
    select distinct qcsid from v$px_session;
    select sid,serial#,qcsid,qcserial#,degree,req_degree from v$px_session
    where qcsid in (select qcsid from v$px_session where sid='&sid');

    Ganesh,
    Simple substitution and defines work in SQL Developer scripts.
    I think the problem with running your script is that the first query results are not displayed before the window asking for the '&sid' value. That is the output to the 'screen output' tab is buffered and not synchronized with additional pop up (or dialog) windows. Is that correct?
    Currently:
    You can use substitution variables in the f5 'Run Script' but no bind variables.
    You can use bind variables in the f9 'Execute Statement' but no substitution statements.
    You can use anonymous PLSQL blocks, and packaged functions and procedures, so you can store per session state in PLSQL packages.
    -Turloch

  • Parent/Action Script advise, please

    Hello
    I am posting to ask for some advice. I have Flash MX 2004.
    I have a series of thumbnails (Movie Clips) which seem to be
    arranged over two layers (layers 1 and 2). Layer 1 holds each
    individual thumbnail (movie clip) in several keyframes, so that
    with Layer 1 highlighted, when I click on frame 1 I can see
    thumbnail no. 1 on the stage, when I click on frame 2 I see only
    thumbnail 2 on the stage, when I click on frame 3 I see only
    thumbnail 3 on the stage, etc.
    I see no Action Script when I click through the frames:
    Layer 2, however, does appear to hold Action Script. Please
    see here:
    http://www11.brinkster.com/stevehigham/parent.html
    When I click on Layer 2 frame 1 I can see Action Script for
    the first thumnail:
    gotoAndStop(_parent._name);
    When I click on frame 2 I can see my second thumbnail, but
    the same script:
    gotoAndStop(_parent._name);
    When I click on frame 3 I can see my third thumbnail, but
    again the same script:
    gotoAndStop(_parent._name);
    I am trying to get my limited cognitive ability to grasp how
    the file works (I bought it as a template) so that I can change it.
    I wish to ask two questions. Does the gotoAndStop(_parent._name);
    mean that every time I click on thumbnail 1 I go to this file:
    --> _parent._name?
    And does it mean that every time I click on thumbnail 2 I
    also go to this file: --> _parent._name? Does it also mean that
    every time I click on thumbnail 3 I go to the same file: -->
    _parent._name?
    When I go to Ctrl + Enter and click on the thumnails
    (regardless of which one it is), I am always taken to the same
    place. Is it this script, the _parent._name that takes me there? If
    so, my second question concerns how can I change it - what is it in
    the script that I need to change - so that each thumbnail takes me
    to a different place?
    Many thanks for reading such a long message!
    Steve

    Hello kglad
    Thank you for your message.
    In relation to your comment:
    'you need to label your frame and you probably are supposed
    to load that swf into another swf'.
    How do I do that? If I create something new on my stage in a
    new layer in the first frame how to I change the Action Script so
    that when the thumbnail is clicked, I go to that particular frame
    in that particular layer?
    Thank you for your help.
    Steve
    Text

  • Simple script in /usr/local/bin just won't start - SOLVED

    I put this really simple script for starting psi into my /usr/local/bin, set it a+xr and added /usr/local/bin to my path. However, I just can't start the damn thing.
    Here's the script itself (I really don't think there's something wrong with it, since if I type it in the shell it works fine):
    #!/bin/zsh/
    #start psi, never stop
    while true;
    do psi;
    done
    Here's my users $PATH:
    ─$ print $PATH
    /bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/usr/local/bin:/opt/kde/bin:/opt/mozilla/bin:/opt/qt/bin
    Here's the permissions of the script:
    $ ls -lah /usr/local/bin
    total 4.0K
    drwxr-xr-x 2 root root 80 Dec 15 03:52 ./
    drwxr-xr-x 10 root root 240 Dec 10 18:55 ../
    -rwxrwxr-x 1 kamagurka users 60 Dec 15 03:51 psi.start*
    And here's what happens when I try to execute it:
    $ psi.start
    zsh: command not found: psi.start
    So, I'm either missing something incredibly obvious, or something freaky's going on here. I hope it's the former.
    EDIT: I had no idea where to put this, so I put it into Desktop Env since I'm trying to start a graphical app, but feel free to move it.
    EDIT: Yea, I was being a little dense.

    smoon wrote:Not sure if that's the problem, but try removing the trailing / (slash) from your script's shebang.
    See, something really obvious. Stupid, even. You can see, I don't do a lot of scripting.

Maybe you are looking for

  • FF Id Owner Name appears different in SPM report campared to Backend

    Hi Team, We have SPM 5.3 installed and we are using user based Firefighter concept. I have run the SPM report ( log summery report , transaction usage report and detail log report ) today. There the FF id Owner name appearing is different with respec

  • How do I delete stuff in iCloud

    How do I view and delete files in icloud

  • Rented HD Movie Audio out of sync

    have itunes on a win 8 pc. latest vesrion of ITunes , rented an HD movie and the audio was horribly out of sync. tried stopping starting and restarting but it always moved farther out of sync. Any fixes for this problem other than not to rent movies?

  • N1 and port conflict

    Hi all, i try to install N1 1.3 but i have an error. Solaris 10 U6 There is no 8083 port in /etc/services. Nothing in netstat -an and nothing in lsof. Could you help me please? N1SM Installer (version 1.3 on SunOS) 1. Install OS packages. [Completed]

  • WIP FI entry not reversed for refurbishment order

    Hi Experts, I have run the WIP and settled the order in July month for one refurb order and the accounting entry is generated, the order status was REL at that time, now in the month of august the GR is done done for the order and the  status is DLV,