A simple script to automate some keystrokes

Hi All,
I'm pretty much a complete applescript novice I'm afraid. I have a problem that I am hoping to fix though.
Using Aperture I regularly have to process large amounts of files (I'm a wedding photog). At one stage in the process I have to use some repeated key strokes. The sequence is as follows:
right-arrow
right-arrow
altshiftk
I have to repeat these 3 steps hundreds of times. It would be great if I could find a way to trigger these 3 actions with a single keystroke (maybe a function key) as that would speed things up a lot.
My first question is can this be done in applescript or automator?
My second question is how do I do it?
I've been searching for about 2 hours online to find a fix but I can't find anything like it. I think that Quickkeys can do it, but would prefer to do it using the software already on my mac if possible.
Any help would be much much appreciated,
Stuart

Man, you need a keyboard re-mapper bad.
iKey is a front end program that simulates typing and mouse movements. I use iKey to remap the Function keys.
"iKey is an automation utility, a program that creates shortcuts to accomplish repetitive tasks. In essence, an iKey shortcut is a little program in its own right, but you don't need to know the first thing about programming to create an iKey shortcut. All you have to do is put together three necessary parts of a shortcut: One or more commands that give the shortcut its functionality, a context in which it runs, and a launcher that defines how the shortcut is activated."
http://www.scriptsoftware.com/ikey/
iKey has a little more function then the previous free version called youpi key. For many years, I used youpi key before switching to iKey. It works fairly well for me in MAC OS 10.4 although not officially supported. The youpi key download is hard to find & no longer here.
http://www.versiontracker.com/dyn/moreinfo/macosx/11485&vid=75326
Examples:
I have the common programs that I use assigned to function keys. I have F4 assigned to Firefox. When I want to start FireFox, I press F4. When I want to switch to firefox, I press F4! Starting & switching to an application in Mac OS are the same thing in Mac OS.
Here is an example of to assign volumn control to a function key.
http://discussions.apple.com/message.jspa?messageID=10361085#10361085
Here is my script for listing my application folder. I have it assigned to function-key 6.
!http://farm3.static.flickr.com/2689/4292832695_f3a8f1122e.jpg!
tell application "Finder"
   open folder "Applications" of startup disk
   select Finder window 1
   set bounds of Finder window 1 to {-3, 44, 691, 545}
   --set position of Finder window 1 to {33, 44}
   set position of Finder window 1 to {60, 45}
   activate
end tell
The second portion of this script was generated in the script editor record mode. After I recorded the script and did some editing, I copy the script to ikey/youpi key.
Spark
"Spark is a powerful, and easy Shortcuts manager. With Spark you can create Hot Keys to launch applications and documents, execute AppleScript, command iTunes, and more... You can also export and import your Hot Keys library, or save it in HTML format to print it. Spark is free, so use it without moderation!"
http://www.versiontracker.com/dyn/moreinfo/macosx/22675
Mac OS X remap or rename keyboard keys
by vivek
So how do you remap or rename keyboard keys under Mac OS X?
Simply use DoubleCommand software. It is a free program
http://theos.in/apple/download-doublecommand-to-remap-keyboard-keys/
Keyboard Maestro is a powerful macro program for Mac OS X (including Tiger and Leopard) which has received glowing reviews. Keyboard Maestro will take your Macintosh experience to a new level in “Ease of Use”. With Keyboard Maestro you can design a custom action sequence with your own shortcuts and use them at any time, you can navigate through running applications and open windows with Program Switcher, and you can work with an unlimited number of clipboards - all by pressing simple keystrokes.
http://www.keyboardmaestro.com/main/

Similar Messages

  • Pacnew_scripts: scripts to merge some .pacnew files after an upgrade

    info page: http://xyne.archlinux.ca/info/pacnew_scripts
    I was updating my old system which doesn't get turned on that often and had to deal with about 15 pacnew files. Most only required a simple "mv /path/to/file{.pacnew,}" but some required merging. I found a script that I had written a while ago to merge /etc/group.pacnew, made some changes, made a copy which can handle gshadow, then wrote scripts to handle the pacman mirrorlist and locale.gen.
    Thus the pacnew_scripts package was born.
    infopage wrote:
    This package contains scripts which can help merge .pacnew files after a pacman upgrade. These scripts print their results to STDOUT and thus do NOT make any changes to the files. It is up to the user to inspect the output and, if satisfied, redirect it to the original file and then delete the .pacnew file.
    The scripts accept "-c" and "--compare" as options and will display relevant information about differences between the files. For group and gshadow, this will display 3 columns to compare the original, .pacnew and merged files and will use colors to highlight changes. For the mirrorlist and locale.gen, it will check that all settings in the original file are available in the new file and print out a list of any that aren't (e.g. if one of your current mirrors has been dropped from the mirrorlist, it will be listed in the output).
    I'll probably add scripts as I go. I might also merge the scripts to avoid some redundancy but I decided to keep them simple for now. merge_pacnew_locale_gen is actually very generic and works on the mirrorlist and probably other files as well. If you find any, let me know.
    Last edited by Xyne (2010-03-21 13:03:34)

    beroal wrote:
    I'm really astonished that you interpreted my post as an advertisement of "diffpac".
    Xyne wrote:Have you even tried these scripts and compared them to the alternatives that you've proposed? … you can at least post comments based on an informed comparison.
    I expected such a comparison from you. If "pacnew_scripts" merges files automatically, what algorithm does it use?
    I didn't interpret it as advertisement. It seemed that you read the basic description of what this does and concluded that something else already does the same thing. Following on the tail of the previous posts I felt that your post was somewhat rude because it implies that this is useless. Obviously that is relative, but even so I see no point of posting in this thread to express it, even indirectly.
    I admit that I may have interpreted your post the wrong way and if I did then I apologize, but even then I don't understand why you felt the need to post what you did in a contribution thread.
    As for algorithms, there are different scripts and they use different algorithms. The group and gshadow scripts create hash representations of the groups in the original and .pacnew files. Groups which only exist in one of the files pass through untouched. Groups which exist in both have their members combined, which usually means that the original simply passes through. Using the "--compare" option, three aligned columns are displayed which clearly shows existing groups, new groups and the results of merging, with colors used to highlight all changes.
    The mirrorlist script creates a list of selected servers in the current mirrorlist and generates a new mirrorlist from the .pacnew mirrorlist with all servers in the generated list uncommented, if they exist. Passing the "--compare" option will simply check if all the currently selected mirrors still exist in the new mirrorlist (they might not if they're dropped) and prints out a list of any that aren't.
    The locale_gen script does the same thing for currently enabled locales.
    Also note that all of the results are printed to STDOUT so no files are actually changes. It isn't fully "automatic" and the user is expected to sanity-check the results before overwriting the target files.

  • 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,

  • Using script to automatically arrange timeline and sceneline workspaces.

    This is a simple demonstration of using VB Script to adjust panels in PE3.
    In PE3, when you adjust the height of the timeline, the height of the sceneline is also adjusted the same amount, and vice versa. You could use script to automatically adjust the height of the sceneline or the timeline whenever you switch respective modes. The script below does that.
    This is for those who are familiar with script writing and the Windows Script Host. The vb script below includes properties and methods from the AutoItX library (free download).
    Option Explicit
    Dim oAutoit, strWinText, strLastTime, lngX, lngY
    Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
    oAutoit.WinWaitActive "Adobe Premiere Elements -"
    strLastTime = "start"
    Do
    ' Quit the script if mousepointer put in upper left corner (0,0).
    lngX = oAutoIt.MouseGetPosX
    lngY = oAutoIt.MouseGetPosY
    if lngX = 0 and lngY = 0 then
    set oAutoIt = nothing
    Wscript.Echo "Your script has ended."
    Wscript.Quit
    end if
    ' Read the text of the window so we can determine the workspace setup.
    strWinText = oAutoIt.WinGetText("Adobe Premiere Elements -")
    ' If DVD Menu tab selected, then don't do anything, otherwise
    ' check if in Sceneline or Timeline mode.
    if instr(strWinText, "DVD Menu") = 0 then
    if instr(strWinText,"EditTimeControl") <> 0 then
    if strLastTime <> "timeline" then
    ' Reset the Edit Workspace and then adjust the timeline panel height
    oAutoit.Send "{alt}wke"
    oAutoit.Sleep 250
    oAutoit.MouseMove 1078, 646
    oAutoit.MouseDown "left"
    oAutoit.MouseMove 1078,400
    oAutoit.MouseUp "left"
    strLastTime = "timeline"
    end if
    else
    if strLastTime <> "sceneline" then
    ' Reset the Edit Workspace and then adjust the sceneline panel height.
    oAutoit.Send "{alt}wke"
    oAutoit.Sleep 250
    oAutoit.MouseMove 1078, 646
    oAutoit.MouseDown "left"
    oAutoit.MouseMove 1078,762
    oAutoit.MouseUp "left"
    strLastTime = "sceneline"
    end if
    end if
    end if
    WScript.Sleep 2000
    loop
    The script might work as-is if your screen is set for 1280 x 1024 and the Premiere Elements 3 window is maximized. Save the script in a text file with a .VBS extension, and then run it. Afterwards click on the Sceneline or Timeline buttons in PE3. It may take up to 2 seconds before the mouse starts moving on it's own. The screen coordinates were ascertained using the AutoIt Info tool.

    You shouldn't make assumptions about what the names of the volumes are - both the Finder and System Events have terminology to determine if a disk is the startup volume (or a local volume, for that matter), for example:
    tell application "System Events"
      repeat with someDisk in (get disks whose startup is false and local volume is true)
        set someDisk to POSIX path of someDisk
        do shell script "diskutil umount " & quoted form of someDisk & " &> /dev/null &"
      end repeat
    end tell
    Note that if you are unmounting a disk from a standard account you will be prompted for administrator authentication.

  • Script to automate the display language on windows server

    Hi,
    I'm looking for a script which should change the windows display language from non-english to english (vizversa).
    Here is the scenario:
    On windows server 2008 R2 I have two language installed - Japanese and English with the help of MUI packs available on microsoft site. The native language of windows server 2008 R2 is Japanese. Consider there are 10 sys admins only knows
    Japanese but not english. Similarly there are 10 sys admins knowing only English. I  being english administrator, i should each time go to regional setting in the control panel and click on change display language to english. After
    I finish my task I need to set back the language to japanese(native).
    I'm looking for script which can auotmate this process.
    Objective:
    The script should automatical change the language to Japanese when I logoff from the system. 
    Here is the steps to reach "Change Display language" on windows server 2008
    Go to control Panel > Category view (on right side top ) > System and Security > Clock ,Language and Region > Under “Regional Language” > Change display
    language > Go to Tab “Keyboards and Languages” > Look for the dropdown menu “Choose a display language” and choose the appropriate language you prefer from the dropdown list
    Kindly note this menu/option is available for Vista,Windows 7 and Windows Server 2008. This option is also available on Windows XP/Server 2000/2003 provided the LIP/MUI is installed.
    Thanks
    Ezakial

    Hi,
    I'm looking for a script which should change the windows display language from non-english to english (vizversa).
    Here is the scenario:
    On windows server 2008 R2 I have two language installed - Japanese and English...
    Thanks
    Ezakial
    Guys,
    Forgive me, but I think you are making this far too complicated. Using a script to achieve this is, in my view the wrong tool, and a little dangerous. If your logoff script fails to run for any reason, 11 Japanese sysadmins will be waving Samurai swords
    at you :-).
    There is a single Group Policy setting that will do exactly what you want on Vista, W7, W2K8 & R2.
    Create a new Group Policy object ("English_interface", for example.
    Edit the new policy object
    Drill down to "User Configuration, Policies, Administrative Templates, Control Panel, Regional and Language Options"
    Pick the setting "Restricts the UI languages Windows should use for the selected user" and Enable it.
    Drop down the "Restrict users to the following language" and pick "English"
    Click "OK"
    Link your new GPO somewhere in the OU hierarchy that contains the English user
    If other (Japanese?) users are also in the same container, you can filter application of the GPO by security group so that the policy can only be read and applied by the English group.
    That's all you need to do!
    As a point of principle. I ALWAYS install my OS in US English then add languages, and set the locals to use their own language. This is because service packs and hotfixes invariably arrive for US English first, and some hot fixes are NEVER translated.
    I'm just doing this for a single W7 build in English, to be deployed in 6 countries, with 7 different languages and 9 different keyboard layouts. Fun...
    Come back if you need more help. I volunteer to visit and help if you want!
    Richard
    MCSE, MCITP, MCT etc.
    Switzerland
    RS

  • EEM Script to Automate DHCP/NAT changes on WAN address

    Hi all,
    I'm new to eem scrpting.
    I need to know if it's possible to write a simple script on a DHCP cilent used for a backup in a Call center.
    If power is lost or a connection it lost to the WAN interface the address will change from time to time. It does happen.
    I have a bunch of static nat and port forwarding statements that don't work after the address change.
    Is there a way to tell the router "consider all of the subnet possible addresses in a /192 subnet situation" ?
    Then translate all nat statements to the new WAN address?
    Thanks
    I'm not sure if I'm asking the right question yet but that is close.
    Back up router is a DHCP client and changes addresses from time to time. The router is a 3825 running 12.3 adventerprise image.
    It''s not going to be updated past that.
    Thanks again
    evan

    Thanks Joseph,
    I guess I can't do it in any case because of the IOS ver. it's actually 12.3 (11).
    We have a lot of static port forwarding going on. I not sure how it's going to work when the WAN address changes.
    I was looking for a way to keep all of the one to one static nat statements working to the inside servers. Eventually they have to get a static ip address for the backup.
    Thanks again.
    evan
    p.s. how would one do it if we get the updated ios ver. I see problems coming if I don't take some proactive measure.
    Someway to monitor the WAN address change and keep the port fowarding exactly the same and maybe notify someone that it did change as it's a DHCP client?

  • Will scripts run automatically ?

    If I shut down my Mac everynight(I live in a time zone 6 hours ahead of Eastern US time), will the scripts run automatically when I start it up the next morning...or...do I need a special utility application for this ?

    these scripts are not worth worrying about. you should just leave them alone. the OS does a very good job of running them all by itself. and they are all quite useless anyway. many people (apparently yourself included) seem to think that these periodic scripts are important maintenance tools and will make your system run better and faster. nothing can be further from the truth.
    *monthly scripts* :
    1. archive and recycle fax logs. have you used your mac as a fax machine lately?
    2. write accounting information (total uptime of every account) in the monthly.out log.
    That's IT. so unless you use your mac as a fax machine (do you, really?) you don't need to run monthly scripts. EVER.
    *weekly scripts*:
    in snow leopard they do one thing ONLY: rebuild whois database. it's only useful if you are a unix user and actually use the whois terminal command at least on occasion. I'll bet my bottom dollar you never have and never will. then you don't need to run the weekly scripts either. EVER.
    *daily scripts*
    they do several things
    1. clean up the logs from /Library/Logs/CrashReporter which are more than 60 days old. hardly an urgent task. and those logs are really very few unless your system is seriously messed up. you can go a year without deleting any and will collect a few MBs at the most.
    2. delete junk from /tmp directory that's more than 3 days old.
    This is done automatically on every reboot without any periodic scripts. if you don't reboot the computer then daily scripts will run *no matter* the schedule. if you don't sleep the computer at night they'll run at night. if you do sleep the computer at night they will run first thing in the morning when the computer is turned on. again, zero need to reschedule anything.
    3. deletes files older than 7 days from /var/rwho. this is only relevant if you are running a unix network. otherwise there is nothing to delete - EVER.
    4. rotate accounting files. again, those are nonexistent unless you are a unix administrator.
    5. run the terminal command *df -l -h* and print out the output to daily.out. all this command does is list currently mounted hard drives. useless.
    6.print the current network status in daily.out. this is again just reporting not maintenance.
    7. Delete system messages. Once again this is relevant only for multi-user Unix systems.
    8. remove scratch fax files. see my comment above about using your mac as a fax machine.
    9. it writes some other accounting and system status info to daily.out. this is again only reporting and is ONLY actually present on unix networks.
    and that's all, folks.

  • [SOLVED] Script to automatically update source

    Hello,i need a script to use in a pkgbuild that can
    1)check this website http://fsinapsi.altervista.org/code/tre … 091228.zip for new version of the archive.
    2)change the pkgver if a new version is found
    3)download the archive
    Maybe it's something like this (taken from the chromium pkgbuild),but i don't know how i can modify it .. thank you.
    _bldname=chrome-linux.zip
    _bldroot=http://build.chromium.org/buildbot/snapshots/${_bldarch}
    source=('LICENSE.txt' 'chrome-wrapper.patch' "${_realname}.1.gz" "${_realname}.default"
    "${_realname}.desktop" "${_realname}.sh")
    noextract=(${_realname}.1.gz)
    # trick re-determining the build revision and, or entertain the hidden
    # makepkg option --forcever, huh
    if [ -z "$FORCE_VER" ]; then
    msg "Determining latest build revision..."
    newpkgver="$(wget -qO - ${_bldroot}/LATEST)"
    if [ -n "$newpkgver" -a "$newpkgver" != "$pkgver" ]; then
    msg2 "Version found: %s" "$newpkgver"
    FORCE_VER="$newpkgver"
    else
    FORCE_VER="$pkgver"
    fi
    fi
    if [ "$FORCE_VER" = "LATEST" -a "$SOURCEONLY" -eq 0 ]; then
    error "Plz omit '--forcever LATEST'; I'll auto-detect the LATEST ;)"
    exit 1
    elif [ "$FORCE_VER" != "$pkgver" ]; then
    rm -f "$SRCDEST/${_bldname}"
    devel_update
    fi
    build() {
    if [ ! -r "$srcdir/${_bldname}" ]; then
    msg2 "Downloading the latest '$CARCH/$pkgver/${_bldname}'..."
    wget --no-cache -c "${_bldroot}/$pkgver/${_bldname}" \
    -O "$SRCDEST/${_bldname}" || return $?
    ln -fs "$SRCDEST/${_bldname}" "$srcdir/${_bldname}" || return $?
    fi
    Last edited by Xemertix (2010-01-01 18:30:04)

    Xemertix wrote:
    tomk wrote:This is PKGBUILD abuse IMO.
    Yes i know,but this archive is updated frequently and generally there aren't major changes in the new versions,so a pkgbuild with a similar script may work well for some time...
    So would an external script which automatically updates the PKGBUILD on your machine and then uploads it to the AUR? Simplest I can think of would involve bash, wget/curl, and a bit of sed.
    You could even run every X hours if you feel like it.

  • 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')

  • 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.

  • 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

  • Open a command window and send some keystroke to the opened command window

    Hi All,
    I am trying to open command prompt and send some key stroke to that command prompt. Here I am using Robot to send keystroke. But the problem is, the keystrokes are not sent to the prompt. I guess I need to activate progamitically the command prompt to accept the keystrokes . Please find the code below ( as I did).
    try
    String command = "cmd.exe /c start";
    Process child = Runtime.getRuntime().exec(command);
    Robot robot = new Robot();
    Thread.sleep(5000);
    String lol = "indranil";
    for(int i=0;i<lol.length();i++)
    robot.keyPress(lol.charAt(i));
    int g = lol.length() - 1;
    robot.keyRelease(lol.charAt(g));
    catch (Exception e) {}
    I guess I am doing some mistake here while sending the keystroke/openning the command prompt. Can anyone please help me how can I open a command window and send some keystroke to the opened command window. I am in fix.
    Thanks,
    Indranil

    The first thing to do is read the API and examples for the Robot class.
    Also check out this thread with a similar discussion: [http://forums.sun.com/thread.jspa?threadID=5385677]
    The short spoonfed answer - keyPress() and keyReleaseI() do not take chars. Read up on KeyEvent

  • Using a script to automate UNC definition updates for FEP 2010

    Hi all,
    I tested the script mentioned in this article
    http://blogs.technet.com/b/clientsecurity/archive/2010/09/16/using-a-script-to-automate-unc-definition-updates.aspx with no success. I am getting the following error:
    Line: 11
    Char: 5
    Error: The operation timed out
    Code: 80072EE2
    Source: WinHttp.WinHttpRequest
    the script content is as follows:
    strMSEx86URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x86"
    strMSEx86Location = "D:\defs\Updates\x86\mpam-fe.exe" 
    strNISX86URL = "http://go.microsoft.com/fwlink/?LinkId=197095" 
    strNISX86Location = "D:\defs\Updates\x86\nis_full.exe" 
    strMSEx64URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x64" 
    strMSEx64Location = "D:\defs\Updates\x64\mpam-fe.exe" 
    strNISX64URL = "http://go.microsoft.com/fwlink/?LinkId=197094" 
    strNISX64Location = "D:\defs\Updates\x64\nis_full.exe"
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strMSEx86URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then
    Set objADOStream = CreateObject("ADODB.Stream")
       objADOStream.Open
      objADOStream.Type = 1 'adTypeBinary
    objADOStream.Write objWINHTTP.ResponseBody
    objADOStream.Position = 0 'Set the stream position to the Start
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strMSEx86Location) Then objFSO.DeleteFile strMSEx86Location
    objADOStream.SaveToFile strMSEx86Location 
    objADOStream.Close
    end if
    Anybody can help?

    This is the script that I use and it works:
    strMSEx86URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x86" 
    strMSEx86Location = "C:\defs\Updates\x86\mpam-fe.exe" 
    strNISX86URL = "http://download.microsoft.com/download/DefinitionUpdates/x86/nis_full.exe" 
    strNISX86Location = "C:\defs\Updates\x86\nis_full.exe" 
    strMSEx64URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x64" 
    strMSEx64Location = "C:\defs\Updates\x64\mpam-fe.exe" 
    strNISX64URL = "http://download.microsoft.com/download/DefinitionUpdates/amd64/nis_full.exe" 
    strNISX64Location = "C:\defs\Updates\x64\nis_full.exe"
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strMSEx86URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strMSEx86Location) Then objFSO.DeleteFile(strMSEx86Location)
    objADOStream.SaveToFile strMSEx86Location 
    objADOStream.Close
    End IF
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strNISx86URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strNISx86Location) Then objFSO.DeleteFile (strNISx86Location)
    objADOStream.SaveToFile strNISx86Location 
    objADOStream.Close
    END IF
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strNISx64URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strNISx64Location) Then objFSO.DeleteFile (strNISx64Location)
    objADOStream.SaveToFile strNISx64Location 
    objADOStream.Close
    END IF
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strMSEx64URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strMSEx64Location) Then objFSO.DeleteFile(strMSEx64Location)
    objADOStream.SaveToFile strMSEx64Location 
    objADOStream.Close
    END IF

  • 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

  • Script to automate stop/start listener on aix

    Hello everyone,
    We have a database on oracle 8i on aix platform and we have a scheduled restart on the db everyday. But we have been facing problem with the db restart and it gets hanged.
    As a solution, i wanted to develop a shell script that will stop the listener first before the db shut down.
    Can anyone help me please?

    If I remember correctly, example scripts to automate db and listener startup and shutdown are in the oracle 8i installation guide for your platform.
    The following should work:
    vi /etc/init.d/oracle
    ORACLE_HOME=your path to oracle home directory
    case "$1" in
        'start') 
             su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
             su - oracle -c "$ORACLE_HOME/bin/dbstart"
        'stop')  
             su - oracle -c "$ORACLE_HOME/bin/dbshut"
             su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop"
    esacThen set execute privileges on the above file:
    chmod 750 oracle
    Next add the appropriate symbolic links:
    ln -s /etc/init.d/oracle /etc/rc.d/rc3.d/K01oracle
    ln -s /etc/init.d/oracle /etc/rc.d/rc3.d/S99oracle
    ln -s /etc/init.d/oracle /etc/rc.d/rc5.d/K01oracle
    ln -s /etc/init.d/oracle /etc/rc.d/rc5.d/S99oracle
    The oracle dbstart and dbshut scripts rely on entries in */etc/oratab*, so make sure you have a "Y" in the file for yes to autostart and auto shutdown.

Maybe you are looking for

  • ERP6 upgrade, PREPARE error

    Hello! Have anyone seen this PREPARE error message before? During phase RUN_RSPTBFIL_PREP,  error message "2EETG011 Kein Upgrade aktiv". I can't find any SAP note about this specific problem. The source system is 4.6B, the target will be a non-unicod

  • Java Programming Question

    Hi,Everybody: I have a question about Java programming. If I want to write a java class code called if.java like below, how should I do to make it pass the java compiler and make it work. I know the words "if" and "for" are reserved words. I just try

  • I am 67 years old and need help this a disgusting company that they can't help the elderly with phone support

    this a disgusting company that they can't give phone support to a 67 year old woman that doesn't understand all this giberish computer

  • Is Beehive still active?

    Just curious about this project since the website hasn't been updated in a while and the latest release is from 2006-12-04. However I see that the SVN repo still has some activity. Is there a new release coming soon? BTW, I posted the same question o

  • Dynamic Authorization Failed: DiconnectNAK

    I have WLC 7.6 and ISE 1.2 Patch 6. My use case is WLAN Guest Access with CWA. I have ISE Appliance 3395 (2 Admin/Mon, 2 PSN). Everything work fine so far. But from time to time I get these strange message (it does not matter if I do a manual Session