Getting a script to work in Mail rules

I have a script that works fine in Script Editor or as a stand alone script. I would like to get it to work from within Mail rules but for some reason it doesn't want to. I have tried placing hte script within the brackets of
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
and
end perform mail action with messages
end using terms from
which I was thought to believe enabled script to work with Mail rules. If aynone has any ideas how to resolve this I would love to hear from them.
My script is as follows.
tell application "Mail"
set the_message to item 1 of (get selection)
set theSubject to the subject of the_message
if theSubject is "Nouvelle Réservation" then
set the_message to item 1 of (get selection)
set message_text to content of the_message as string
set nom to paragraph 8 of message_text
set prenom_script to paragraph 9 of message_text
set spectacle_script to paragraph 2 of message_text
set date_script to paragraph 3 of message_text
set node_placesscript to paragraph 5 of message_text
end if
end tell
tell application "FileMaker Pro Advanced"
activate
open file "xxx:Users:yyy:Documents:zzz:fichiers fp7:Import reservations script.fp7"
try
delete every record
end try
set newRecord to create record -- store the result as 'newRecord'
tell newRecord -- now target that new record
set cell "nom_script" to nom
set cell "prenom_script" to prenom_script
set cell "spectacle_script" to spectacle_script
set cell "date_script" to date_script
set cell "node_placesscript" to node_placesscript
do script "whole import process into «•_reservations»"
end tell
end tell

Hello
You need to tell application "Mail" to do its tasks. Also your original if clause is closed too soon.
So a possible fix would be as follows :
--SCRIPT1
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
my initFilemaker()
tell application "Mail" -- # required
repeat with oneMessage in theMessages
set theSubject to the subject of oneMessage
if theSubject is "Nouvelle Réservation" then -- # should enclose the rest of this iteration
set message_text to content of oneMessage
set nom to paragraph 8 of message_text
set prenom_script to paragraph 9 of message_text
set spectacle_script to paragraph 2 of message_text
set date_script to paragraph 3 of message_text
set node_placesscript to paragraph 5 of message_text
tell application "FileMaker Pro Advanced"
set newRecord to create record -- store the result as 'newRecord'
tell newRecord -- now target that new record
set cell "nom_script" to nom
set cell "prenom_script" to prenom_script
set cell "spectacle_script" to spectacle_script
set cell "date_script" to date_script
set cell "node_placesscript" to node_placesscript
do script "whole import process into «•_reservations»"
end tell
end tell
end if
end repeat
end tell
end perform mail action with messages
end using terms from
on initFilemaker()
tell application "FileMaker Pro Advanced"
open file "xxx:Users:yyy:Documents:zzz:fichiers fp7:Import reservations script.fp7"
try
delete every record
end try
end tell
end initFilemaker
--END OF SCRIPT1
Or, since I'm not comfortable with nested tell structure (tell FMP in tell Mail), I'd write something like this (with other minor changes to my preferences) :
--SCRIPT1a
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
my fmpclearrecords()
tell application "Mail"
repeat with m in theMessages
set m to m's contents
if m's subject = "Nouvelle Réservation" then
my fmpnewrecord(m's content)
end if
end repeat
end tell
end perform mail action with messages
end using terms from
on fmpclearrecords()
set a to "xxx:Users:yyy:Documents:zzz:fichiers fp7:Import reservations script.fp7" as alias
tell application "FileMaker Pro Advanced"
open a
try
delete records
end try
end tell
end fmpclearrecords
on fmpnewrecord(t)
tell application "FileMaker Pro Advanced"
tell (create new record)
set cell "nom_script" to t's paragraph 8
set cell "prenom_script" to t's paragraph 9
set cell "spectacle_script" to t's paragraph 2
set cell "date_script" to t's paragraph 3
set cell "node_placesscript" to t's paragraph 5
end tell
do script "whole import process into «•_reservations»"
end tell
end fmpnewrecord
--END OF SCRIPT1a
Not tested, for I don't have FMP for OSX.
But I see no specific reason for the above to fail except for the case that certain threading issue of script run via Mail rule interferes.
*If it still fails, check console log for specific errors.
Good luck,
H
EDIT: The object referencing in FMP seems incomplete though it might work in current form.
It would be better to specifiy complete reference such as :
-- delete records
tell application "FMP"
tell document 1
tell database 1
tell current layout
delete records
end tell
end tell
end tell
end tell
-- create new record
tell application "FMP"
tell document 1
tell database 1
tell current layout
tell (create new record)
-- omitted
end tell
end tell
end tell
end tell
end tell
--etc
Message was edited by: Hiroto

Similar Messages

  • Applescript script wont work under Mail's rules

    I have an Applescript that works perfectly for replying to certain incoming emails when it is called on manually yet when I try to set it to run automatically as part of Mail's rules in preferences, it just wont run. The other criteria within the same ruel work perfectly. It's just the Applescript that wont function. Any ideas as to what may be impeding it from working ?

    there is a known bug in apple script which hangs the script if the a mail rule makes an outgoing message. i submitted a bug report about it a couple of months ago and was told that it's a known issue.
    There is a workaround. see the post by Todd laney in [this thread|http://discussions.apple.com/thread.jspa?threadID=1226817&start=0&tstart =0].

  • How to get this script to work with different browser

    Do you guys know how to get this script to work with mozilla firefox? 
    do shell script "open -a safari 'https://login.binck.nl/klanten/Login.aspx?ReturnUrl=%2fklanten%2fdefault.aspx'"
    tell application "Safari"
      activate
              tell document 1
                        repeat until ((do JavaScript "location.host") is "login.binck.nl")
                                  delay 1
                        end repeat
      do JavaScript"document.getElementById('ctl00_Content_Gebruikersnaam').value='sim';document.ge tElementById('ctl00_Content_Wachtwoord').value='password';window.open(document. g etElementById('ctl00_Content_LoginButton').href, '_self', 'true');"
              end tell
    end tell
    Thank you so much in advance:)

    That isn't possible. Firefox's AppleScript dictionary doesn't contain anything which can be used to manage JavaScripts.
    (63741)

  • Getting self-signed certificates working with mail

    Hi all,
    I am having trouble getting email certificates created with keychain access to work in mail.
    According to the Leopard help file, you simply have to go to Keychain access and create the certificate, which I did. After that if you create a message in mail with that account, there should be an icon showing that the message will be signed or encrypted if you have the recipients certificate installed. I cannot seem to get this to work. I have created the certificates specifically for email, the certificate shows in Keychain as well as a public and private key entry, but mail refuses to see it.
    Has anyone gotten this to work with Mail and self-signed certificates?
    Any help would be most appreciated.
    Thanks,
    RacerX

    Have you tried setting the "Always trust" property? Double click the certificate in Keychain Access and allow it to have always trust for email.
    Also, make sure that bundles are enabled for mail.
    (Forget the command, google for "defaults write com.apple.mail enableBundles")
    That did it for me.
    Br,
    T

  • I keep getting a script error on yahoo mail. the page freezes up and loads and loads.

    I can sign into Yahoo okay. It happens when I try to sign out
    the page won't let me sign out. So I minimize the page and
    tried to delete the cookies and cache. It hangs on forever deleting
    history. And I get a script error message.

    Moving this discussion to the Using Flash Player forum.

  • Ideal way to report on Nested Groups and their Members - I can get the script to work if there's one group, but not if there is two or more

    Hi All,
    I like to keep track of Groups and Users added into our Domain Admins.  Yes, it should always be minimal, but if I can have a daily report just to be certain, I'll sleep better.
    The following works just fine if there is a single nested group.  I cannot get it to work properly if there is more than one.  I'm hoping you'll see what I'm missing.
    Works fine:
    $admins = get-adgroupmember "domain admins"
    foreach($i in $admins){if($i.objectClass -eq "group"){ get-adgroupmember $i.samaccountname |foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($i.name)}} | select username,group | export-csv c:\Users_and_Groups.csv -Notypeinformation}}
    Does not work well.  Result is that the "Group" information doesn't change to the correct group:
    $myCol=@()
    foreach($admin in $admins){if($admin.objectClass -eq "group"){$myCol+=$admin.samaccountname}{foreach($i in $myCol){get-adgroupmember $i | foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($admin.name)}} | select username,group
    | export-csv c:\Users_and_Groups.csv -Notypeinformation}}}
    Here is what I have in $myCol:
    PS C:\Users\Administrator> $myCol
    MarketingPSO
    RMSysAdmins
    I tried shortening up the one-liner a bit more, but for some reason the "RMSysAdmins" is the only Group listed even though Leia and Han are in the MarketingPSO Group:
    foreach($i in $myCol){get-adgroupmember $i | foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($admin.name)}} | select username,group }
    username                                                   
    Group                                                     
    Leia Organa                                                
    RMSysAdmins                                               
    Han Solo                                                   
    RMSysAdmins                                               
    c3po                                                       
    RMSysAdmins                                               
    Darth Vader                                                
    RMSysAdmins                                               
    Boba Fett                                                  
    RMSysAdmins
    Thank you very much for your time,
    Mr Mister

    Hi Mr Mister,
    To get nested group members, this script is for your reference:
    function Get-ADNestedGroupMembers {
    [cmdletbinding()]
    param ( [String] $Group )
    Import-Module ActiveDirectory
    $Members = Get-ADGroupMember -Identity $Group|sort-object objectClass -descending
    $members | % {
    if($_.ObjectClass -eq "group") {
    Get-ADNestedGroupMembers -Group $_.samaccountname
    } else {
    New-Object PSObject -Property @{ username = $_.name;Group = $Group }}
    Get-ADNestedGroupMembers "groupname"
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Can't get login script to work - tried both prefs and tty methods ...

    Calling all you script gurus ...
    I'm trying to auto-mount a sparse image on login (why? I got my 17" stolen along with the data - i'm using an encrypted image as my document repository now).
    I can't get this simple script to run using either method (modifying the LoginWindow plist OR the apple suggested method of adding the section into the /etc/ttys file.
    I've tested the script file from the terminal and all works fine.
    Any ideas?
    Thanks
    Paul
    MBP 2.1GHz, iBook 12" 1GHz, G3 PowerMac   Mac OS X (10.4.6)   Stolen Powerbook 17" S# W8505160RJ3 - reward offered

    I personally haven't had much success with the '/etc/ttys' method for specifying login hooks either...
    On the other hand, the ".plist" method has worked well for me in the past. Just in case you weren't aware, note that the the file for specifying a "login hook" via ".plist" file has changed in "Tiger" compared to "Panther". It was never the "loginwindow.plist", which is used for specifying "Login Items", but rather the "com.apple.loginwindow.plist" file, but unlike "Panther" which used "/Library/Preferences/com.apple.loginwindow.plist" (a security issue for which Apple was rightly criticized), in "Tiger" Apple wisely changed the location to a more secure directory, ie. "/private/var/root/Library/Preferences/com.apple.loginwindow.plist". The current procedures for specifying "login hooks" via ".plist" file can be found in this document:
    http://docs.info.apple.com/article.html?artnum=301446
    But as far as mounting a disk image is concerned, adding the mounted volume (rather than a script to mount the disk image) to "Login Items" should be sufficient to initiate the mounting process...

  • Can't get multiple languages to work in mail

    I used English and Dutch, and sometimes German as language on my Mac. Took me a while but I finally figured out how to use Pages with different language and subsequent speller check.
    I'm still struggling with the same in mails (gmails). I have my three input languages defined, I can toggle between the three, but when I'm typing an email no matter what language I choose, it still keeps the system language (in my case English).
    i must be overlooking something obvious, but what?
    Jeroen

    Unfortunately, this is not a proper solution:
    For example, in my MacOS (like in my iPad) I have the following languages preferences (by order):
    English
    Spanish
    Català (the language from Catalunya)
    With my Ipad, I can switch the 3 languages (while typing in Mail) easily just pushing the key on the left of the space bar.
    However, in any of my Mac computers I don't have this choice. Moreover, if I try the method mentioned above (Edit>Spelling and Grammar>Show Spelling and Grammar) I can not choose Catala (no matter it is in third position in System Preferences>Language & Text) just a standard list of main languages.
    I must agree with so many observers sayinng that "current" Apple company shows a lack of interest for MacOS and Mac computers. Too focussed on mobile/iPad benefits and stock market?.

  • Trouble getting Media Query script to work in IE8 - css3-mediaqueries.js

    This script (css3-mediaqueries.js) apparently works in IE8 based on people raving about it. But, I cant get it to work for the life of me. I included the reference tag (<script type="text/javascript" src="../js/css3-mediaqueries.js"></script>) as stated by the documentation site, but to no avail it still wont fire my media queries and scale my image at all in IE8.
    I currently have my media queries set in em increments as I want native browser support to render my text accordingly. However, I read about this being an issue with the respond.js script, but I'm not sure if the same is true for the css3-mediaqueries.js script. I have experienced IE8 crashing when both scripts were implemented (separately, of course), so something in my code is conflicting obviously, but I cant identify it.
    With that said, I included my code in a JS Fiddle here. Any help would be greatly appreciated, Thanks!

    Hi Jon,
    Although it is a good practice, validation is the least of my concerns. Google and Microsoft.com don't even validate. And infact have a ton of errors:  http://www.codinghorror.com/blog/2009/03/html-validation-does-it-matter.html. Most if not all modern browsers are equipped to handle even the worst code. I am more concerned with getting the scripts to work and validation will not fix this (I will validate later). I have validate many sites in the past with no reward, just headaches. And being that we live in a deadline driven world it is generally not good from a productivity stand point.
    With that said, could it be the ordering of my scripts and stylesheets? I am new to responsive design so I havent tested yet. I will test when I get to the office.

  • Help! Script that works in 8.1.7 does not work in 9.2.0

    I have a generic hot backup script that runs well in our 8i environment where I source the username and password for SYS from a secured txt file. However I could not get the script to work in our recently installed 9.2.0 environment.
    Below is an extract of the hot backup script:
    # Set environment
    . ${HOME}/BACKUP/${DBNAME}.env
    CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    export CONNECT_STRING
    #Define some commands and files
    SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    TIME_STAMP=`date +"%d-%b-%Y"`
    # Test for duplicate filenames
    $SQLPLUS <<-EOF
    var numfiles number;
    BEGIN
    SELECT count(*) into :numfiles
    FROM dba_data_files a, dba_data_files b
    WHERE a.file_name != b.file_name
    AND SUBSTR(a.file_NAME, INSTR(a.file_name, '/', -1) + 1)
    = SUBSTR(b.file_NAME, INSTR(b.file_name, '/', -1) + 1);
    END;
    exit :numfiles
    EOF
    FILE_ERROR=$?
    echo "Number of duplicate files $FILE_ERROR"
    if [ $FILE_ERROR -gt 0 ]; then
    echo "Aborting, ... $FILE_ERROR duplicate filenames"
    exit
    fi
    As per the extract above,
    in our 8.1.7 environment,
    (1) the command CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    will result in CONNECT_STRING=sys/xxxxxx@<sid>
    (2) the command SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    will result in SQLPLUS=/usr/oracle/product/8.1.7/bin/sqlplus -s sys/xxxxxx@<sid>
    (3) and when issue $SQLPLUS <<-EOF
    it connects fine and execute the procedure successfully.
    in Oracle 9.2.0,
    (1) the command CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    works fine with result same as in 8.1.7 - CONNECT_STRING=sys/xxxxxx@<sid>
    (2) the command SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    works fine with result SQLPLUS=/usr/oracle/product/9.2.0/bin/sqlplus -s sys/xxxxxx@<sid>
    (3) However, when issue $SQLPLUS <<-EOF returns an error:
    ERROR:
    ORA-28009: connection to sys should be as sysdba or sysoper
    How can I fix that??
    Is it because of the username/password structure (sys/xxxxxx@<sid>)??
    I would like to keep such username/password format if possible.
    I have also tried to hard coded the username/password for variable SQLPLUS as:
    SQLPLUS="/usr/oracle/product/9.2.0/bin/sqlplus -S '/ as sysdba'"
    But it still doesn't work when issue $SQLPLUS, it returns the following:
    Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
    where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
    <logon> ::= <username>[<password>][@<connect_string>] | / | /NOLOG
    <start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
    "-H" displays the SQL*Plus version banner and usage syntax
    "-V" displays the SQL*Plus version banner
    "-L" attempts log on just once
    "-M <o>" uses HTML markup options <o>
    "-R <n>" uses restricted mode <n>
    "-S" uses silent mode
    Any ideas as to how to have the script run in 9.2.0??
    Your help is much appreciated.

    Hi, I tried CJ’s suggestion; however it still doesn’t work for me.
    I tried assigning the command line to a variable, I tried to log in directly from the command line, and both don’t work (see below). What did I do wrong??
    $ SQLPLUS="/usr/oracle/product/9.2.0/bin/sqlplus -S \"sys/xxxxxx@<sid> as sysdba\""
    $ echo $SQLPLUS
    /usr/oracle/product/9.2.0/bin/sqlplus -S "sys/xxxxxx@<sid> as sysdba"
    $ $SQLPLUS
    Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
    where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
    <logon> ::= <username>[<password>][@<connect_string>] | / | /NOLOG
    <start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
    "-H" displays the SQL*Plus version banner and usage syntax
    "-V" displays the SQL*Plus version banner
    "-L" attempts log on just once
    "-M <o>" uses HTML markup options <o>
    "-R <n>" uses restricted mode <n>
    "-S" uses silent mode
    $ sqlplus "sys/xxxxxx@<sid> as sysdba"
    SQL*Plus: Release 9.2.0.4.0 - Production on Wed Mar 24 08:53:05 2004
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    ERROR:
    ORA-01031: insufficient privileges

  • Script that works in 8.1.7 does not work in 9.2.0

    I have a generic hot backup script that runs well in our 8i environment where I source the username and password for SYS from a secured txt file. However I could not get the script to work in our recently installed 9.2.0 environment.
    Below is an extract of the hot backup script:
    # Set environment
    . ${HOME}/BACKUP/${DBNAME}.env
    CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    export CONNECT_STRING
    #Define some commands and files
    SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    TIME_STAMP=`date +"%d-%b-%Y"`
    # Test for duplicate filenames
    $SQLPLUS <<-EOF
    var numfiles number;
    BEGIN
    SELECT count(*) into :numfiles
    FROM dba_data_files a, dba_data_files b
    WHERE a.file_name != b.file_name
    AND SUBSTR(a.file_NAME, INSTR(a.file_name, '/', -1) + 1)
    = SUBSTR(b.file_NAME, INSTR(b.file_name, '/', -1) + 1);
    END;
    exit :numfiles
    EOF
    FILE_ERROR=$?
    echo "Number of duplicate files $FILE_ERROR"
    if [ $FILE_ERROR -gt 0 ]; then
    echo "Aborting, ... $FILE_ERROR duplicate filenames"
    exit
    fi
    As per the extract above,
    in our 8.1.7 environment,
    (1) the command CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    will result in CONNECT_STRING=sys/xxxxxx@<sid>
    (2) the command SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    will result in SQLPLUS=/usr/oracle/product/8.1.7/bin/sqlplus -s sys/xxxxxx@<sid>
    (3) and when issue $SQLPLUS <<-EOF
    it connects fine and execute the procedure successfully.
    in Oracle 9.2.0,
    (1) the command CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    works fine with result same as in 8.1.7 - CONNECT_STRING=sys/xxxxxx@<sid>
    (2) the command SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    works fine with result SQLPLUS=/usr/oracle/product/9.2.0/bin/sqlplus -s sys/xxxxxx@<sid>
    (3) However, when issue $SQLPLUS <<-EOF returns an error:
    ERROR:
    ORA-28009: connection to sys should be as sysdba or sysoper
    How can I fix that??
    Is it because of the username/password structure (sys/xxxxxx@<sid>)??
    I would like to keep such username/password format if possible.
    I have also tried to hard coded the username/password for variable SQLPLUS as:
    SQLPLUS="/usr/oracle/product/9.2.0/bin/sqlplus -S '/ as sysdba'"
    But it still doesn't work when issue $SQLPLUS, it returns the following:
    Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
    where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
    <logon> ::= <username>[<password>][@<connect_string>] | / | /NOLOG
    <start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
    "-H" displays the SQL*Plus version banner and usage syntax
    "-V" displays the SQL*Plus version banner
    "-L" attempts log on just once
    "-M <o>" uses HTML markup options <o>
    "-R <n>" uses restricted mode <n>
    "-S" uses silent mode
    Any ideas as to how to have the script run in 9.2.0??
    Your help is much appreciated.

    My first comment is that even though you are using a secure encrypted text file, putting the SYS password on the command line can make the password available to anyone on the server who can perform a ps command:
    shvec320 ECD2 /u01/home/oracle/cronscripts $ sqlplus mark/mark4s@dbnm
    SQL*Plus: Release 8.1.7.0.0 - Production on Wed Mar 24 16:47:17 2004
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - Production
    SQL> !ps -ef | grep mark
    oracle 25494 25078 0 16:47:17 pts/4 0:00 sqlplus mark/mark4s@dbnm
    oracle 25497 25494 0 16:47:23 pts/4 0:00 grep mark
    Consider putting the connect string in the SQL script:
    sqlplus /nolog <<-EOF
    connect ${CONNECT_STRING}
    var numfiles number;
    BEGIN
    SELECT count(*) into :numfiles
    FROM dba_data_files a, dba_data_files b
    WHERE a.file_name != b.file_name
    AND SUBSTR(a.file_NAME, INSTR(a.file_name, '/', -1) + 1)
    = SUBSTR(b.file_NAME, INSTR(b.file_name, '/', -1) + 1);
    END;
    exit :numfiles
    EOF
    Starting in Oracle 9 (others will correct me if I am wrong) you cannot connect to the sys account without specifying as SYSDBA or SYSOPER.
    My testing (9.2.0.3) resulted in your ORA-1013 using "sys/password@dbname as sysdba". Using "sys/password as sysdba" works just fine. I seem to remember if you want to use @dbname, you will need to use password file authentication instead of OS authentication.
    My suggestion -if possible - is to use plain "connect / as sysdba" in your SQL Script and have ORACLE_HOME and ORACLE_SID set correctly in your environment (do it in ${HOME}/BACKUP/${DBNAME}.env) :
    sqlplus /nolog <<-EOF
    connect / as sysdba;
    var numfiles number;
    BEGIN
    SELECT count(*) into :numfiles
    FROM dba_data_files a, dba_data_files b
    WHERE a.file_name != b.file_name
    AND SUBSTR(a.file_NAME, INSTR(a.file_name, '/', -1) + 1)
    = SUBSTR(b.file_NAME, INSTR(b.file_name, '/', -1) + 1);
    END;
    exit :numfiles
    EOF
    HTH

  • Can't get out.print to work with XML jsp tags

    <jsp:scriptlet>
    if(ErrorTrap == true) {
         out.println("<tr><td colspan=\"center\" align=\"center\">There was" an error while processing the form</td></tr>");
         ErrorTrap = false;
    </jsp:scriptlet>
    I can't get this script to work with the XML stype jsp tags. It keeps telling me the <jsp> tags are untermintaed. Is there a special trick to fix this or do I have to use the non-XML type tags?

    Sorry, I didn't mean to put the extra " in the out.println text string. :-/

  • JQuery script not working after DW update

    After updating to the latest DreamWeaver Version 12 build 5861 a jQuery script for collapsible panels no longer works.
    I had used the script many times in the past few years on various sites and when I open the html and php pages I created in the past the script still runs in Live View and as a web page.
    As I mentioned above since I updated to build 5861 the script no longer works for any new pages I create. I used FireFox view source to confirm the links to the jQuery engine and the actual script are correct. I have placed the engine script link above the actual script, as well as deleted additional links to other engines used by other plug-ins.
    Any thoughts would be appreciated.

    I discovered the cause but not the solution.
    After the update and the creation of a new site the first element I created involved a jQuery script and when I went to check it's functionality it failed. I have been mostly obsessing on getting various scripts to work. As I mentioned if I placed the code in the head all was fine, if I linked to a script file it failed and according to FireFox view source the html was linked to the file.
    Well a few minutes ago I bypassed the script issue and placed an image in a document and saw that Dreamweaver wrote the code as a absolute path to the image rather than a relative path.
    Before the update DW accepted a relative path for the scripts such as:
        <script type="text/javascript" src="scripts/diQuery-collapsiblePanel.js"></script>
    After the update I can get the scripts to work if I enter absolute paths:
        <script src="http://localhost/panel/scripts/diQuery-collapsiblePanel.js"></script>
    The funny thing is that the CSS files work fine with relative paths.
    I thought perhaps I set the site up incorrectly and had the links referencing the Site Root instead of the document but thats not the case. It is set to Document and should be creating Relative paths to images.
    I can not see any other Preference settings involving the way paths are written. I would really like to get back to Relative paths for all elements.
    Any thoughts?

  • Applescript to activate a Mail rule

    Hi I have set up an out of office rule for someone in our studio but it needs to be activated and deactivated every Monday. I have CronniX which can handle the activation of the script but i'm banging me head trying to find a script that activates a Mail rule they all seem to be the other way round. (rule activating the script)
    Any help is appreciated.
    Thanks

    This is exactly what I need as well, could you share the link. I've registered for MacScripters now, but I haven't received my password, so I can't seem to search.

  • Mail rule no longer works - how 2 debug?

    i have a mail rule which takes an attachment & sends it on to an fba for further processing (via a do shell call) then moves the mail to a done folder.
    my shell script works perfectly when invoked from the cli, but doesn't seem to even get called from the mail rule (which used to work under tiger)
    and since "perform mail action with messages" doesn't allow interaction, i can't salt my script with display dialogs to debug...
    so where does mail rule output go? is there an error log somewhere? console shows nothing...

    on a hunch i added a delay right after i saved the attachment...that fixed it.
    but i still don't have a way of seeing what's going on in a mail rule script.

Maybe you are looking for

  • Bootcamp drivers Windows 7 (64 bit)

    I had my mac replaced because of a screen defect... for some reason after installing windows 7 back on it I cant seem to get the boocamp drivers to work properly. The closest I got was having my keyboard lit all the time but no buttons were working..

  • Systemmessage variable screen

    Dear all, We are using IP with variables, there is an authorization check for these variables. We want to change the message, instead of a warning we would like to see an error message, this has been changed since the last technical upgrade. Does any

  • EREC: Questionnaire ranking or matching results not showing

    Hello experts, Currently implementing EREC 6.00, EHP4, and in the Recruiter Dashboard, when reviewing the assignments of applicants to a requisition, the match results (column match) is blank ... no stars are been shown. I reviewed the configuration

  • IPad Mini 3 Yellow Screen Hue

    I was curious if anyone else has gotten the mini 3 with the bottom half of the screen being yellow in hue.  Seems most notable when you are scrolling on safari with white background and text is flowing from one side of the device to the other.

  • Can I change where files are stored

    Is it possible to change from storing files in the Aperture library to storing them in a referenced library? Thanks Kent