AppleScript set the string to date and add 30 minutes

I am filling 2 boxes of time on a website in Safari, using Applescript from buttons selected by the user.

My current Applescript is:

Value dialog box to display the dialog box buttons ' when did your first departure case? {"07:30, ' 08:00, ' 08:30" "" "}

definition of the first button returned of the result

inputByName ("time 1", 0, start)

the value of test for '07:30 ' - assuming that the user has selected '07:30 ' in the dialog box

Test date - do not know how to assign 07:30 as an hour

Finishing to test set + (30 * minutes)

inputByName ("2", 0, finishing)

The error return is number 'Invalid date and time date 07:30 < < script > >.' -30720

Any help would be greatly appreciated!

Thank you

s

You must use a complete date in the date/time of your machine settings.  A simple way is to simply get the current date (which returns a full date object) and manipulate that, for example:

tell (current date)
  set its time to (7 * hours) + (30 * minutes)
  set someDate to it
end tell
return time string of someDate

Tags: Mac OS & System Software

Similar Questions

  • Make XY graph from the string with date and time data

    1 all sorry for my English.

    I have files with data. In this array of strings, I have 2 columns with date and time. I want to show these data to the XY Chart with time and date on some of the DBL and X on Y.

    I tried to do it by myself, but cannot add to time on X axis.

    Hi olderon,

    you date string is something like "30.01.2014" but looking for "%d//%m %y. Spot the problem?

  • compare the permeable line data and add more than 1 column

    I have data like this

    col1 col2 col3

    1 AB XY

    UV 1 CD

    EF 2 OP

    2 GH QR

    3. I M

    4 J N

    I got kicked out like that

    Col1 Col2

    1 AB CD XY UV

    2 EF GH OP QR

    3. I J

    M 4 N

    I'm using oracle 10.2.0.4.My table is located in the remote database. Also my concatinated output is greater than 4000 bytes

    I tried the queries I can copied that did not work.

    option 1
    It gives the error ORA-22992: cannot use LOB Locators selected remote tables

    Request_id SELECT, to_clob (wm_concat (col2 | col3) as notes)
    FROM table_x
    GROUP BY col1

    option 2
    This works, but does not allow to add other columns
    WITH got_r_num AS
    (
    SELECT col1, col2
    ROW_NUMBER () OVER (PARTITION BY col1
    ORDER BY col2
    ) AS r_num
    FROM table_x
    )
    SELECT col1
    REPLACE (SYS_CONNECT_BY_PATH (col2, ',')
    , ','
    ) AS all_col2s
    OF got_r_num
    WHERE CONNECT_BY_ISLEAF = 1
    START WITH r_num = 1
    CONNECT BY r_num = r_num + 1
    AND col1 = col1 PRIOR

    Please help me

    Thank you very much

    Try this

    with t
    as
    (
    select 1 c1,'AB' c2,'XY' c3 from dual union all
    select 1,'CD','UV' from dual union all
    select 2,'EF','OP' from dual union all
    select 2,'GH','QR' from dual union all
    select 3,'I','M' from dual union all
    select 4,'J','N' from dual
    )
    select c1, ltrim(sys_connect_by_path(c2,','),',')||','||ltrim(sys_connect_by_path(c3,','),',') c2
      from (select t.*, row_number() over(partition by c1 order by 1) rno
              from t)
     where connect_by_isleaf = 1
     start with rno = 1
    connect by c1 = prior c1
       and rno = prior rno + 1
    
  • compare the permeable line data and add

    I have data like this

    col1 col2

    1 AB

    1 CD

    2 PQ

    2 LM

    3A

    3 d

    I got kicked out like that

    1 ABCD

    2 PQLM

    3A

    3 d

    Please help me

    Thank you very much

    Hello

    Welcome to the forum!

    Whenever you have a question, tell what version of Oracle you are using.

    You should post some examples of data in a form people can actually use.
    For example:

    CREATE TABLE     table_x
    (       col1     NUMBER (4)
    ,     col2     VARCHAR2 (10)
    );
    
    INSERT INTO table_x (col1, col2) VALUES (1,   'AB');
    INSERT INTO table_x (col1, col2) VALUES (1,   'CD');
    INSERT INTO table_x (col1, col2) VALUES (2,   'PQ');
    INSERT INTO table_x (col1, col2) VALUES (2,   'LM');
    INSERT INTO table_x (col1, col2) VALUES (3,   'A');
    INSERT INTO table_x (col1, col2) VALUES (4,   'C');
    

    Also post the reulsts you want from these data, as well as an explanation of how to get these results.
    Did you publish the results, but not an explanation. Why do you want to

    2     PQLM
    

    in the output rather than

    2     LMPQ
    

    ? Or would be an acceptable?

    Combining data from multiple lines in a single large chain is called chain aggregation . There are several ways to do it, depending on your version and exactly what you need.
    Here's a way to string aggregation. It works in Oracle 9 (and more)

    WITH got_r_num     AS
    (
         SELECT     col1, col2
         ,     ROW_NUMBER () OVER ( PARTITION BY  col1
                                   ORDER BY          col2
                           ) AS r_num
         FROM     table_x
    )
    SELECT     col1
    ,     REPLACE ( SYS_CONNECT_BY_PATH (col2, ',')
              , ','
              )     AS all_col2s
    FROM     got_r_num
    WHERE     CONNECT_BY_ISLEAF     = 1
    START WITH     r_num     = 1
    CONNECT BY     r_num     = PRIOR r_num + 1
         AND     col1     = PRIOR col1
    ;
    

    The query above assumes that col2 never contains a «,» If so, then use another secondary channel never occurred in col2 as argument on SYS_CONNECT_BY_PATH 2nd. The 2nd argument of REPLACEMENT must be the same.

    See other ways to string aggregation:
    http://www.Oracle-base.com/articles/10G/StringAggregationTechniques.php

    Published by: Frank Kulash, may 6, 2010 16:34

  • Use the project start Date and duration to calculate the end Date of project

    I'm trying to calculate the end date of the project in a report using the project end Date and time entered on the opportunity.
    For example, if the start date of the project filled an opportunity is 31/01/2009 and the length (integer) is entered on the opportunity is 5, the project end date is in the report must be 30/06/2009.

    I'm trying to TIMESTAMPADD forumaul allows you to add the duration (number of months) to the project start date
    This Fx works TIMESTAMPADD (SQL_TSI_MONTH, 12, '-used Custom Attributes ".) DATE_40)
    But if I try to replace the number twelve by the length (integer field) I get an error when you try to save: TIMESTAMPADD (SQL_TSI_MONTH, "-opportunity Custom Metrics".) S_INT_0, '-used custom attributes. DATE_40)

    Any ideas on how I can get this to work would be greatly appreciated.

    Hi, try this. It might solve your prioblem TIMESTAMPADD (SQL_TSI_MONTH, CAST (YOUR FIELD AS INTEGER), account. (' "Last modified")

    -John CRMIT

  • Do the photo album, date and time taken?

    Just downloaded all my iPhotos to Photos from the old to the new iMac. All the old photos transferred with the intact title (date and time). How to activate this in Photos? Added some new pictures for the first time to Photos and may not know how to make the title the date and time the photo was taken (without manually typing in the date and time).

    That s not a feature of Photos

    Users contributed scripts to perform these tasks - Script: batch changing the title to the Date of Capture -or http://www.oldtoadstutorials.net/No.P01.html

    LN

  • Is function like the function of date and time picker in the ICB 8.5?

    I need the function as "date and time picker control" used in activeX, but my operating system (windows 7 Bits without office software) is not the «Microsoft date controller» and time picker I am looking article in the internet which mention this register the MSComctl2.ocx in the windows\system32, but he could not operator in my operating system (it's not allow to save the controller). Help me, please.

    Already, I discovered that the problem on the service of DTP in the 64-bit Windows 7 could not used. Because, the DTP is 32 bits, it should use the administrator to register the 'mscomct2.ocx file' which must be replace in the % windows/SysWOW64 and used the 'mscomct2.ocx regsvr32.exe"in console windows.

  • How can I set the default font size and type for the outgoing Hotmail mail?

    How can I set the default font size and type for the outgoing Hotmail mail?

    Hi Dale,

    What is the email client do you use?

    Outlook can be configured per - start Outlook-> Tools-> Options-> mail-> fixed Format and fonts... Select the font and size you need... Click ok on all screens.

    I hope this helps.

  • If I have the resell, involving renewals and add as well as the original agreement?

    If I have the resell, involving renewals and add as well as the original agreement?

    Yes, when you as a partner to resell Solutions of Cloud Oracle you participate not only in the original agreement, but also of the renewals and additions to the service. As a reseller, you have the relationship with the end customer and you want that for too long the service continues.

  • How can I get rid of the file name, date and size of the photo in the upper left corner of the module develop when I'm not working on the photos?

    How can I get rid of the file name, date and size of the photo in the upper left corner of the module develop when I'm not working on the photos?

    All shortcuts are listed on the view > menu Info Magnifier.

  • What is the difference between 'place' and 'add files to download' in Muse CC?

    Hey guys... What is the difference between 'place' and 'add files to download' in Muse CC?

    Thanx

    You place the images to display on your site.

    You add files to download and make them available for download by visitors to your site.

    For example, you can add a PDF document, a Word document or whatever you want. These files are not displayable on your site, but you can link with the Hyperlink command to a button to make them available for download by visitors to your site.

  • Include the expected start Date and end Date for the management of SSHRC-Absence

    Is it possible to include the scheduled Start Date and end Date of project to SSHRC, management of absences with the type of leave is confirmed?

    Thanks in advance

    Hello

    In this case, you should disable the option the absence request, so that by default all sheets are confirmed and the user do not have to apply once leave as planned and then comply.

    You can see the id metalink - "How do I disable the State of Absence of R12 Absence Management Page [ID 786691.1]" to understand how to disable "Planned" option to request authorization for simple customization.

    It will be useful.

    Thank you
    Sanjay

  • Presentation of a meeting in Rome, Italy via 4G wifi hotspot. The amount of data consume a 75 minute meeting?

    Presentation of a meeting in Rome, Italy via 4G wifi hotspot. The amount of data consume a 75 minute meeting? The largest plan has my provider is 800 MB and I wonder if I need more because their cost of surplus more than cocaine.

    Thank you.

    It depends on what you do, but I guess you could go.

    Things like the video online may vary from 100 Kbps to 500 Kbps. screen sharing can consume as much, or more, depending on your screen resolution. Audio runs about 44 Kbps. demand for bandwidth content is dictated by the settings of this content. Video MP4 or FLV is adjustable to broadcast to 10 + Mbps, even if I try to stick with 800 Kbps. In short, there is no response from the hard line of it is or will not work. You just need to do a little math to understand.

    For example:

    Duration 75 min

    Audio (44 kbps):                                                                       198 mb

    Live video (400 Kbps): 1 800 MB

    Screen sharing (1024 X 768 resolution 150 Kbps): 675 MB

    It would be easy to go beyond your data limit, so just prioritize your needs for the meeting and use only what you need. If you need live video, do it for the opening and closing, but then stop doing during the presentation, because it only takes up bandwidth and draws attention away from your presentation. You can also reduce the room bandwidth to DSL (limit the margin of 600 Kbps max) or Modem (limits room at 56 Kbps) to help conserve bandwidth. However, you will notice a reduction in quality to offset the bandwidth restrictions. For help with some of the math, here's a preview technique to connect 9, http://www.realeyes.com/wp-content/uploads/2014/06/Adobe-Connect-9-Technical-Guide.pdf. The next to the last page, there are some numbers for you to work with.

  • Set the string for LabView dll parameter

    Hello

    I created a simple vi LV 2010 (departure vi), which reads the identification of an oscilloscope. Then I take this vi and incorporate it into a dll of LabView. I have test the dll calling LabView (RunFrom dll). Basically, it seems to work, but len and ReadBuffer back empty. It must be in the way I'm configuration configuring the setting for Readbuffer (settings) in the configuration of the dll. I tried several different configurations, but nothing seems to work. Any help is appreciated!

    What is the parameter len?  Normally, you should only set the length of the string, but it seems that you did not do this.  Also, you're passing len by value, and not by reference, so the function is expecting her to be a starter and you will never get return a different value to any value that you provide.

    Do not use a local variable of the ReadBuffer for entry "readbuffer".  You must pass a string initialized long enough to contain the expected quantity of data.  The best way to proceed is to use the array to initialize to create a table of U8, then use the array of bytes to a string.  Set the parameter 'minimum size' to 'len' then run through the length of the string initialized (this is not mandatory but is recommended).  If you need the length obtained output, add another indicator and another parameter to this value.  There might be a way to do it with one by len parameter passing by reference, you need to experiment (it is certainly feasible in C but I don't know if allows him to LabVIEW).

  • The batch change date and time

    I have a lot of photos which, for some reason, have lost their correct dates and hours of creation, so I was eager to correct in an easy and enjoyable way.  I unfortunately discovered that Photos is not the batch option to change that used to be in iPhoto.

    When you try to find a solution to my problem, I fell on this batch Change Date and time on a fixed Date, which works well, but not quite how I want it.  What I want to do, that's exactly what the script above does, but rather than increment by 1 minute of each photo, I want to increment by 1 second intervals by photo.

    Having not really used AppleScript before, I tried to change the references to the 'minutes' to 'seconds' but that did not work.  Is it possible to do using above seconds instead of minutes?

    Any guidance would be greatly appreciated.  Thank you.

    Just delete the text "" * minutes ' in the lines where the date is changed. "

    Then time will be incremented seconds.

    For example, for the first version of the script use:

    the value timeIncrement to 1 - increment of time in seconds

    (* select at least 2 images in Photos *)

    say application 'Photos '.

    activate

    game imageSel for (get selection)

    if ({ is } imageSel) or (the length of imageSel < 2) then

    error "Please select at least two images."

    on the other

    defined first_image to the point 1 of the imageSel

    the value first_date to (the date of first_image) as date of

    Repeat with I from 2 to the County of imageSel

    put next_image to the point I of imageSel

    the value next_date to (the date of next_image) as date of

    the value time_difference to (first_date - next_date) + ((i-1) * timeIncrement)

    say next_image

    the value le Date of next_image to (next_date + time_difference) as date of

    end say

    end Repeat

    end if

    return "Set the date and time of" & (the length of the imageSel) & 'photos. The last date is "& ((the date of next_image) as date)"

    end say


Maybe you are looking for