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

Similar Messages

  • 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

  • Html wont work under transp. swf i DIV

    hello,
    I ve made at flash box in a DIV , its a banner which come in on top of the website and then goes out again. with the code:
    #bannerParent {
    position:relative;
    width:980px;
    #bannerMaker {
    display:block;
    height:400px;
    position:absolute;
    right:0;
    top:0;
    width:400px;
    z-index:1000;
    and
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="400" height="400" id="shortdiscount" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="movie" value="shortdiscount.swf" /><param name="quality" value="high" /><param name="scale" value="exactfit" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /> <embed src="shortdiscount.swf" quality="high" scale="exactfit" wmode="transparent" bgcolor="#ffffff" width="400" height="400" name="shortdiscount" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
    </object>
    But the html menu, which is under the SWF, which comes into the scene, and then goes out again, wont work. Like the swf still is there.
    any tips for this one??

    Which one are you talking about? If it is the first one (blue, magnifying glass) why not add the padding to the text?
    You can wrap the swf in its own div and float the div...
    Gary

  • Interactive Booklet purchased wont work under iTune 7

    Interactive Booklet purchased won't work under iTune 7....
    I have two albums that I bought with iTune previously that contains interactive booklet, when I click on them, nothing happen.
    -T

    Here's a new addition to Apple's knowledgebase that might prove helpful:
    http://docs.info.apple.com/article.html?artnum=304388
    eMac   Mac OS X (10.4.7)  

  • Script wont work after building/burning dvd

    Hi everyone,
    I have a problem with a HUGE dvd-project I'm working on at the moment. It's a compilation dvd with 50 different short videos and approximately 55 menus. a large part of the 50 videos is connected through the menus with 201 unique buttons.
    First I made different stories to be sure the viewer gets directed to the menu he/she came from when a video ends. But because the project became too big (99 tracks and or stories is the maximum) I got into scripting.
    I thought I actually managed to write the right scripts, but now it seems that a stand alone dvd-player doesn't recognize the scripts. Every time a video ends or I use the menu button on the remote control the (first) main menu appears.
    *So my question for all the friendly folks out there on the other end of the glass fiber-cable is: What can I do to make it work? Is this a problem someone recognizes? Is it my scripting? Is there a way to work around scripting?*
    If you need more info please let me know. I wanted to keep it as short as possible at first, but I can elaborate some more if needed.
    thanks in advance
    ciao!

    As already said, the pre-scripting is usually the culprit... and as StudioX said, I \did leave much of the detail out in that article, which was intended to build on from other sources, such as the manual!
    If you remove the setting which puts the scripts as prescripts, and be explicit with the menu jumps (i.e. write them out in full each time and don't rely on 'current item' and dividing by '32'), then the scripting should work.
    Additionally, the script lines you quote in your prescript may not work, depending on where you are in the disc when they are run. The very first script you create will have a value of 63489, which when you divide by 32 gives just over 1984, so will be rounded to either 1984 or 1985. Since this does not equate to any menu item then the jump cannot work, since GPRM3 will never be equal to '1'. As a result the disc reverts to the main menu.
    To make this more reliable you need to work out the value of the last item, which if it is track or story 1 will be 49280. Story 2 in track 1 will be 49408, story 3 49536. This continues even if you then go to a new track. Knowing this the maths then to get to a menu is easier.
    If you 'get last item' and know that you are coming from a track or story then you can subtract 49280 and divide by 128. If you are on track or story 1 then the result is zero. Otherwise it is going to be 1, 2, 3, etc. If you know which clips you access from each menu then you can add a series of 'if' statements, for example:
    Jump menu1 If (GPRM3 <= 20)
    Which would mean anything up to your first 20 clips would send you back to menu1.
    You can then add in the button jump before this statement and you should be getting closer to what you need.

  • Insipre 7700's (Side-Left connection wont work under direct-7.1 mix)

    Hi all
    I just noticed today my side left speaker wasnt working.. well first I thought it might be the speaker so I checked all connections and the terminal wire behind speaker and all is good. So I do some channel test on the THX setup program and it doesnt work.. I switch the speaker with rear left, and the speaker works but then whatever is plugged into the side left connector behind the subwoofer doesnt work. So its not the speaker but the sub side left connector thats not working it seems..
    any ideas how I can fix this or do I have to get a replacement? No matter is plugged in the side left it wont work
    thnx

    Hey man, I have the exact same problem. ONly I can get all the speakers to work but not all of them at the same time. I can hear all the speakers but during the speaker testing I get nothing from the rear right. In fact when the proper plugs are put in the color coded holes the side speakers aren't the side speakers at all they are the rear speakers, and the speakers at the rear are the side speakers. Go figure. well I was kinda thinking that it was the wire from the sound card to the woffer but when I tested the speakers again using the THX software when the woffer came on and was left on for about 10 secs. the left side speaker came on, then off then the ride side came on, then off. then both the side speakers came on. Now if something isn't all messed up I don't know what is. Wish I could figure out who to call. Dam puters these days. :manindifferent:

  • Desktop picture making script not working under 10.6

    I have a script that starts the TeamViewer application on my server and then makes pictures of the running application and sends them per email to me so I can see it is running on my server.
    Under 10.5 it worked always (still does), under 10.6 it does not. Any ideas as to why?
    Here is the script:
    set dFolder to "~/Desktop/"
    do shell script ("mkdir -p " & dFolder)
    repeat 2 times -- Repeat XX times.
    activate application "TeamViewer"
    delay 1
    set tTime to do shell script "date +%H-%M-%S"
    do shell script ("/usr/sbin/screencapture " & dFolder & tTime & ".png") -- Capture screen.
    delay 5 --
    end repeat
    thanks

    And after you've started screen sharing, you could just take a screenshot:
    property N : 0
    set N to N + 1
    set picPath to ((POSIX path of (path to desktop)) & "Picture_" & N & ".png") as string
    do shell script "screencapture -tjpg " & quoted form of picPath
    Code taken from TUAW.

  • 11g R2 wont work under windows 2008 R2 doesnt support UTC, and cant change.

    I posted this in error under general, and got no responses. So now Im cutting and pasting it into installation, in a last ditched attemtp to find a way to get a clean installation of oralce on a clean installation of Windows Server 2008 R2 working.
    Problem:
    1) cannt connect to oracle outside of box. Get "TNS Connection timeout occured"
    2) em console "Sepecify Host and Target Database Credentials" always says "Connection refused: connect", even though the OS user/pass and DB user/pass are correct.
    What does work:
    1) I can "select * from dual" using "sqlplus / as sysdba" from the commandline on the box itself.
    2) Once, before I got em console half working, I could connect to the DB from outside the box with SYS as SYSDBA using toad. Now I cant.
    How I installed it:
    1) created a user called "oracle" and put them in the Administrators group.
    2) ran the downloaded installer for enterprise version, partition option chosen, AL32UTF8 char set, global db name: orcl, sid: orcl, "Assert all new security settings on" (No idea what this is) etc.
    3) at the end of the installer it came up with the following error:
    "Set the environment variable ORACLE_UNQNAME to the database unique name"
    3.5) opened up the incomming connections in the windows FW for 1158 and 1521 TCP from all.
    4) set ORACLE_UNQNAME as a system env var for oracle as "orcl"
    5) set ORACLE_HOME to c:\app\oracle\product\11.2.0 (or should this be c:\app\oracle\product\11.2.0\dbhome_1 ??)
    6) set ORACLE_SID to orcl
    7) set ORACLE_HOST to dilbert (the machine name)
    Rebooted.
    8) logged into em console on https:
    dilbert:1158 (works from inside or outside the box).
    9) Entered the oracle windows user userame & pass, and SYS and pass (with connect as SYSDBA). However, it always says "Connectoin refused: connect"
    Im not using a domain. computer name is correctly setup as "dilbert" in the OS.
    I cant think of anything to try, and dont know how to start debugging this problem.
    If I look at the running services, i see:
    OracleDBConsolorcl Stopped
    OracleJobSchedulerORCL Stopped
    OracleMTSRecoveryService Stopped
    OracleOraDb11g_home1CLRAgent stopped
    OracleORADb11g_home1TNSListener Stopped
    OracleServiceORCL Running
    OrclVssWriterORCL Stopped
    nd if i try and start those services as oracle (who is in the Administrators group) it says "The operation could not be completed. Access is denied". If I run task manager as Administrator, I can start all of them except for the TNSListener which doesnt do anything, you say start, and it stays stopped. No errors, now warnings. and the JobSchedulreORCL which says no associated devices.
    HAving manually started some of the services (no idea if you are supposed to do that, cant find any installation documentation which covers before/after running the installer), when I try and specify the host and target database credentials in em console, it says:
    Validation Error
    Please correct the following error:
    dbUserPassword - This field must be specified
    However, the DB password for SYS IS specified and correct - so I have no way to fix this.
    I cant find anyinformatin online where to look for log files, but there is nothing in sysman\log
    Now em console is saying "Conection refused" again, and the following process have killed themselves (as will I soon)
    OracleDBConsolercl Stoppped
    The others which I succeded in starting are still running. So TNSListener nor jobscheduler will start, and Consolerocl kills itself after a minute.
    Well, looks like I'm on my own on this one. Oracle will not intall on windows, and none seems to have noticed. Doing a day of googling reveals that all the log files which are supposed to live in sysman/log do not exist in this installation, so no help there.
    However, I did find an obscure log which says:
    The agentTZRegion value in C:\app\oracle\product\11.2.0\dbhome_1\wario_orcl/sysman/config/emd.properties is not in agreement with what agent thinks it should be.Please verify your environment to make sure that TZ setting has not changed since the last start of the agent.
    The TZ of the windows server is set to "UTC" at long time ago. There is nothing in the oralce windows installation guide to say "Do not use UTC, the most comon server time zone in europe". There is no mention of supported windows timezones.
    Now if Oracle doesnt support basic UTC, then we are all in trouble.
    There are hundreds of articles with this problem and how to solve it on Unix, but almost none for Windows. Do we have to solve Oracle installation bugs ourselves? Is there no support?
    Doing the below reveals that Oracle thinks that UTC is America/Rio_Branco. That HAS to be a bug.
    C:\app\oracle\product\11.2.0\dbhome_1\BIN>emctl config agent getTZ
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
    Unable to open file for logging. C:\app\oracle\product\11.2.0\dbhome_1/wario_orc
    l/sysman/log/emctl.log: Permission denied
    America/Rio_Branco
    So what next?
    The list of "supported" timezones in supportedtzs.list only lists UNIX timezones, and NO UTC!!!!!
    Googling this turns up nothing - noone on the planet seems to use UTC on their servers. I find this absolutely shocking.
    Windows server ONLY users UTC - it doesnt support GMT any more.
    So I have to now randomly try timezones in Windows which I dont want, which will be different from all the other servers in the Datacenter. It means all our reports will be out by 1 hour in summer ifI have to chose a timzeone which has daylight savings, compared with all the other databases which are UTC (not daylight savings).
    I would expect this from freeware maintained by one person in his garage.
    It seems that this Timezone issue emans Oracle will not run on windows.
    Tried a lot of things, including setting the timzeonse in windows to be "(UTC) Dublin, Edinburgh, Lisbon, London", which unfortuantely is not UTC (as it is affected by daylight savings).
    When you run
    "emctl config agent getTZ"
    you get:
    "Europe/London"
    The only oracle documentation I can find on this subject tells you to edit the emd.properties, and modify the agentTZRegion property, which doesnt exist.
    I tried the following command:
    "c:\app\oracle\product\11.2.0\dbhome_1\BIN>emctl resetTZ agent"
    Which tells you to execute:
    SQL> exec mgmt_target.set_agent_tzrgn('wario:3938','Europe/London')
    SQL> commit
    However, when I do this, I get:
    SQL> exec mgmt_target.set_agent_tzrgn('wario:3938','Europe/London')
    BEGIN mgmt_target.set_agent_tzrgn('wario:3938','Europe/London'); END;
    ERROR at line 1:
    ORA-20233: Invalid agent name wario:3938
    ORA-06512: at "SYSMAN.MGMT_TARGET", line 3811
    ORA-06512: at line 1
    Great. Obviosly, Im loggin in as SYS as no other users have been setup, and certainly I have not seen nor created nor set the password for "em repository user".

    I posted this in error under general, and got no responses. So now Im cutting and pasting it into installation, in a last ditched attemtp to find a way to get a clean installation of oralce on a clean installation of Windows Server 2008 R2 working.
    Problem:
    1) cannt connect to oracle outside of box. Get "TNS Connection timeout occured"
    2) em console "Sepecify Host and Target Database Credentials" always says "Connection refused: connect", even though the OS user/pass and DB user/pass are correct.
    What does work:
    1) I can "select * from dual" using "sqlplus / as sysdba" from the commandline on the box itself.
    2) Once, before I got em console half working, I could connect to the DB from outside the box with SYS as SYSDBA using toad. Now I cant.
    How I installed it:
    1) created a user called "oracle" and put them in the Administrators group.
    2) ran the downloaded installer for enterprise version, partition option chosen, AL32UTF8 char set, global db name: orcl, sid: orcl, "Assert all new security settings on" (No idea what this is) etc.
    3) at the end of the installer it came up with the following error:
    "Set the environment variable ORACLE_UNQNAME to the database unique name"
    3.5) opened up the incomming connections in the windows FW for 1158 and 1521 TCP from all.
    4) set ORACLE_UNQNAME as a system env var for oracle as "orcl"
    5) set ORACLE_HOME to c:\app\oracle\product\11.2.0 (or should this be c:\app\oracle\product\11.2.0\dbhome_1 ??)
    6) set ORACLE_SID to orcl
    7) set ORACLE_HOST to dilbert (the machine name)
    Rebooted.
    8) logged into em console on https:
    dilbert:1158 (works from inside or outside the box).
    9) Entered the oracle windows user userame & pass, and SYS and pass (with connect as SYSDBA). However, it always says "Connectoin refused: connect"
    Im not using a domain. computer name is correctly setup as "dilbert" in the OS.
    I cant think of anything to try, and dont know how to start debugging this problem.
    If I look at the running services, i see:
    OracleDBConsolorcl Stopped
    OracleJobSchedulerORCL Stopped
    OracleMTSRecoveryService Stopped
    OracleOraDb11g_home1CLRAgent stopped
    OracleORADb11g_home1TNSListener Stopped
    OracleServiceORCL Running
    OrclVssWriterORCL Stopped
    nd if i try and start those services as oracle (who is in the Administrators group) it says "The operation could not be completed. Access is denied". If I run task manager as Administrator, I can start all of them except for the TNSListener which doesnt do anything, you say start, and it stays stopped. No errors, now warnings. and the JobSchedulreORCL which says no associated devices.
    HAving manually started some of the services (no idea if you are supposed to do that, cant find any installation documentation which covers before/after running the installer), when I try and specify the host and target database credentials in em console, it says:
    Validation Error
    Please correct the following error:
    dbUserPassword - This field must be specified
    However, the DB password for SYS IS specified and correct - so I have no way to fix this.
    I cant find anyinformatin online where to look for log files, but there is nothing in sysman\log
    Now em console is saying "Conection refused" again, and the following process have killed themselves (as will I soon)
    OracleDBConsolercl Stoppped
    The others which I succeded in starting are still running. So TNSListener nor jobscheduler will start, and Consolerocl kills itself after a minute.
    Well, looks like I'm on my own on this one. Oracle will not intall on windows, and none seems to have noticed. Doing a day of googling reveals that all the log files which are supposed to live in sysman/log do not exist in this installation, so no help there.
    However, I did find an obscure log which says:
    The agentTZRegion value in C:\app\oracle\product\11.2.0\dbhome_1\wario_orcl/sysman/config/emd.properties is not in agreement with what agent thinks it should be.Please verify your environment to make sure that TZ setting has not changed since the last start of the agent.
    The TZ of the windows server is set to "UTC" at long time ago. There is nothing in the oralce windows installation guide to say "Do not use UTC, the most comon server time zone in europe". There is no mention of supported windows timezones.
    Now if Oracle doesnt support basic UTC, then we are all in trouble.
    There are hundreds of articles with this problem and how to solve it on Unix, but almost none for Windows. Do we have to solve Oracle installation bugs ourselves? Is there no support?
    Doing the below reveals that Oracle thinks that UTC is America/Rio_Branco. That HAS to be a bug.
    C:\app\oracle\product\11.2.0\dbhome_1\BIN>emctl config agent getTZ
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
    Unable to open file for logging. C:\app\oracle\product\11.2.0\dbhome_1/wario_orc
    l/sysman/log/emctl.log: Permission denied
    America/Rio_Branco
    So what next?
    The list of "supported" timezones in supportedtzs.list only lists UNIX timezones, and NO UTC!!!!!
    Googling this turns up nothing - noone on the planet seems to use UTC on their servers. I find this absolutely shocking.
    Windows server ONLY users UTC - it doesnt support GMT any more.
    So I have to now randomly try timezones in Windows which I dont want, which will be different from all the other servers in the Datacenter. It means all our reports will be out by 1 hour in summer ifI have to chose a timzeone which has daylight savings, compared with all the other databases which are UTC (not daylight savings).
    I would expect this from freeware maintained by one person in his garage.
    It seems that this Timezone issue emans Oracle will not run on windows.
    Tried a lot of things, including setting the timzeonse in windows to be "(UTC) Dublin, Edinburgh, Lisbon, London", which unfortuantely is not UTC (as it is affected by daylight savings).
    When you run
    "emctl config agent getTZ"
    you get:
    "Europe/London"
    The only oracle documentation I can find on this subject tells you to edit the emd.properties, and modify the agentTZRegion property, which doesnt exist.
    I tried the following command:
    "c:\app\oracle\product\11.2.0\dbhome_1\BIN>emctl resetTZ agent"
    Which tells you to execute:
    SQL> exec mgmt_target.set_agent_tzrgn('wario:3938','Europe/London')
    SQL> commit
    However, when I do this, I get:
    SQL> exec mgmt_target.set_agent_tzrgn('wario:3938','Europe/London')
    BEGIN mgmt_target.set_agent_tzrgn('wario:3938','Europe/London'); END;
    ERROR at line 1:
    ORA-20233: Invalid agent name wario:3938
    ORA-06512: at "SYSMAN.MGMT_TARGET", line 3811
    ORA-06512: at line 1
    Great. Obviosly, Im loggin in as SYS as no other users have been setup, and certainly I have not seen nor created nor set the password for "em repository user".

  • Automatically open in Preview script wont work on 10.6

    Trying to take pictures with an Eye-Fi card and have them automatically open full size in Preview upon uploading. The script I have works just fine for my iMac running 10.5, but not at all on my iMac running 10.6. The script works fine if I physically drag a file into the designated folder, but not it uploaded. Same thing when I make folder action scripts in Automator. Please help. Here is the script:
    on adding folder items to this_folder after receiving these_items
    -- PROCESS EACH OF THE ITEMS ADDED TO THE ATTACHED FOLDER
    repeat with i from 1 to number of items in these_items
    set this_item to item i of these_items
    tell application "Preview"
    activate
    open this_item
    end tell
    end repeat
    end adding folder items to

    Does it change anything if you write the script as follows?
    *on adding folder items to this_folder after receiving these_items*
    *   tell application "Preview"*
          activate
    *      repeat with this_item in these_items*
    *         open this_item*
    *      end repeat*
    *   end tell*
    *end adding folder items to*

  • Make grid script wont work??

    i cant seem to make this work - i create a graphic frame but when i double click the make grid script i get this message - what am i missing?

    Hi,
    Is it modified?
    I cant see "alert" part of code on my side (CS5). Script "do nothing" if cant do something.
    Paste function main() content here
    Jarek

  • Aluminiun keyboard wont work under 10.5 as it should

    Does anybody knows the reason why this new keyboard stop working to its full extend?, the system preferences dont show the programability of the F13 to 19 and some of the keys have random behavior.
    anybody?

    The plot thickens, so to speak!
    I reset the keyboard preferences in OS 10.5.1 as suggested and the F12 key on the Macally keyboard invoked Dashboard. However, when I changed the F-key for Dashboard to F13, as before, the F12/Alt+F12 key would not open or close the drive bays.
    I then hot-swapped the Apple USB keyboard that came with my old G4 400 and, hey presto!, pressing F12/Alt+F12 DID open the drive bays, as it should do! Even more bizarre, when I hot-swapped the Macally keyboard back again, the F12/Alt+F12 keys also worked to open the drive bays!!! BUT, after I rebooted with the Macally keyboard still attached to the Mac, the F12/Alt+F12 keys stopped working again.
    When I then selected 10.4.11 as the startup volume in the 10.5.1 Startup Disk Preferences, my Mac wouldn't even restart until I plugged the Apple keyboard back in! Then it restarted in Mac OS 10.5.1 instead of 10.4.11.
    My brain hurts!!!

  • Mail-form from dB Masters + reCaptcha - Things wont work the way i want.

    I used a mail-form from dB Masters because someone here gave me the tip.
    And its great! But it uses a simplefied Captcha script.
    I tryd to change the code myself and got to this: http://www.wientjesvoegwerk.nl/PHP/form.php
    If you try to send mail it wont work.....
    form.php
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Email Form</title>
    </head>
    <body>
    <center>
    <form id="form" method="post" action="../formmailer.php" enctype="multipart/form-data">
    <input type="hidden" name="action" value="verify">
    <table cellpadding="4">
    <tr><td  style="text-align: left;" valign=top><font size="2" FACE="Verdana" color="#000000">Uw naam:</font><small><span style="color:#E00000;" title="Required field">*</span></small></td><td align="left">
    <input type="text" name="Naam" value=""/>
    </td></tr>
    <tr><td  style="text-align: left;" valign=top><font size="2" FACE="Verdana" color="#000000">Email:</font><small><span style="color:#E00000;" title="Required field">*</span></small></td><td align="left">
    <input type="text" name="Email" value="" />
    </td></tr>
    <tr><td  style="text-align: left;" valign=top><font size="2" FACE="Verdana" color="#000000">Telefoonnummer:</font><small><span style="color:#E00000;" title="Required field">*</span></small></td><td align="left">
    <input type="text" name="Telefoonnummer" value="" />
    </td></tr>
    <tr><td  style="text-align: left;" valign=top><font size="2" FACE="Verdana" color="#000000">Onderwerp:</font><small><span style="color:#E00000;" title="Required field">*</span></small></td><td align="left">
    <select name="Onderwerp">
        <option value="0">Algemene Informatie</option>
        <option value="1">Offerte</option>
        <option value="2">Overige</option>
        </select>
    </td></tr>
    <tr><td  style="text-align: left;" valign=top><font size="2" FACE="Verdana" color="#000000">Bericht:</font><small><span style="color:#E00000;" title="Required field">*</span></small></td><td align="left">
    <textarea name="Bericht" rows="7" cols="40"></textarea>
    </td></tr>
    <tr><td align=right>CAPTCHA TXT</td>
    <td align="left">
    <form method="post" action="verify.php">
       <?php
         require_once('recaptchalib.php');
         $publickey = "I hide the key on this forum dont know if its ok to show";
         echo recaptcha_get_html($publickey);
       ?>
    </form>
    </td>
    </tr>
    <tr><td></td><td align="left">
    <input type="submit" name="submit" value="Submit" />
    <input type="reset" name="Reset" value="Clear Form" />
    <input type="hidden" name="config" value="0" />
    <input type="hidden" name="nospam" value="" />
    </td></tr>
    </table>
    <div style="height:1px; display: none; visibility: hidden;">
    <input type="text" name="email">
    </div>
    </form>
    </center>
    </body>
    </html>
    formmailer.php
    <?php
    // dB Masters' PHP FormM@iler, Copyright (c) 2007 dB Masters Multimedia
    // http://www.dbmasters.net/
    // FormMailer comes with ABSOLUTELY NO WARRANTY
    // Licensed under the AGPL
    // See license.txt and readme.txt for details
    // General Variables
         $check_referrer="no";
         $referring_domains="www.wientjesvoegwerk.nl";
    // options to use if hidden field "config" has a value of 0
    // recipient info
         $charset[0]="UTF-8";
         $tomail[0]="[email protected]";
         $cc_tomail[0]="";
         $bcc_tomail[0]="";
    // Mail contents config
         $subject[0]="Onderwerp van de Email";
         $reply_to_field[0]="Email";
         $reply_to_name[0]="Naam";
         $required_fields[0]="Naam,Email,Telefoonnummer,Onderwerp,Bericht";
         $required_email_fields[0]="Email";
         $attachment_fields[0]="";
         $return_ip[0]="yes";
         $mail_intro[0]="Er is een bericht gestuurd vanuit Wientjesvoegwerk.nl:";
         $mail_fields[0]="Naam,Email,Telefoonnummer,Onderwerp,Bericht";
         $mail_type[0]="text";
         $mail_priority[0]="1";
         $allow_html[0]="no";
    // Send back to sender config
         $send_copy[0]="yes";
         $copy_format[0]="vert_table";
         $copy_fields[0]="Naam,Onderwerp,Bericht";
         $copy_attachment_fields[0]="";
         $copy_subject[0]="Kopie van uw bericht naar Wientjesvoegwerk.nl";
         $copy_intro[0]="Dank u voor uw bericht!<br />Om veiligheidsredenen is uw email adres en telefoonnummer niet in deze mail te zien.<br /> Het volgende is verstuurd;";
         $copy_from[0]="[email protected]";
         $copy_tomail_field[0]="Email";
    // Result options
         $header[0]="";
         $footer[0]="";
         $error_page[0]="";
         $thanks_page[0]="";
    // Default Error and Success Page Variables
         $error_page_title[0]="Errors:";
         $error_page_text[0]="Ga a.u.b. terug naar de vorige pagina om alle benodigde velden in te vullen.";
         $thanks_page_title[0]="Bericht verzonden.";
         $thanks_page_text[0]="Dank u voor uw bericht!";
    // Antispam Options
         $empty_field[0]="nospam";
         $character_scan[0]="Bericht,Naam,Email,Telefoonnummer,Onderwerp";
         $time_delay[0]="2";
         $captcha_codes[0]="9C2449,EEADC8,77A585,D72838";
         $max_urls[0]="2";
         $max_url_fields[0]="Bericht";
         $flag_spam[0]="";
    // options to use if hidden field "config" has a value of 1
    // recipient info
         $charset[1]="";
         $tomail[1]="";
         $cc_tomail[1]="";
         $bcc_tomail[1]="";
    // Mail contents config
         $subject[1]="";
         $reply_to_field[1]="";
         $reply_to_name[1]="";
         $required_fields[1]="";
         $required_email_fields[1]="";
         $attachment_fields[1]="";
         $return_ip[1]="";
         $mail_intro[1]="";
         $mail_fields[1]="";
         $mail_type[1]="";
         $mail_priority[1]="";
         $allow_html[1]="";
    // Send back to sender config
         $send_copy[1]="";
         $copy_format[1]="";
         $copy_fields[1]="";
         $copy_attachment_fields[1]="";
         $copy_subject[1]="";
         $copy_intro[1]="";
         $copy_from[1]="";
         $copy_tomail_field[1]="";
    // Result options
         $header[1]="";
         $footer[1]="";
         $error_page[1]="";
         $thanks_page[1]="";
    // Default Error and Success Page Variables
         $error_page_title[1]="";
         $error_page_text[1]="";
         $thanks_page_title[1]="";
         $thanks_page_text[1]="";
    // Antispam Options
         $empty_field[1]="bait";
         $character_scan[1]="Naam,Email,Telefoonnummer,Onderwerp,Bericht";
         $time_delay[1]="";
         $captcha_codes[1]="";
         $max_urls[1]="";
         $max_url_fields[1]="";
         $flag_spam[1]="";
    // Don't muck around past this line unless you know what you are doing //
    ob_start();
    $config=$_POST["config"];
    $debug=0;
    $debug_text="";
    // fix for Windows email server security
    ini_set("sendmail_from",$tomail[$config]);
    // email validation regular expression
    $regex = "^[-a-z0-9!#$%&\'*+/=?^_`{|}~]+(\.[-a-z0-9!#$%&\'*+/=?^_`{|}~]+)*@(([a-z0-9]([-a-z0-9]*[a-z0-9]+)?){1,63}\.)+([a-z]([-a-z0-9]*[a-z0-9]+)?){2,63}$";
    $header_injection_regex = "(\r|\n)";
    if($header[$config]!="")
         include($header[$config]);
    if($_POST["submit"] || $_POST["Submit"] || $_POST["submit_x"] || $_POST["Submit_x"])
    // begin global functions //
    // get visitor IP
         function getIP()
              if(getenv(HTTP_X_FORWARDED_FOR))
                   $user_ip=getenv("HTTP_X_FORWARDED_FOR");
              else
                   $user_ip=getenv("REMOTE_ADDR");
              return $user_ip;
    // get value of given key
         function parseArray($key)
              $arrayvalue=$_POST[$key];
              $count=1;
              extract($array_value);
              foreach($array_value as $part_value)
                   if($count > 1){$value.=", ";}
                   $value.=$part_value;
                   $count=$count+1;
              return $value;
    // stripslashes and autolink url's
         function parseValue($value)
              $value=preg_replace("/(http:\/\/+.[^\s]+)/i",'<a href="\\1">\\1</a>', $value);
              return $value;
    // html header if used
         function htmlHeader()
              $htmlHeader="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n<html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$charset[$config]."\"></head>\n<body>\n<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"600\">\n";
              return $htmlHeader;
    // html footer if used
         function htmlFooter()
              $htmlFooter="</table>\n</body>\n</html>\n";
              return $htmlFooter;
    // build verticle table format
         function buildVertTable($fields, $intro, $to, $send_ip)
              $message=htmlHeader();
              if($intro != "")
                   $message.="<tr>\n<td align=\"left\" valign=\"top\" colspan=\"2\">".$intro."</td>\n</tr>\n";
              $fields_check=preg_split('/,/',$fields);
              $run=sizeof($fields_check);
              for($i=0;$i<$run;$i++)
                   $cur_key=$fields_check[$i];
                   $curvalue=$_POST[$cur_key];
                   if(is_array($cur_value))
                        $curvalue=parseArray($cur_key);
                   $curvalue=parseValue($cur_value);
                   if($allow_html[$config]=="no")
                        $curvalue=htmlspecialchars(nl2br($cur_value));
                   else
                        $curvalue=nl2br($cur_value);
                   $message.="<tr>\n<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>".$cur_key."</b></td>\n<td align=\"left\" valign=\"top\" width=\"100%\">".$cur_value."</td>\n</tr>\n";
              if($send_ip=="yes" && $to=="recipient")
                   $user_ip=getIP();
                   $message.="<tr>\n<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>Sender IP</b></td>\n<td align=\"left\" valign=\"top\" width=\"100%\">".$user_ip."</td>\n</tr>\n";
              $message.=htmlFooter();
              return $message;
    // build horizontal table format
         function buildHorzTable($fields, $intro, $to, $send_ip)
              $message=htmlHeader();
              $fields_check=preg_split('/,/',$fields);
              $run=sizeof($fields_check);
              if($intro != "")
                   $message.="<tr>\n<td align=\"left\" valign=\"top\" colspan=\"".$run."\">".$intro."</td>\n</tr>\n";
              $message.="<tr>\n";
              for($i=0;$i<$run;$i++)
                   $cur_key=$fields_check[$i];
                   $message.="<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>".$cur_key."</b></td>\n";
              if($send_ip=="yes" && $to=="recipient")
                   $message.="<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>Sender IP</b></td>\n";
              $message.="</tr>\n";
              $message.="<tr>\n";
              for($i=0;$i<$run;$i++)
                   $cur_key=$fields_check[$i];
                   $curvalue=$_POST[$cur_key];
                   if(is_array($cur_value))
                        $curvalue=parseArray($cur_key);
                   $curvalue=parseValue($cur_value);
                   if($allow_html[$config]=="no")
                        $curvalue=htmlspecialchars(nl2br($cur_value));
                   else
                        $curvalue=nl2br($cur_value);
                   $message.="<td align=\"left\" valign=\"top\">".$cur_value."</td>\n";
              $message.="</tr>\n";
              $message.="<tr>\n";
              if($send_ip=="yes" && $to=="recipient")
                   $user_ip=getIP();
                   $message.="<td align=\"left\" valign=\"top\">".$user_ip."</td>\n";
              $message.="</tr>\n";
              $message.=htmlFooter();
              return $message;
    // build plain text format
         function buildTextTable($fields, $intro, $to, $send_ip)
              $message="";
              if($intro != "")
                   $message.=$intro."\n\n";
              $fields_check=preg_split('/,/',$fields);
              $run=sizeof($fields_check);
              for($i=0;$i<$run;$i++)
                   $cur_key=$fields_check[$i];
                   $curvalue=$_POST[$cur_key];
                   if(is_array($cur_value))
                        $curvalue=parseArray($cur_key);
                   $curvalue=parseValue($cur_value);
                   if($allow_html[$config]=="no")
                        $curvalue=htmlspecialchars($cur_value);
                   else
                        $curvalue=$cur_value;
                   $message.="".$cur_key.": ".$cur_value."\n";
              if($send_ip=="yes" && $to=="recipient")
                   $user_ip=getIP();
                   $message.="Sender IP: ".$user_ip."\n";
              return $message;
    // get the proper build fonction
         function buildTable($format, $fields, $intro, $to, $send_ip)
              if($format=="vert_table")
                   $message=buildVertTable($fields, $intro, $to, $send_ip);
              else if($format=="horz_table")
                   $message=buildHorzTable($fields, $intro, $to, $send_ip);
              else
                   $message=buildTextTable($fields, $intro, $to, $send_ip);
              return $message;
    // referrer checking security option
         function checkReferer()
              if($check_referrer=="yes")
                   $ref_check=preg_split('/,/',$referring_domains);
                   $ref_run=sizeof($ref_check);
                   $referer=$_SERVER['HTTP_REFERER'];
                   $domain_chk="no";
                   for($i=0;$i<$ref_run;$i++)
                        $cur_domain=$ref_check[$i];
                        if(stristr($referer,$cur_domain)){$domain_chk="yes";}
              else
                   $domain_chk="yes";
              return $domain_chk;
    // checking required fields and email fields
         function checkFields($text_fields, $email_fields, $regex)
               $error_message="";
              if($debug==1)
                   $error_message.="<li>text_fields: ".$text_fields."<br />email_fields: ".$email_fields."<br />reply_to_field: ".$reply_to_field."<br />reply_to_name: ".reply_to_name."</li>";
              if($text_fields != "")
                   $req_check=preg_split('/,/',$text_fields);
                   $req_run=sizeof($req_check);
                   for($i=0;$i<$req_run;$i++)
                        $cur_field_name=$req_check[$i];
                        $cur_field=$_POST[$cur_field_name];
                        if($cur_field=="")
                             $error_message.="<li>You are missing the <b>".$req_check[$i]."</b> field</li>\n";
              if($email_fields != "")
                   $email_check=preg_split('/,/',$email_fields);
                   $email_run=sizeof($email_check);
                   for($i=0;$i<$email_run;$i++)
                        $cur_email_name=$email_check[$i];
                        $cur_email=$_POST[$cur_email_name];
                        if($cur_email=="" || !eregi($regex, $cur_email))
                             $error_message.="<li>You are missing the <b>".$email_check[$i]."</b> field or it is not a valid email address.</li>\n";
              return $error_message;
    // attachment function
         function getAttachments($attachment_fields, $message, $content_type, $border)
              $att_message="This is a multi-part message in MIME format.\r\n";
              $att_message.="--{$border}\r\n";
              $att_message.=$content_type."\r\n";
              $att_message.="Content-Transfer-Encoding: 7bit\r\n\r\n";
              $att_message.=$message."\r\n\r\n";
              $att_check=preg_split('/,/',$attachment_fields);
              $att_run=sizeof($att_check);
              for($i=0;$i<$att_run;$i++)
                   $fileatt=$_FILES[$att_check[$i]]['tmp_name'];
                   $fileatt_name=$_FILES[$att_check[$i]]['name'];
                   $fileatt_type=$_FILES[$att_check[$i]]['type'];
                   if (is_uploaded_file($fileatt))
                        $file=fopen($fileatt,'rb');
                        $data=fread($file,filesize($fileatt));
                        fclose($file);
                        $data=chunk_split(base64_encode($data));
                        $att_message.="--{$border}\n";
                        $att_message.="Content-Type: {$fileatt_type}; name=\"{$fileatt_name}\"\r\n";
                        $att_message.="Content-Disposition: attachment; filename=\"{$fileatt_name}\"\r\n";
                        $att_message.="Content-Transfer-Encoding: base64\r\n\r\n".$data."\r\n\r\n";
              $att_message.="--{$border}--\n";
              return $att_message;
    // function to set content type
         function contentType($charset, $format)
              if($format=="vert_table")
                   $content_type="Content-type: text/html; charset=".$charset."\r\n";
              else if($format=="horz_table")
                   $content_type="Content-type: text/html; charset=".$charset."\r\n";
              else
                   $content_type="Content-type: text/plain; charset=".$charset."\r\n";
              return $content_type;
    // end global functions //
    // begin procedural scripting //
         // anti-spam empty field check
         if($_POST[$empty_field[$config]] != "")
              $empty_message = "<li>This submission failed and was flagged as spam.</li>\n";
         // anti-spam character scan check
         if(strlen($character_scan[$config]) > 0)
              $spam_message="";
              $field_check=preg_split('/,/',$character_scan[$config]);
              $field_run=sizeof($field_check);
              for($i=0;$i<$field_run;$i++)
                   $cur_field_name=$field_check[$i];
                   $cur_field=$_POST[$cur_field_name];
                   if(preg_match("/<(.|\n)+?>/", $cur_field) || preg_match("/\[(.|\n)+?\]/", $cur_field))
                        $spam_message.="<li>This message contains disallowed characters.</li>\n";
         // anti-spam time delay check
         if((strlen($time_delay[$config]) > 0 && strlen($_POST["time"]) > 0) || (strlen($time_delay[$config]) > 0 && (strlen($_POST["time"]) == 0 || !$_POST["time"])))
              if((time() - $_POST["time"]) < $time_delay[$config])
                   $time_message = "<li>This has been stopped by the timer, and is likely spam.</li>\n";
         // anti-spam CAPTCHA check
         if(strlen($captcha_codes[$config]) > 0)
              $captcha_check=preg_split('/,/',$captcha_codes[$config]);
              if(strtolower($_POST["captcha_entry"]) != strtolower($captcha_check[$_POST["captcha_code"]]))
                   $captcha_message = "<li>CAPTCHA test did not match.</li>\n";
         // anti-spam max URL check
         if(strlen($max_url_fields[$config]) > 0)
              $max_url_message="";
              $field_check=preg_split('/,/',$max_url_fields[$config]);
              $field_run=sizeof($field_check);
              for($i=0;$i<$field_run;$i++)
                   $cur_field_name=$field_check[$i];
                   $cur_field=$_POST[$cur_field_name];
                   preg_match_all("/http:/", $cur_field, $matches);
                   if(count($matches[0]) > $max_urls[$config])
                        $max_url_message.="<li>This message contains too many URL's.</li>\n";
         // set anti-spam flagging option
         if(strlen($empty_message.$spam_message.$time_message.$captcha_message.$max_url_message) > 0 && strlen($flag_spam[$config]) == 0)
              $set_flag = 2;
         else if(strlen($empty_message.$spam_message.$time_message.$captcha_message.$max_url_message) > 0 && strlen($flag_spam[$config]) > 0)
              $set_flag = 1;
         else
              $set_flag = 0;
         // header injection check
            $security_filter="";
         if(strlen($_POST[$reply_to_field[$config]]) > 0)
              if(eregi($header_injection_regex,$_POST[$reply_to_field[$config]]))
                   $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";
              else
                   $reply_to_field_checked=$_POST[$reply_to_field[$config]];
         if(strlen($_POST[$reply_to_name[$config]]) > 0)
              if(eregi($header_injection_regex,$_POST[$reply_to_name[$config]]))
                   $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";
              else
                   $reply_to_name_checked=$_POST[$reply_to_name[$config]];
         // check domain referrer and continue
         $domain_chk=checkReferer();
         if($domain_chk=="yes")
              $error_message=checkFields($required_fields[$config], $required_email_fields[$config], $regex);
              if(strlen($error_message) < 1 && strlen($security_filter) < 1 && $set_flag < 2)
                   // build appropriate message format for recipient
                   $content_type=contentType($charset[$config], $mail_type[$config]);
                   $message=buildTable($mail_type[$config], $mail_fields[$config], $mail_intro[$config], "recipient", $return_ip[$config]);
                   // build header data for recipient message
                   //$extra="From: ".$_POST[$reply_to_field[$config]]."\r\n";
                   $extra="From: ".$reply_to_name_checked." <".$reply_to_field_checked.">\r\n";
                   if($cc_tomail[$config]!="")
                        $extra.="Cc: ".$cc_tomail[$config]."\r\n";
                   if($bcc_tomail[$config]!="")
                        $extra.="Bcc: ".$bcc_tomail[$config]."\r\n";
                   if($mail_priority[$config]!="")
                        $extra.="X-Priority: ".$mail_priority[$config]."\r\n";
                   // get attachments if necessary
                   if($attachment_fields[$config]!="")
                        $semi_rand=md5(time());
                        $border="==Multipart_Boundary_x{$semi_rand}x";
                        $extra.="MIME-Version: 1.0\r\n";
                        $extra.="Content-Type: multipart/mixed; boundary=\"{$border}\"";
                        $message=getAttachments($attachment_fields[$config], $message, $content_type, $border);
                   else
                        $extra.="MIME-Version: 1.0\r\n".$content_type;
                   // send recipient email
                   if($debug==1)
                        if($set_flag == 1)
                             $debug_text.="<p><b>Mail would have sent flagged for spam if not in debug mode.</b></p>";
                        else
                             $debug_text.="<p><b>Mail would have sent if not in debug mode.</b></p>";
                   else if($debug==0)
                        if($set_flag == 1)
                             $subject = $flag_spam[$config]." ".$subject[$config];
                        else
                             $subject = $subject[$config];
                        mail("".$tomail[$config]."", "".stripslashes($subject)."", "".stripslashes($message)."", "".$extra."");
                   // autoresponse email if necessary
                   if($send_copy[$config]=="yes")
                        // build appropriate message format for autoresponse
                        $content_type=contentType($charset[$config], $copy_format[$config]);
                        $message=buildTable($copy_format[$config], $copy_fields[$config], $copy_intro[$config], "autoresponder", $return_ip[$config]);
                        // build header data for autoresponse
                        $copy_tomail=$_POST[$copy_tomail_field[$config]];
                        $copy_extra="From: ".$copy_from[$config]."\r\n";
                        // get autoresponse  attachments if necessary
                        if($copy_attachment_fields[$config]!="")
                             $semi_rand=md5(time());
                             $border="==Multipart_Boundary_x{$semi_rand}x";
                             $copy_extra.="MIME-Version: 1.0\r\n";
                             $copy_extra.="Content-Type: multipart/mixed; boundary=\"{$border}\"";
                             $message=getAttachments($copy_attachment_fields[$config], $message, $content_type, $border);
                        else
                             $copy_extra.="MIME-Version: 1.0\r\n".$content_type;
                        // send autoresponse email
                        if($debug==1)
                             if($set_flag == 1)
                                  $debug_text.="<p><b>Autoresponder would have sent flagged for spam if not in debug mode.</b></p>";
                             else
                                  $debug_text.="<p><b>Autoresponder would have sent if not in debug mode.</b></p>";
                        else if($debug==0)
                             $send_copy = 1;
                             if($copy_tomail=="" || !eregi($regex,$copy_tomail))
                                  $send_copy = 0;
                             if($send_copy == 1)
                                  if($set_flag == 1)
                                       $copy_subject = $flag_spam[$config]." ".$copy_subject[$config];
                                  else
                                       $copy_subject = $copy_subject[$config];
                                  mail("$copy_tomail", "".$copy_subject."", "$message", "$copy_extra");
                   // showing thanks pages from a successful submission
                   if($thanks_page[$config]=="")
                        echo "<h3>".$thanks_page_title[$config]."</h3>\n";
                        echo "<p>".$thanks_page_text[$config]."</p>\n";
                        if(strlen($debug_text) > 0)
                             echo "<p><b><i>".$debug_text."</i></b></p>\n";
                   else
                        header("Location: ".$thanks_page[$config]);
              else
                   // entering error page options from missing required fields
                   if($error_page[$config]=="")
                        echo "<h3>".$error_page_title[$config]."</h3>\n";
                        echo "<ul>\n";
                        echo $security_filter.$empty_message.$error_message.$spam_message.$time_message.$captcha_message.$max_url_message;
                        echo "</ul>\n";
                        echo "<p>".$error_page_text[$config]."</p>\n";
                   else
                        header("Location: ".$error_page[$config]);
         else
              echo "<h3>".$error_page_title[$config]."</h3>\n";
              // message if unauthorized domain trigger from referer checking option
              echo "<p>Sorry, mailing request came from an unauthorized domain.</p>\n";
    // end procedural scripting //
    else
         echo "<h3>Error</h3>";
         echo "<p>No form data has been sent to the script</p>\n";
    if($footer[$config]!="")
         include($footer[$config]);
    ob_end_flush();
    ?>
    verify.php
    <?php
    require_once('recaptchalib.php');
    $privatekey = "i hide this on the forum";
    $resp = recaptcha_check_answer ($privatekey,
                                   $_SERVER["REMOTE_ADDR"],
                                   $_POST["recaptcha_challenge_field"],
                                   $_POST["recaptcha_response_field"]);
    if (!$resp->is_valid) {
       // What happens when the CAPTCHA was entered incorrectly
       die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
            "(reCAPTCHA said: " . $resp->error . ")");
    } else {
       // Your code here to handle a successful verification
    ?>
    We have a saying in the Netherlands; "Not being abled to see the tree's trough the forest"
    Well i dont see it anymore...
    I managed to get it in the code but it doesnt work.
    I hope someone can help me out!

    @Nancy O.
    Thanks for your support i appreciate it that you helped me out a many times.
    However i have read all of the topics you posted.
    I know in the mail form i can disable the "sort of Captcha". I wanted to disable it and insert reCaptcha instead.
    I will re-make the form because like you said (and i already figured it out myself) ;
    "b) Don't modify forms until you get a very basic form working on your server."
    And youre right, im taking too much work at once.
    @CowboyInAZ
    Im a hobbyist that learns really really fast.
    Before March 23 i never used CSS, Javascript and XHTML. And never combined them all together with PHP. (never ever created a php based file from scratch)
    The reason why i use other persons code is because i learn faster with examples, and because i dont need to reinvent the wheel if someone already invented it. The only thing i do with it is learn the workings, customise it and at last, rewrite the code when i understand it.
    If you look at my current site: http://www.wientjesvoegwerk.nl/
    You will notice that the site is validated by W3C with no errors and warnings.
    I think it was Nancy O. that gave me the link to the validator. Thats how i discovered the service.
    You need to know that in 1 day (from 63 errors and 12 warnings) i removed all errors. And i didnt knew much about it, and why errors happend while the site looks fine.
    So im just curious how things work and thats why i "steal" codes and adjust them to learn myself.
    I also want a education like you spoke of, but im interested in a different media.
    I want to be abled to create my dream project wich involves new ways for game studios to earn money.
    This is just a simple start, im also taking tutorials in C#, C++.

  • Applescript process message body from mail rule help please

    Would someone be kind enough to help me figure out how to do this?  I've been reading for hours on other posts and I can't get this to work.
    Here is an example:
    I would like to set up a mail rule to run an applescript that searches the body of the email for "-Front Door- Open".  I then want to parse the body and sets myDevice= "-Front Door-" and myState="Open".  After I have these variables set, I want to make an call to something like https://foo.me.com/api/token/${state.accessToken}/smartapps/installations/${app.id}/Notify?device=${myDevice}&type=ContactSensor&state=${myState}
    I understand how to do the mail rule, I just can't figure out the applescript part of it.

    The script works just fine - at least, as designed if not as expected.
    When the script runs, Mail and/or AppleScript looks for a perform mail action handler. If that is found, the commands within are executed.
    If there is no perform mail action handler then the script is run as-is (i.e. as if you clicked 'Run' in AppleScript Editor).
    And that's exactly what's happening here. In the first case (that works) the script is running because there's no (visible) perform mail action handler.
    In the second case where it apparently doesn't work, there is a handler, so that handler is being executed. Any code outside that handler is ignored (unless it's called from within the perform mail action handler.
    Since your 'say' command is outside the handler, it is ignored. However, if you move it inside the perform mail action handler you'll hear your speech.

  • Script no longer works in mail since upgrade to 10.5

    I used the script below to generate mail messages. Under 10.4 it would just send the message, now under 10.5 it puts it in the Out Box and that is it.
    Anybody knows how to fix this so it sends it immediately?
    Secondly I used to be able to set sender to any of my accounts for example "[email protected]" or any address I liked, this too is no longer working as it uses always the account from Mail it is send from.
    Anybody knows why or how to fix this?
    set theBody to "abc"
    set theSubject to "XYZ"
    set theTarget to "[email protected]"
    tell application "Mail"
    set newMessage to make new outgoing message with
    roperties {subject:theSubject, content:theBody}
    tell newMessage
    make new to recipient at end of to recipients with properties {address:theTarget}
    set sender to "[email protected]"
    end tell
    send newMessage
    end tell
    thanks

    Sorry forgot to add:
    I have found and tried the advice in article:   http://support.apple.com/kb/TS1967
    However I have no files in the format iTunes Library YYYY-MM-DD that the artical relies on for its solution.
    (Yes hidden and system files are set as shown in Windows Explorer)

  • Script no longer works in mail V3 since upgrading from 10.4 to 10.5

    I used the script below to generate mail messages. Under 10.4 it would just send the message, now under 10.5 it puts it in the Out Box and that is it.
    Anybody knows how to fix this so it sends it immediately?
    Secondly I used to be able to set sender to any of my accounts for example "[email protected]" or any address I liked, this too is no longer working as it uses always the main account from Mail it is send from.
    Anybody knows why or how to fix this?
    set theBody to "abc"
    set theSubject to "XYZ"
    set theTarget to "[email protected]"
    tell application "Mail"
    set newMessage to make new outgoing message with
    roperties {subject:theSubject, content:theBody}
    tell newMessage
    make new to recipient at end of to recipients with properties {address:theTarget}
    set sender to "[email protected]"
    end tell
    send newMessage
    end tell
    thanks

    I don't know if this is still an issue for you guys, but I've been experiencing a problem with the MouseWheelListener added to a Component that is added to an Applet. This is browser independent, but appletviewer/browser dependent.
    Check this link for some test cases:
    http://www.darkdom.com/prototype/coordinate/test/test.html
    I thought it had something to do with the event getting "consumed" by other listeners, but it seems like it only has to do with the MouseWheelListener.

Maybe you are looking for

  • Is it possible to accommodate dual language for single country?

    Hi folks, Here is the background information on our requirement. Any help would be appreciated. There are 3 Language parameter fields in SAP. 1. Field PA0002-SPRSL which can be modified in ESS via Personal Profile. This does not force a revisit to th

  • Why are Navigation Tabs visually different in IE than in Firefox? - Fix?

    I have an Apex 3.2 app that is using Theme 15. I have chosen to use standard tabs for navigation between pages. In Firefox the tabs look very good. Lined up and spaced nicely with titles. Problem.....when I go to IE and check out the application, the

  • Apache/SSL Tomcat config weirdness...

    I thought I read a post related to this recently, but I can't find it (the forum search is flaky lately), so I'm making my own post... We have Apache 1.3 with mod_ssl for SSL, Tomcat 4.1.24 and mod_jk set up. Things work fine for most of this setup,

  • Two problems with iPhoto and mutiuser iMac

    I have an iMac with two users. I moved my iPhoto library to the Users/Shared folder. When I log on as the first user and open iPhoto it opens to the library in the Users/Shared folder, which is what I want. When I log on as the second user (after clo

  • How can I change the secret question email address?

    I have the wrong email to send the secret questions to. If anyone can help me won how to change the email to these questions that would be greatly appreciated. Thank you in advance for taking time to help.