Scripting Automator

Hello,
I have an automator app that I want to script. Everything I have tried only opens the application but won't run it. I am on 10.5.
Here is the latest I have tried:
tell application "Automator"
    activate
    open "path:to:the:script"
    end tell
Thanks,
Randal

I created an application using Automator, called it "auototest" and saved it to my desktop, the app for the test just creates a simple text file on the desktop, I run the below, which activates my app, and the app does it's thing.
tell application "autotest"
activate
end tell
taking what you say "Everything I have tried only opens the application", and seeing the word "Automator" in your code leads me to believe your telling the "Automator" app it's self to activate and not your application created from Automator.
Budgie
Message was edited by: Budgie

Similar Messages

  • Script/Automator Get Filenames in Folder and Move Each File into Folder based on Filename?

    I have searched for an answer to this and I have searched through multiple file renaming apps on the app store too but alas I cannot find anything that does what I want so I ended up looking into Automator as my saviour but I am a total NOOB.
    What I want to do is point automator to a folder of my choosing
    Automator then takes each file in that folder and creates a folder with the same name as the file and then move the file into that subfolder.
    Sounds easy enough eh
    I'm totally stumped, anyone have any guidance ???

    This is a PITA to do in automator - automator does not handle loops the way it should - but in applescript it looks like so (open this in the applescript editor, select the file you want to run it on in the Finder, then run the script):
    tell application "Finder"
              set mainFolders to the selection
      -- selection returns as a list, so even if there's only one folder a loop is used
              repeat with thisFolder in mainFolders
      --get the folder's contents
                        set containedItems to every item of thisFolder
                        repeat with thisItem in containedItems
      -- get name of file, add 'ƒ' to avoid name conflicts
                                  set newFolderName to (displayed name of thisItem) & " ƒ"
      --make folder, move item
                                  set newFolder to make new folder at thisFolder with properties {name:newFolderName}
      move thisItem to newFolder
                        end repeat
              end repeat
    end tell

  • UPK for Test Script Automation in PeopleSoft 9.0 or 9.1 SCM

    I would like to see if anyone has experience in the setup of UPK for automated testing. We are about to do an upgrade from 8.8 to 9.0 or 9.1 and would like to use the pre-delivered content provided by Oracle. I have heard the scripts can be run automatically with UPK or a integration to HP Quality center. I am interested to know what the skill set or classes are to fully know how to do this or if there is a red paper on the subject. Also I would like to know how long does it take for the predelivered content to be available for a new release like 9.1 tentatively to be release this September as a GA.
    Any help would be very appreciated with this subject as the use of this around maintenance packs and upgrades in the future can greatly reduce the costs of ERP ownership.
    Thank you,
    Sean

    Sean,
    UPK is not a automation tool. Its just for training purposes. If you need a automated testing tool I suggest QuickTest Professional or if your budget is tight you could do what we do and use an open source solution called Watir (Ruby driving it) to execute your automated UI tests.
    -Cory

  • OSB Business Service Scripted Automation Testing

    Hi,
    The dilemma I am facing is to create some sort of automated process of testing of Business Services created in OSB, perhaps via ANT and Phyton, to be used as verification after deployments by deployment team. I am trying to have the scripted process to run certain request payloads from specified location against business services and compare the results with expected responses stored in some directory and report the health of the business services, based on this comparison.
    I appreciate any help in advance.

    Thank you so much for your response Pierluigi, but one other dilemma I have is not to install any application on any of the domain and achieve this through some sort of perhaps ANT and/or Phyton script, since I am not allowed to install any thing on production servers.
    Thanks,
    Mani

  • Script automated ESA version 8.5.6 configuration backup.

    I have automated script to:
    1) SSH into ESA
    2) Generate configuration file
    3) Back it up.
    The script works fine until I did the upgrade in the past weekend, what I found is that now on version 8.5.6, the command "saveconfig no" is restricted to "cluster mode", and I need to find a way to insert "y" into my script,
    here is my script, any suggestion to fix it? thanks.
    FILENAME=`ssh -l xxx -i /home/xxx/.ssh/id_rsa $HOSTNAME "saveconfig no" | grep xml | cut -f 3 -d " "`
    scp -i /home/xxx/.ssh/id_rsa xxx@$HOSTNAME:./configuration/$FILENAME /usr/tftpboot/tftp/ironport
    Leo Song

    Hi
    i fixed this Problem with:
    ... $HOSTNAME "clustermode cluster; saveconfig no"
    Regards
    Martin Annen

  • Shell script, automator and file permissions

    We have an environment where, that when a user creates a folder on a network vol, it is owned by them and no one else has access to it. They then place a folder structure from there local HD into that folder they just created on the server. You would think a simple get info window with the user changing the permissions to include all would actually change all the file permissions in the enclosed folder, but it doesn't. I have a simple script written in automator using /bin/bash that is supposed to change the permissions in every folder and file to rw for all (user, group and everyone). It doesn't seem to be working correctly all the time for a few users.
    for f in "$@"
    do
    chmod -R 777 "$f"
    done
    I have tried this as well
    for f in "$@"
    do
    chmod -R a+rw "$f"
    done
    But that should be pretty much the same thing.
    Something i have noticed is the users with the most problem are running 10.4.11, while the script was written in 10.5. Also the users that are having the problem dont seem to have the same get info window as the rest of the 10.4.11 users, it very closely resembles 10.5, with some minor differences. It seems they are missing the groups or something. This might be more or less than an issue than I realize.
    http://picasaweb.google.com/tiemmothi/UserPermissions?feat=directlink
    the 10.4 window in question is "the offender" and
    "Mine" is 10.5

    *Access Control List* entries are in addition to the regular POSIX permissions. They are not required, but add finer levels of access control. Setting the regular permissions to read/write for everyone should work unless there are ACL entries which allow additional access - you can see ACL entries and extended attributes with/bin/ls -le@d /path/to/some/folder
    An inherited ACL entry to allow everyone read/write access would look something likechmod -R +a "everyone allow list,addfile,search,delete,add_subdirectory,delete_child,readattr,writeattr,chown,file_inherit,directoryinherit" /path/to/some/folderA users */Public/Drop Box* folder has similar entries.

  • Script Automation of VM in SCVMM 2012 R2 Rollup 1 - Cannot retrieve Mac Address

    Hi All.
    I am creating a script for automation of VM
    I have run into a problem, I get my vm created as it should( at least I think so) I can boot the machine and in there I see a MAC Address from the console view, I know the machine has a mac address.
    I have tried to get my mac address like this, the result is blank
    Get-SCVirtualNetworkAdapter-VM$VMName|SelectMACAddress
    $ShowMacAddress.MACAddress
    But if I go into the SCVMM Management console, and right click on my newly created machine and click refresh, my Mac Address suddenly shows up.
    I have tried this link, but it does not work for me
    http://social.technet.microsoft.com/Forums/en-US/2e312c16-1369-4f9e-8be3-9fbef697adf5/scvmm-get-mac-address-of-new-vm?forum=virtualmachingmgrhyperv
    Please help me, I am stuck
    Ricco
    Ps. do I need to post the rest of my script?
    http://social.technet.microsoft.com/Forums/en-US/2e312c16-1369-4f9e-8be3-9fbef697adf5/scvmm-get-mac-address-of-new-vm?forum=virtualmachingmgrhyperv

    If you are trying to get this information immediately after the VM creation, VMM may not have the information. To my understanding, once the VM is created and the VMM get the updates while refreshing the VM, these updates will get updated.
    As a workaround, you could initiate a refresh immediately after the VM creation and then query the MAC.
    Refresh-VM VMName
    After a successful refresh, you should be able to query the mac address.
    Optimism is the faith that leads to achievement. Nothing can be done without hope and confidence.
    InsideVirtualization.com

  • Scripting automated image resizing

    Hi,
    Could someone help me with the following script creation, or point me in the direction of where I might learn how to create a script for the following?
    I have X number of .psd files that are all at 2048x2048 pixels.
    I want to automate the resizing of all of the .psd files to 5 inchesx 5 inches at 300 pixels/inch resolution, and then also automate the creation of a .jpeg for each .psd image.
    Edit:
    I also want to incorporate automation of output to a specific folder (so all the .jpegs will be going to a seperate folder from the parent .psd files).
    Thanks!

    For Photoshop Scripting advice I would recommend
    Photoshop Scripting
    and
    PS-Scripts

  • TCL Script: Automated extended ping (from traceroute results)

    This is my very first post on this (or any) forum. The reason behind my posting is because I have yet to find any script for automated ping on Cisco TCL Shell.
    Most of the post found on are always with a static ip addresses thus it does not really make the task easier. Most of the TCL ping script usually will look like this:
    foreach address {
    8.8.8.8
    8.8.4.4
    } size {
    1500
    1000
    } { ping $address re 10 si $size
    The script below has been tested on several router series. Seems the script can run smoothly, but some IOS version will not. If such happen, maybe the IOS of the device can be upgraded? Still has to be explored. Anyway, enjoy the script below, with simple comments listed on almost every line.
    Constructive comments are most welcome.
    Note: Once the script has been created, you can run the script by entering the command "tclsh flash:ext_ping.tcl"
    puts [open flash:ext_ping.tcl w+] {
    ###### Writes the whole script into a file ext_ping.tcl into the flash. allows the script to be reused again and again ######
    ###### Just me being vain here. :) ########
    puts "\n"
    puts "\n"
    puts "\n"
    puts "=========================================FYI============================================="
    puts "  This script allow you to perform an extended ping on each and every hop (traceroute)."
    puts "    If there is an error, most probably you have incorrectly entered a wrong value."
    puts "              When error occur, please try running the program again."
    puts "         WARNING: This program will not be invoke if someone else is using it."
    puts "                               Script created by Syam"
    puts "=========================================FYI============================================="
    ###### Displaying a line, while waiting for a user input ######
    puts -nonewline "Test to which IP address? (input IP address): "
    ###### Flushing out any keyboard input before this, allowing the device to capture new keyboard input ######
    flush stdout
    ###### Keyboard input is set into the variable ping_ip ######
    set ping_ip [ gets stdin ]
    ###### IF-loop, checking if IP address was entered correctly. Else, it will prompt user for a new input ######
    if {[regexp { ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]*)} [lindex $ping_ip 0] complete_string incorrect_input] != 1 } {
        puts "\n"
        puts "Your entry has error. Please re-input correctly (Key in the IP address without any mistakes)."
        puts "\n"
        puts -nonewline "Test to which IP address? (input IP address): "
        flush stdout
        set ping_ip [ gets stdin ]
        puts "You entered IP address $ping_ip for testing."
        puts "\n"
    } else {
        puts "You entered IP address $ping_ip for testing."
        puts "\n"
    ###### This loop is not perfect. it sees the IP address as a string, not a set of IP numbers. This causes the command to not run smoothly #####
    ###### Displaying a line, while waiting for a user input ######
    puts -nonewline "State the desired number of repeats for extended ping (Maximum 1000):  "
    ###### Flushing out any keyboard input before this, allowing the device to capture new keyboard input ######
    flush stdout
    ###### User input is set into the variable ping_repeats ######
    set ping_repeats [ gets stdin ]
    ###### IF-loop, checking if the repeat value was entered correctly. Else, it will prompt user for a new input ######
    if {$ping_repeats > 1001} {
        puts "\n"
        puts "Your entry $ping_repeats is too much."
        puts -nonewline "Please input a value of maximum 1000: "
        flush stdout
        set ping_repeats [ gets stdin ]
        puts "You entered $ping_repeats ping repeats."
        puts "\n"
    } else {
        puts "You entered $ping_repeats ping repeats."
    ###### This loop can be further improved. It allows non-integer to be seen as true value ######
    puts "\n"
    ###### Displaying a line, while waiting for a user input ######
    puts -nonewline "State the desired number for the size of ping packet (at least 100):  "
    ###### Flushing out any keyboard input before this, allowing the device to capture new keyboard input ######
    flush stdout
    ###### User input is set into the variable ping_repeats ######
    set ping_packet [ gets stdin ]
    ###### IF-loop, checking if the packet size value was entered correctly. Else, it will prompt user for a new input ######
    if {$ping_packet < 100} {
        puts "\n"
        puts "Your entry $ping_packet for ping packet size is incorrect."
        puts -nonewline "Please input a new value of at least 100: "
        flush stdout
        set ping_packet [ gets stdin ]
        puts "You entered $ping_packet ping packet size."
        puts "\n"
    } else {
        puts "You entered $ping_packet ping packet size."
    puts "\n"
    puts "Traceroute will now commence."
    ###### perform a traceroute base on the user input $ping_ip and set the output of the whole traceroute into variable tracert #######
    set tracert [exec "traceroute $ping_ip numeric probe 1"]
    #### display the $tracert variable ####
    puts $tracert
    puts "\n"
    puts "Performing extended ping to each traceroute hop"
    puts "\n"
    puts "\n"
    puts "========================================================= "
    puts "======================== Results ========================"
    puts "========================================================= "
    ### Because the traceroute output has several lines, this will split each line and correctly number each line beginning with 0. #####
    set hop_result [split $tracert "\n"]
    ##### Create FOR-loop of up to 33 lines. Begin with line 3 and increment with every loop ####
    for {set trace_line  3} {$trace_line < 33} {incr trace_line} {
          #### IF-loop, compare if each line of the traceroute has a HOP number. If no hop number, it will exit loop ####
          if {[regexp { ([0-9]*)} [lindex $hop_result $trace_line] complete_string hop_number] == 1 } {
            #### IF-loop, compare if each HOP number does not have an IP address and exits loop. Else, it will perform a simple ping test based on that IP address ####
                      if {[regexp { ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]*)} [lindex $hop_result $trace_line] complete_string ip_in_hop] != 1 } {
            } else {
                puts "\n"
                puts "Checking if $ip_in_hop can respond to ICMP ping."
                set output [exec "ping $ip_in_hop repeat 4 size 100" ]
                ##### IF-Loop, when the ping command is successful, it will perform extended ping test. Else, it will exit loop and goes to next traceroute output line#####
                if {[regexp {!} $output]} {
                    puts "IP address $ip_in_hop is responding to ICMP ping."
                    ############ proceed with the extended ping test of traceroute hop value ###########
                    set final_output [exec "ping $ip_in_hop repeat $ping_repeats size $ping_packet" ]
                    puts $final_output
                                          } else {
                        puts "\n"
                        puts "IP address $ip_in_hop is not responding to any ping responses"
    ###### close (for loop) #######
    puts $tracert
    puts "========================================================= "
    puts "====================== End Results ======================"
    puts "========================================================= "
    ###### End of File ext_ping.tcl creation ######

    Something like this should work:
    foreach vrf [list "CUST1" "CUST2"] {    set ips [list]    set output [exec "show arp vrf $vrf | inc Internet"]    foreach line [split $output "\n"] {        lappend ips [lindex $line 1]    }    set output [exec "show ip route vrf $vrf | inc /32"]    foreach line [split $output "\n"] {        if { [regexp {([\d\./]+)/32 \[} $line -> ip] } {            lappend ips $ip        }    }    foreach ip $ips {        set output [exec "ping vrf $vrf $ip rep 10"]        if { [regexp {!!!!!!!!!} $output] } {            puts "$ip   ****** PASSED $vrf *******"        } else {            puts "$ip ****** FAILED $vrf ******"        }    }}

  • How to delete a script/Automator thing I can't find?

    So a while ago I was trying to resize a big batch of images to make them all the same size, and I did this using Automator (I think) and tutorials online. I believe I made a workflow called "Batch Resize" that was supposed to resize a folder of images. It ended up not working, but it has been bugging the crap out of me ever since.
    I cannot for the absolute LIFE of me find the workflow anywhere. It doesn't show up in the Automator app, in spotlight, anything. It's like it doesn't exist. However, I know it does exist because every time I drag something to the desktop or away from the desktop, I get these little pop up things:
    They come up at the same time. The top thing is a little gear that spins and asks for batch resize finder items. Also, a Finder window comes up and asks me to choose the images to resize. How do I make this feature go away when I can't find the file that causes these things to happen? Is there anywhere it might be hidden?
    Thanks.
    ~Mac User #1000

    to disable the Folder Action, open the Folder Actions Setup app (you can get that by right-clicking on a finder folder and choosing it the the settings submenu) and remove or disable the folder action.  it seems to be attached to the desktop.
    to get rid of the folder action workflow itself, look in ~/Library/Workflows/Applications/Folder Actions.  This folder is not indexed by default, which is why it doesn't show up in spotlight.

  • Script/Automator action/CSS to change text encoding?

    As an expat Israeli, I read an Isareli newspaper online every day. Most pages on their site <http://www.haaretz.co.il> display fine with the text encoding set to Default. Some, though, forget that Hebrew is written right-to-left, and insist on displaying everything backwards, which makes it a bit hard to read.
    To get such a page to display correctly I need to change the text encoding to Hebrew (Windows). However, it gets a bit boring to go to the View menu, scroll down to Text Encoding, then scroll down again to Hebrew (Windows), especially when I have to do it several times a day.
    So, I thought automating this procedure would be the way to go. Problem is I cannot find either Automator actions or Applescript Dictionary items that relate to text encoding.
    Skating on thinner ice, I think a style sheet could help tell Safari to display a page with the right text encoding, but:
    1. I have no idea how to write such a style sheet.
    2. When I looked at the source HTML of a page that displays correctly, and one that doesn't, I find that both include the following tags:
    charset=windows-1255 (inside a larger META tag), and
    <META HTTP-EQUIV="CONTENT-Language" CONTENT="he">
    These are the tags that, I thought, would allow me to distinguish between a "good" page and a "bad" one. But if both contain the same tags...
    Any ideas on how I can automate this text encoding switch?
    TIA,
    Gidi
    iMac G5   Mac OS X (10.4.8)  

    I agree with you that the authors are doing something
    not exactly kosher. But if I will complain, I know
    their knee-jerk response: Ahhh, you're using a
    Mac...
    I don't see how a windows browser could display it correctly either. Win-1255 has to be logical order, and they probably have some guys composing articles in visual order and then copy/pasting them into the Win-1255 pages without paying attention.

  • AE stabilizing, with script - automation - ?

    hello
    i have a question to the stabilizing option in ae...
    i´m looking for some kind of automation for a filmproject...evrything is shot to zoom in 8%. is it possible to zoom in 8% and stabilize whats automaticly possible?
    i know this is not the way to work with stabilisation- cause its important to have a personal look on it, but the material has to be scaled 8%. evrything is handheld, so this could be yoused tho smoth it a bit?
    thank you for youre help
    cw

    Warp stabilizing a shot depends on the shot. You can't setup a bunch of standard values and have them work for every shot. Can't be done. Each shot must be evaluated and then you must make adjustments based on that specific shot to optimize the shot. Once the shot is optimized it is a very wise workflow to render an digital intermediate for use in the rest of your project. Everything will go better if you do that.

  • Export scripts automation windows 2003 server

    i want some automatic export scripts that run a specific time on daily basis
    My platform is windows
    My Database is oracle 10g
    Please help

    1002643 wrote:
    i want some automatic export scripts that run a specific time on daily basis
    My platform is windows
    My Database is oracle 10g
    Please helpcreate *bat file & schedule using AT utility                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Oracle Open script - Automation of Oracle CRM with oracle configurator

    Hi
    I'm facing any issue when recording the Order creation using Open Script (Functional testing)
    as per Oracle CRM functionality while creating an order it launches a configurator to chose the relavent features against an order.
    I'm getting problem when the configurator is launched , the configurator page is slowing down and no response most of of the time and not able to record single order cretion
    Please suggest , is there anything that I need to disable /enable in the Open script or any other place so the configurator works normally
    Note, when I create an order manually (without Open script) the configurator behaves absolutely fine and working with its optimum speed.
    Regards
    Kishore Vedam

    Hi Raj,
    thank you for your answer.
    I can only hope that the new version of OpenScript will support the newest JRE and that it's going to be released soon.

  • Software/script/automator to change the desktop image periodically

    Hello,
    Right now Mac OSX has the great feature that allows you to change the desktop image at max once a day. I would like to have an image changed once every two days. Then I would like that image to re-appear after 1 week. Then after a month. And then after 4 month.
    Little more to what OS X can do.

    I got this from this [little apple tutorial|http://www.apple.com/applescript/features/system-prefs.html]. it explains how to script system preferences (to the extent that it's scriptable).
    if you run
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    tell application "System Events"
    -- GET DESKTOP PICTURE SETTINGS
    tell current desktop
    get properties
    --> returns: {display name:"Color LCD", random order:false, pictures folder:file "Mac OS X:Library:Desktop Pictures:", picture rotation:0, class:desktop, change interval:60.0, picture:file "Mac OS X:Library:Desktop Pictures:Aqua Blue.jpg"}
    end tell
    end tell
    </pre>
    it will list the properties of the current desktop and *change interval* is one of them.
    you can also get it from the apple script dictionary for System Events.

Maybe you are looking for

  • Unable to insert data in to database

    public String button1_action() { // Add your event code here... String pid = (String)textField1.getValue(); String pnam = (String)textField2.getValue(); String pjob = (String)textField3.getValue(); String pfre = (String)textField4.getValue(); try { /

  • Why do I have white horizontal lines on my Macbook Pro Retina?

    When I am using my 15" Macbook Pro, there are often white horizontal lines that run across the screen. It usually happens when I am watching a video, typing, scrolling or just sitting on the desktop. There are days where the screen is perfect and the

  • "photo cart" & MobileMe (iWeb)

    i know this is more of a MobileMe ? i posted it there too, but you here w/the iWeb area are soo handy and smart so i tried to iChat w/a MobileMe expert but he didn't know squat! i am a photographer and i really need a "photo cart" because my current

  • My Numbers-program is blocked I can't use and can'tt close it

    Dear Apple Support Communities Thank you for your support. Now the program is not blocked more . I can create new spread sheets, work in them and save them, but I can't enter the old and work on them. When I, as advised, copy them to work on the copy

  • Db function returning three db number columns...

    Hi , Is it possible a db function to return three number columns fetched from a table...?? If for example , there is a db function such as...: function x return number is begin select number_col_1 , number_col_2 , number_col_3 into var1 , var2 , var3