Apple Script/Program start through link on HTML page

Dear Apple Gurus
Probably I'm asking something silly, but I don't know any other way to solve my problem.
I have to do some training videos about the finder and system tools. To have it easy, I would like to ad some buttons to the project where you can start an apple script which does execute some commands just explained in the video. Untill know I'm intend to do the hole thing inside QT but maybe a HTML page does the job too.
My problem is now, how can I start a AppleScript out of a Movie or HTML page.
Is this possible at all or are there any other solutions to to the job?
Best regards
Thomas Thaler

Hi Thomas,
Yes, you play movies in a smil presentation.
You can define as many regions as you want. You difine regions in the layout:
<layout>
<root-layout background-color="blue" width="320" height="290"/>
<region id="videoregion" top="0" left="0" width="320" height="240" fit="meet"/>
<region id="textregion" top="240" left="0" width="320" height="30"/>
<region id="linkregion" top="270" left="0" width="320" height="20"/>
</layout>
I got part of this from the internet, but here's a quick explanation. The root-layout part defines the whole area. Within this area you have regions. The first region defines the video region and you can give it any id. The origin of the screen is upper-left. fit="meet" means the the movie will be proportional to fit the whole movie. You can change it to other parameters (read the link from the last post). So here, three regions are defined. The first is for the movie (I used a slideshow from iPhoto), the second is for captions in the middle, and the third region is for the link region at the bottom of the screen. You can use any region as a link. Within these regions you place your movies, text, etc. (see the link for more types).
You next place your types in the body:
<body>
<par>
<!-- VIDEO -->
<video src="slideshow.mov" region="videoregion" id="mov"/>
<!-- CAPTIONS -->
<textstream src="caption.txt" region="textregion" system-language="en" system-captions="on" title="english captions" alt="english captions"/>
(a href="file://localhost/Users/kel/Desktop/linkapp" show="new")
<text src="text.txt" region="linkregion" end="id(mov)(end)"/>
(/a)
</par>
</body>
video src says what type of object, slideshow.mov is the name of my movie. If you place the movie in the same folder as the smil file, you can use just its name like I did. Then you enter what region you want the movie in. The id="mov" part is to give this video a reference for later use. I used it to keep the text in the link area running until the movie ended. You don't need captions if you don't want, but if you do here's an example of my captions.txt file:
{QTtext} {font: Arial} {justify: center} {size: 12} {backcolor:0, 0, 0} {timescale: 30} {width: 320} {height: 60}
[00:00:00.00]
Kelvin: Here is my movie.
[00:00:04.15]
{justify:left} {italic} Here is more text. {plain}
[00:00:07.04]
After 4 15/30 seconds the text changes.
So altogether, I had five files in the same folder: the smil file (slidshow.smil - plain text), the movie (slideshow.mov), the caption text (caption.txt - plain text), and the text file for the link region's text (text.txt - plain text). The script application was on my desktop:
"file://localhost/Users/kel/Desktop/linkapp"
It's easy to get a local file url through applescript:
set f to choose file -- the script app
tell application "Finder"
set the_url to url of f
end tell
and the the local file url is returned in the result.
The movie needs work. I was playing around with the colors. blue is not a good background color.
One thing I forgot to say is that you need to read more about the timing (duration). There are a lot of examples and tutorials on the Internet also. It's not that hard though. One thing you might have trouble with is getting repeats to work. I don't think they do.
gl,

Similar Messages

  • Can a menu link to .html pages?

    I want to make a DVD that will start with a video introduction, and upon finishing the brief minute or so intro, it will display a menu screen.
    1.) I would like the menu buttons to link to .html pages saved on the DVD. So after clicking on a link from the menu, it will open up a full-screen .html page.
    2.) Each .html page will link to other .html pages and have embedded images, and short quitcktime video clip links that will open up in small windows when links are clicked.
    3.) I need to have a link on each .html page that links back to the main dvd menu.
    Can this be done? Any issues with doing something like this?
    Thanks in advance for any advice!!!!

    Mark - you need to read up on DVD@ccess if you intend doing this through DVDSP. Yes, it is all possible, but you haven't quite got the way it works correct.
    What happens is you embed a URL into a menu. When the menu is accessed (typically by a button from a previous menu) the link is activated and the resource is launched. This opens in a window in front of the DVD playback window. The DVD player continues to run in the background - so you need to allow for that when returning. The viewer will simply close the web browser window and be back at the DVD window - by then you should have made the @ccess menu 'time-out' and return to the previous menu.
    You set up the HTML file (or whatever file you are using) in a folder on your Mac, and place it all within a parent folder. From within DVDSP you then use the property Inspector for the disc itself (click not he disc icon in the outline view) to specify a ROM folder. You browse for the parent folder you just created. Everything inside that will get added to the root level of the DVD, which is why you place your HTML inside a folder within that parent folder (unless of course, you don't mind your HTML file/s being scattered all over the root of the DVD).
    You set the URL for the @ccess link by using the following path format:
    file:///DVDname/ParentFolderName/filename.extension
    So if your html file is called 'index' and it is in a folder called 'ROM' on your DVD called 'Project' then the URL you set in the menu would be:
    file:///Project/ROM/index.html
    This should then get activated (as long as you have enabled DVD@ccess links in your DVD Player software).
    However, there are some caveats.
    Whilst this will work quite well on a Mac, a PC user will have a wildly varied experience - for some the links will work. For some the links won't work, and for some, all links will launch the moment the first link is encountered... ALL PC users will need to install the DVD@ccess software (which will be on the built DVD by default (DVDSP includes it there for you), unless they have already done so previously (unlikely).
    In order to maximise the experience for PC users and Mac users you should consider using Sonic's 'eDVD' to add the hyperlinks. This makes use of the Interactual player which has a far higher installed base in PCs, but will need installing in Macs. Again, this gets included on the disc when you use eDVD.
    eDVD is a PC only app - you'll need to build your project and transfer the VIDEO_TS folder to a PC, add the links and then burn it to disc or use software such as Gear Pro to create a DLT. Hopefully Jim (WTS) will see this and give more advice on how to use eDVD.
    Getting DVD@ccess working on a PC is a tricky thing to do - a lot depends on the PC software spec, and since you can't govern the user's choice in this, you are walking a tightrope of compatibility.
    Of course, you could simply set some text into your menu to say that there is additional content on the disc, and let the user browse to it at their leisure instead of relying on embedded links...

  • How link from html page to a specific frame in flash cs5 as3

    Hi!
    I'm kinda new around here. I am interested in knowing how to link from a specific html page to a specific frame in flash cs5 as3.
    I have a website that I originally began to design in flash but later started developing new pages for it in html. The flash part of it has several pages on different frames and I have created links from the flash part to the other html pages, but, I can only link the html pages back to the main flash home page, and not the other pages in the flash part of the website.
    I have read that in cs3 it was possible using the flashvars skip variable, but I don't know how to do it. I have not yet seen any working examples and I could not find any instructions / tutorials online for cs5.
    Can someone help here?

    add a query string, to the swf's embedding html, with variable/value indicating the frame you want to display in your swf.  add a javascript function to return the query string (or entire url), call the javascript function from flash using the externalinterface class.  and finally add code to your swf to parse the returned url or query string, parse it and then direct your timeline to the appropriate frame.

  • Adding link to html page

    How do I add a link to html page through java code?
    If I want to see some text in the code as a link to some web page,then please let me know the changes I'll have to make in ordre to get the desired result.

    Hi,
    According to http://help.sap.com/javadocs/NW73EHP1/SPS14/CE/wdr/com.sap.wdr/index.html there are only two types of scopes APPLICATION_SCOPE  and TASK_SCOPE.
    My guess is that they both rely on browser cache somehow.
    Aviad

  • Trying to link a html page in AS3

    I made a flash site with a button I want to link to a html page I made. But I don't know what I'm doing. I tried this:
    _root.cele1.on(release);{
    getURL("celebrities.html");
    where cele1 is the button name, but that don't work.  I know what I need to do to navigateToURL but I want to link a HTML page I created.
    Any help would be great. Thanks.

    THis is likely a literal case of helping yourself... See your other posting and leave out the part where you try to size the window...
    I'm trying to make the window size smaller in flash actionscript 3.0

  • Apple Script to Sort through the Address Book

    Dear All,
    I am quite new to Apple and just a learner on Apple-scripts. Its been quite a task to learn.. I would require some help on a few things..
    The script will eventually use numbers to send email and get the user inputs and any yet to reach there..
    After going through lots of scripts to sort through the address book and make a clean address book, i found they are quite slow in processing takes about 20~30 Minutes to get through 2000 Contacts..
    Hence after reading posting of Mr. Koenig & Mr. Hiroto and specifically on deep copy. I have written the following code which does the following on 2000 records within 6~8Mins.
    The Script work its way through all the contact is the address List.. and creates Groups
    1. Duplicate Email Id's — List of Contacts with same email ID's including Contacts where the email Id is entered twice.. (Strange.. Address Book Issue, copy of the email Id under work & home)
    2. Duplicate Phone — List of Contacts with same Phone Numbers including Contacts where the Phone Nos is entered twice.
    3. Duplicate Name — List of Contacts with Same Names
    4. Duplicate No Name — List of Contacts without the First Name and Last Name
    it also sort the Contacts under the following Group which you can edit later with all the information's..
    1. Only Email Ids — List of Contacts with Email ID and No Phone Numbers
    2. Only Phone — List of Contacts with Phone Numbers and No Email Id's
    3. No Email or Phone — List of Contacts with No Email Id's and No Phone numbers (some half completed contacts )
    My Question to the forum is why is the following code still taking too much time..
    set onlyDupEList to every person of group theGroupEmail
    repeat with j from 1 to count of Dup_email
    set tempdata to item j of Dup_email
    if onlyDupEList does not contain {tempdata} then add tempdata to group theGroupEmail
    end repeat
    save application "Address Book"
    and the scripts slows down when the items in the list is quite large (over 800 or so )..
    Any help is appreciated and thanks in advance..
    -- the code ---
    global MsgTitle
    on run
    set MsgTitle to "Search for Duplicates in Address Book Contacts"
    display dialog ¬
    "This Script takes a while to finish" & return & "maybe 10 min or More..." & return & "Depending on the Address Book Contacts." & return & return & "Hence Allow it to run for the while" with title MsgTitle ¬
    with icon 1 ¬
    buttons {"Continue"} ¬
    giving up after 5
    set question to display dialog "Select the Duplicate Search Parameter " with icon 1 with title MsgTitle ¬
    buttons {"Contact Name", "Contacts on Phone & Email Id's", "Quit"} default button 3
    set rtnValue to button returned of question
    if rtnValue is "Quit" then
    -- tell application "Address Book" to quit
    tell me to quit
    end if
    if rtnValue is "Contact Name" then
    -- tell application "Address Book" to quit
    GetDup_byName("Duplicate Name")
    end if
    if rtnValue is "Contacts on Phone & Email Id's" then --Contacts on Phone & Email Id's
    -- tell application "Address Book" to quit
    Get_dup()
    end if
    end run
    --- Search on Name Field ---
    on GetDup_byName(theGroupName)
    set question to display dialog "Do you want to search for duplicates based on Names? " with icon 0 with title MsgTitle ¬
    buttons {"Continue", "Quit"} default button 1
    set rtnValue to button returned of question
    if rtnValue is "Quit" then
    -- tell application "Address Book" to quit
    tell me to quit
    end if
    tell application "Address Book"
    activate
    set biglist to {}
    set NoNameList to {}
    set theGroupNoName to "Duplicates No Names"
    set theGroup to theGroupName
    -- if not (exists (group "Dupilicate Entries")) then
    if not (exists (group theGroup)) then
    make new group with properties {name:theGroup}
    save
    end if
    if not (exists (group theGroupNoName)) then
    make new group with properties {name:theGroupNoName}
    save
    end if
    set the_names to name of people
    repeat with i from 1 to number of items in the_names
    set theName to item i of the_names
    -- return theName
    if theName is not in biglist then
    copy theName to end of biglist
    else
    set counter to (people whose name is theName)
    if (count of counter) > 1 then
    repeat with i from 1 to number of items in counter
    set this_item to item i of counter
    -- display dialog this_item
    add this_item to group theGroup
    end repeat
    -- return counter as string
    end if
    end if
    -- captures the Contacts without Name ---
    if theName contains "@" then
    -- display dialog theName
    set counterList to (people whose name is theName)
    repeat with i from 1 to number of items in counterList
    set this_item to item i of counterList
    -- display dialog this_item
    add this_item to group theGroupNoName
    end repeat
    end if
    -- save application "Address Book"
    end repeat
    save application "Address Book"
    set peopleCount to (count every person)
    -- set peopleCount to 50 -- only for testing --
    repeat with i from 1 to peopleCount
    set first_name to first name of person i as string
    set Last_Name to last name of person i as string
    if first_name is equal to "missing value" and Last_Name is equal to "missing value" then
    -- display dialog first_name & " : " & Last_Name
    set end of NoNameList to (id of person i)
    end if
    end repeat
    repeat with j from 1 to the count of NoNameList
    set tempdata to item j of NoNameList
    -- set testdata to person id tempdata
    -- if (name of groups of testdata does not contain theGroupNoEmail) then
    add tempdata to group theGroupNoName
    -- end if
    end repeat
    save application "Address Book"*)
    display dialog ¬
    "This Script Finished Processing Address Book Contacts the Duplicates are in the group" with title MsgTitle ¬
    with icon 1 ¬
    buttons {"Continue"} ¬
    giving up after 5
    end tell
    end GetDup_byName
    on Get_dup()
    set question to display dialog "Do you want to search for duplicates based on Names? " with icon 0 with title MsgTitle ¬
    buttons {"Continue", "Quit"} default button 1
    set rtnValue to button returned of question
    if rtnValue is "Quit" then
    -- tell application "Address Book" to quit
    tell me to quit
    end if
    tell application "Address Book"
    activate
    set theGroupEmail to "Duplicate Email Id's"
    set theGroupPhone to "Duplicate Phone"
    set theGroupNoEmail to "Only Phone Numbers"
    set thegroupNoPhone to "Only Email Id's"
    set theGroupNoData to "No Email or Phone"
    -- set theGroup to theGroupName
    if not (exists (group theGroupEmail)) then
    make new group with properties {name:theGroupEmail}
    save "Address Book"
    end if
    if not (exists (group theGroupPhone)) then
    make new group with properties {name:theGroupPhone}
    save "Address Book"
    end if
    if not (exists (group theGroupNoEmail)) then
    make new group with properties {name:theGroupNoEmail}
    save "Address Book"
    end if
    if not (exists (group thegroupNoPhone)) then
    make new group with properties {name:thegroupNoPhone}
    save "Address Book"
    end if
    if not (exists (group theGroupNoData)) then
    make new group with properties {name:theGroupNoData}
    save "Address Book"
    end if
    set ListofPeople to people --the_ID
    set ListofEmailID to value of emails of people --the_emails
    -- return ListofEmailID
    set ListofPhones to value of phone of people -- the_phones
    -- return ListofPhones
    set biglist to {}
    set ListEmail_Uniq to {}
    set ListEmail_Dup to {}
    set No_PhoneList to {}
    set No_EmailList to {}
    set No_dataList to {}
    set FlagEmail to false
    set FlagPhone to false
    -- repeat with i from 1 to number of items in the_emails
    repeat with i from 1 to count of ListofEmailID
    set thePersonID to item i of ListofPeople
    set theEmails to item i of ListofEmailID
    if theEmails is equal to {} then
    set end of No_EmailList to thePersonID
    else
    -- set FlagEmail to true
    repeat with j from 1 to count of theEmails
    set tmpdata to item j of theEmails
    -- return tmpdata
    if tmpdata is not in biglist then
    set end of biglist to tmpdata
    set end of ListEmail_Uniq to {tmpdata} & {thePersonID}
    else
    set end of ListEmail_Dup to {tmpdata} & {thePersonID}
    end if
    end repeat
    end if
    end repeat
    -- return ListEmail_Uniq
    -- return ListEmail_Dup
    -- save application "Address Book"
    set biglist to {}
    set ListPhone_Uniq to {}
    set ListPhone_Dup to {}
    -- repeat with i from 1 to number of items in the_emails
    repeat with i from 1 to count of ListofPhones
    set thePersonID to item i of ListofPeople
    set thePhones to item i of ListofPhones
    if thePhones is equal to {} then
    set end of No_PhoneList to thePersonID
    else
    -- set FlagPhone to true
    repeat with j from 1 to count of thePhones
    set tmpdata to item j of thePhones
    -- return tmpdata
    if tmpdata is not in biglist then
    set end of biglist to tmpdata
    set end of ListPhone_Uniq to {tmpdata} & {thePersonID}
    else
    set end of ListPhone_Dup to {tmpdata} & {thePersonID}
    end if
    end repeat
    end if
    end repeat
    -- return ListPhone_Uniq
    -- return ListPhone_Dup
    set the Dup_email to {}
    -- Find the Duplicates from the sorted list --
    repeat with i from 1 to the count of ListEmail_Dup
    set tempdata to item i of ListEmail_Dup
    set dataEmailDup to item 1 of tempdata
    set dataPersonDup to item 2 of tempdata
    repeat with j from 1 to the count of ListEmail_Uniq
    set tempdata to item j of ListEmail_Uniq
    set dataEmailUniq to item 1 of tempdata
    set dataPersonUniq to item 2 of tempdata
    -- display dialog mainEmail1 & "=" & mainEmail2 & " " & mainID1 & "=" & mainID2
    if dataEmailDup is equal to dataEmailUniq then
    set end of Dup_email to dataPersonDup -- & "," & dataPersonUniq
    set end of Dup_email to dataPersonUniq
    end if
    (* -- the code takes lot more time if add to group was used --
    if dataEmailDup is equal to dataEmailUniq then
    set testdata to person id dataPersonDup
    add testdata to group theGroup
    set testdata to person id dataPersonUniq
    add testdata to group theGroup
    end if
    end repeat
    end repeat
    -- return Dup_email
    set the Dup_Phone to {}
    -- Find the Duplicates from the sorted list --
    repeat with i from 1 to the count of ListPhone_Dup
    set tempdata to item i of ListPhone_Dup
    set dataPhoneDup to item 1 of tempdata
    set dataPersonDup to item 2 of tempdata
    repeat with j from 1 to the count of ListPhone_Uniq
    set tempdata to item j of ListPhone_Uniq
    set dataPhoneUniq to item 1 of tempdata
    set dataPersonUniq to item 2 of tempdata
    -- display dialog mainEmail1 & "=" & mainEmail2 & " " & mainID1 & "=" & mainID2
    if dataPhoneDup is equal to dataPhoneUniq then
    set end of Dup_Phone to dataPersonDup -- & "," & dataPersonUniq
    set end of Dup_Phone to dataPersonUniq
    end if
    (*if dataPhoneDup is equal to dataPhoneUniq then
    set testdata to person id dataPersonDup
    add testdata to group theGroup
    set testdata to person id dataPersonUniq
    add testdata to group theGroup
    -- save
    end if*)
    end repeat
    end repeat
    -- return Dup_Phone
    set onlyDupEList to every person of group theGroupEmail
    repeat with j from 1 to count of Dup_email
    set tempdata to item j of Dup_email
    if onlyDupEList does not contain {tempdata} then add tempdata to group theGroupEmail
    end repeat
    save application "Address Book"
    set onlyDupPList to every person of group theGroupPhone
    repeat with j from 1 to count of Dup_Phone
    set tempdata to item j of Dup_Phone
    if onlyDupPList does not contain {tempdata} then add tempdata to group theGroupPhone
    end repeat
    save application "Address Book"
    set onlyPhoneList to every person of group theGroupNoEmail
    repeat with j from 1 to the count of No_EmailList
    set tempdata1 to item j of No_EmailList
    if No_PhoneList does not contain {tempdata1} then
    if onlyPhoneList does not contain {tempdata1} then add tempdata1 to group theGroupNoEmail
    end if
    (*set flagE to false
    repeat with i from 1 to the count of No_PhoneList
    set tempdata2 to item i of No_PhoneList
    if tempdata1 is equal to tempdata2 then
    set flagE to true
    exit repeat
    end if
    end repeat
    if flagE is false then add tempdata1 to group theGroupNoEmail*)
    end repeat
    save application "Address Book"
    set onlyEmailList to every person of group thegroupNoPhone
    repeat with j from 1 to the count of No_PhoneList
    set tempdata1 to item j of No_PhoneList
    if No_EmailList does not contain {tempdata1} then
    if onlyEmailList does not contain {tempdata1} then add tempdata1 to group thegroupNoPhone
    end if
    end repeat
    save application "Address Book"
    set onlyList to every person of group theGroupNoData
    repeat with i from 1 to count of ListofPeople
    if (item i of ListofEmailID is equal to {}) and (item i of ListofPhones is equal to {}) then
    set tempdata to item i of ListofPeople
    if onlyList does not contain {tempdata} then add tempdata to group theGroupNoData
    end if
    end repeat
    save application "Address Book"
    display dialog ¬
    "This Script Finished Processing Address Book Contacts the Duplicates are in the group" with title MsgTitle ¬
    with icon 1 ¬
    buttons {"Continue"} ¬
    giving up after 5
    end tell
    end Get_dup
    on quit
    --set MsgTitle to "Change Email ID's Domain Name"
    save application "Address Book"
    display dialog "Contact Srikanth Kamath at [email protected] for any Help" with title MsgTitle with icon 1 buttons "OK"
    continue quit
    end quit

    Hello Srikanth Kamath,
    I'm not sure you're still following this thread, but anyway here's sample code I said I'd post later.
    --SCRIPT2
    main()
    on main()
    script o
    -- input data
    property xx : {1, 2, 3, 4, 5} -- list of parents
    property yy : {{"g", "h"}, {"a", "b"}, {"b", "e", "f"}, {"e"}, {"c", "d"}} -- list of children per parent
    -- work list
    property pp : {} -- list of children tagged by parent; i.e, lits of {child, parent}
    property qq : {}
    property rr : {}
    -- (1) build list of children tagged by parent
    repeat with i from 1 to count my xx
    set x to my xx's item i
    set y to my yy's item i
    repeat with p in y
    set end of my pp to {p's contents, x}
    end repeat
    end repeat
    --return pp -- {{"g", 1}, {"h", 1}, {"a", 2}, {"b", 2}, {"b", 3}, {"e", 3}, {"f", 3}, {"e", 4}, {"c", 5}, {"d", 5}}
    -- (2) sort tagged list by child as key
    msort(my by_key1, my pp)
    --return pp -- {{"a", 2}, {"b", 2}, {"b", 3}, {"c", 5}, {"d", 5}, {"e", 3}, {"e", 4}, {"f", 3}, {"g", 1}, {"h", 1}}
    -- (3) retrieve parents with duplicate child
    (* retrieve list of {child, parent} for duplicate child *)
    set my qq to uniq(my eq_key1, my pp, {_dup:true})
    --return qq -- {{"b", 2}, {"b", 3}, {"e", 3}, {"e", 4}}
    (* retrieve list of parent *)
    repeat with q in my qq
    set r to q's item 2
    if r is not in my rr then set end of my rr to r
    end repeat
    return rr -- {2, 3, 4}
    end script
    tell o to run
    end main
    on by_key1(x, y)
    msort's comparator for list of lists
    key = item 1, ascending
    returns true iff x and y are out of order
    return x's item 1 > y's item 1
    end by_key1
    on eq_key1(x, y)
    uniq's comparator for list of lists
    key = item 1
    returns true iff x and y are considered equal
    return x's item 1 = y's item 1
    end eq_key1
    on msort(cmp_, aa) -- v1.2f2
    Basic recursive merge sort handler having list sorted in place.
    handler cmp_ : comparator
    * cmp_(x, y) must return true iff list element x and y are out of order.
    list aa : list to be sorted in place
    script o
    property parent : {} -- limit closure to minimum
    property xx : aa -- to be sorted in place
    property xxl : count my xx
    property yy : {}
    property cmp : cmp_
    on merge(p, q, r)
    property xx: source list
    integer p, q, r : absolute indices to specify range to be merged such that
    xx's items p thru r is the target range,
    xx's items p thru (q-1) is the first sublist,
    xx's items q thru r is the second sublist.
    (p < q <= r)
    local i, j, k, xp, xr, yi, yj, ix, jx
    if r - p = 1 then
    set xp to my xx's item p
    set xr to my xx's item r
    if my cmp(xp, xr) then
    set my xx's item p to xr
    set my xx's item r to xp
    end if
    return -- exit
    else
    if p < q - 1 then merge(p, (p + q) div 2, q - 1)
    merge(q, (q + r + 1) div 2, r)
    end if
    At this point, sublits xx[p, q-1] and xx[q, r] have been already sorted (p < q <= r)
    if my cmp(my xx's item (q - 1), my xx's item q) then
    else -- xx[p, q-1] & xx[q, r] are already sorted
    return
    end if
    set yy to my xx's items p thru r -- working copy for comparison
    set ix to q - p
    set jx to r - p + 1
    set i to 1
    set j to q - p + 1
    set k to p
    set yi to my yy's item i
    set yj to my yy's item j
    repeat
    if my cmp(yi, yj) then
    set my xx's item k to yj
    set j to j + 1
    set k to k + 1
    if j > jx then
    set my xx's item k to yi
    set i to i + 1
    set k to k + 1
    repeat until k > r
    set my xx's item k to my yy's item i
    set i to i + 1
    set k to k + 1
    end repeat
    return
    end if
    set yj to my yy's item j
    else
    set my xx's item k to yi
    set i to i + 1
    set k to k + 1
    if i > ix then
    set my xx's item k to yj
    set j to j + 1
    set k to k + 1
    repeat until k > r
    set my xx's item k to my yy's item j
    set j to j + 1
    set k to k + 1
    end repeat
    return
    end if
    set yi to my yy's item i
    end if
    end repeat
    end merge
    on cmp(x, y)
    (* primary comparator *)
    return x > y
    end cmp
    local d, i, j
    if xxl ≤ 1 then return
    if cmp_ = {} then set my cmp to cmp -- comparator fallback
    my merge(1, (xxl + 1) div 2, xxl)
    end script
    tell o to run
    end msort
    on uniq(eq_, aa, {dup:dup}) -- v0.21
    handler eq_ : comparator eq_(x, y) that returns true iff x and y are considered equal
    list aa : pre-sorted list
    (precisely, a list organized such that any duplicate items are adjacent to each other)
    boolean _dup : option whether return unique items or duplicate items
    return duplicate if true, unique otherwise.
    script o
    property parent : {} -- limit closure to minimum
    property xx : aa
    property yy : {}
    property eq : eq_
    on eq(x, y)
    (* primitive comparator *)
    x = y
    end eq
    if eq_ = {} then set my eq to my eq -- comparator fallback
    local t, x, _on
    if (count my xx) < 2 then return my xx's contents
    if _dup then
    set _on to false
    set t to my xx's item 1
    repeat with i from 2 to count my xx
    set x to my xx's item i
    if eq(x, t) then
    set end of my yy to t
    set _on to true
    else if _on then
    set end of my yy to t
    set _on to false
    end if
    set t to x
    end repeat
    if _on then set end of my yy to x
    return my yy's contents -- return duplicate elements
    else
    set t to my xx's item 1
    set end of my yy to t
    repeat with i from 2 to count my xx
    set x to my xx's item i
    if eq(x, t) then
    else
    set end of my yy to x
    set t to x
    end if
    end repeat
    return my yy's contents -- return uinque elements
    end if
    end script
    tell o to run
    end uniq
    --END OF SCRIPT2
    In order to apply it to your current Address Book problem, replace the main() handler with something like the following one.
    --SCRIPT2a (part)
    on main()
    script o
    -- input data
    property xx : {} -- list of parent; given later
    property yy : {} -- list of children per parent; given later
    -- work list
    property pp : {} -- list of children tagged by parent; i.e, lits of {child, parent}
    property qq : {}
    property rr : {}
    -- (0) get input data from AB
    tell application "Address Book"
    tell people
    set xx to its id
    set yy to its every email's value
    end tell
    end tell
    -- (1) build list of children tagged by parent *)
    (* omitted (same as the previous) *)
    -- (2) sort tagged list by child as key
    (* omitted (same as the previous) *)
    -- (3) retrieve parents with duplicate child
    (* omitted (same as the previous) *)
    -- (4) group the retrieved people in AB
    tell application "Address Book"
    repeat with r in my rr
    add person id r to group "duplicate email"
    end repeat
    end tell
    end script
    tell o to run
    end main
    --END OF SCRIPT2a
    Good luck,
    Hiroto
    Message was edited by: Hiroto

  • Need help with creating template. Changes are not going through to index.html page

    Hi all,
    I have an issue with my template that I am creating and also a question about creating template Regions (Repeating and Editable).
    Somehow my changes to my index.dwt are not changing my index.html page.
    Also my other question is: For my top navigation bar and left navigation bar links, do I need to select and define each individual button or link as Repeating/Editable Region? or can I just select the whole navigation bar (the one on the top) etc...
    Below are my steps for creating my template...I am kinda fairly new to using DW and this is my first attempt to making a template following the DW tutorial CD that came with DW CS3.
    I appreciate any help with this...regards, Dano
    -Open my index.html file
    -File/save as template
    -Save
    -update links - yes
    -Select Repeating and Editable Regions (I selected the whole top navigation bar and selected Repeating Region and Editable Region, same with the left side navigation links)
    -File close all
    -Open the index.dwt
    -Save as and selected the index.html and chose to overide it..
    When I make changes to my index.dwt it is not changing the index.html
    I feel that I am missing some important steps here.....
    Website address
    www.defenseproshop.com

    Figured out

  • Flash button - linking to HTML page - weird problem

    There could be a really easy solution for this, but I can't
    figure it out. I have a simple button that links to an anchor
    within an HTML page. Here the actionscript for the button:
    on (release) {
    getURL ("test.html#two");
    when the button is pressed, the HTML page comes up but only
    to the top of test.html. The '#two' is not passed to the URL .
    Seems like everything after '#' is ignored. How can I get around
    this?

    hi
    on(press)
    getURL("path of html page");
    }

  • Add Podcast link to HTML page

    Hi.
    I want to put a link to my podcast on a regular HTML page. I want my users to be able to click it and have the link redirect to iTunes on their computer and have it download there. How do I do that?

    I figured it out. I neglected to say that the podcast was from iWeb.

  • Attempting to link to html page

    I have made an fla for an intro but I want to create a link
    to click on that will take the viewer to the next page of the
    website, which is a regular html page. I have used the help example
    to apply the following actionscript to a button with a named
    instance of "enterBtn".
    // Attach to frame
    enterBtn.onRelease = function () {
    getURL("
    http://www.mywebsite.net/mainframe.html",
    "_blank");
    However, with the above code I get the following syntax
    error;
    **Error** Scene=Scene 4, layer=Glow Behind FrameBTN,
    frame=309:Line 2: Statement must appear within on handler
    enterBtn.onRelease = function () {
    Total ActionScript Errors: 1 Reported Errors: 1
    >>Am I on the right path? Or do I need to use the:
    var listenerObject:Object = new Object();
    listenerObject.onLoadInit = function(target_mc:MovieClip) {
    target_mc.onRelease = function() {
    getURL("
    http://www.mywebsite.net/",
    "_blank");
    Can anyone help me please?
    Thanks!

    Hello.
    The error probably is because you wrote the code on a
    "button" type clip.
    If you selected the enterBtn in stage then typed your actions
    then try to change
    enterBtn.onRelease = function()
    to
    on(Release)

  • Help with getting links from HTML page

    Hello all. I found the sun tutorial for getting HREF values from a tags in an HTML document at <http://java.sun.com/developer/TechTips/1999/tt0923.html>. My question now is how would a person add the ability to get the text of the link to this code?
    For example:
    Provided the HTML code:<a href="link.html">example</a>Returned is: href=link.html text=example

    I think the TechTip you've linked too is quite old (1999). I would write a simple SAXParser that uses TagSoup (http://www.ccil.org/~cowan/XML/tagsoup/) as its input source. In your handler, simply set a flag and reset a StringBuffer to collect the contents of any <a>...</a> element. Simplified:
        public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
            if ("a".equals(localName)) {
                currentHref = attributes.getValue("href");
                if (currentHref != null && currentHref.length() > 0) {
                    inLink = true;
                    //reset the string buffer
                    buffer.setLength(0);
        public void characters(char[] ch, int start, int length) throws SAXException {
            if (inLink) buf.append(ch, start, length);
        public void endElement(String uri, String localName, String qName) throws SAXException {
            if ("a".equals(localName) && inLink) {
                inLink = false;
                //add link to the stack
                links.add(new Link(currentHref, buffer.toString()));
        }Completely untested, of course... .Good luck...

  • Mail RSS: Apple Hot News RRS does not display html page/images

    Hi, everyone who use Lion in my community has Apple Hot News RRS and it is perfectly displayed in Mail RSS feed. as an html letter with pctures and etc.
    I get only plain text with "read more" in the end.
    I tryed to find the solution in every preference, option or right click - but either I'm too dumb or it is too complicated to be changed?
    Please help.

    Something I didn't mention in my original post: when I view the messages in webmail using Safari (the latest), all the content is there; but when the same messages are brought into Mail the content disappears.
    Fortunately for me, the issue seems to reside only in content coming from this particular server; other html content comes through just fine. This is why I spent a week in server-side tech support. But because the content is viewable in ALL OTHER mail clients AND webmail, they think it's a problem with Mail.
    And yes, I've fiddled with my phplist config.php file, and compared it to other phplist config settings that I use successfully. Besides the things that must change, all other settings are identical.
    Apple tech? Any response?

  • Problem with return link from html page back to css page

    Here is the site..almost ready for publication
    http://www.matriley.com/glensite/index.html
    1) Go to properties for sale
    2)Choose a suberb
    3)click on a property with a video
    4) watch the crazy video if you like
    5) Click go back to properties
    ^) Yes the page is there but the property page is now
    inactive...why?
    8)The whole thing works fine on Firefox but we do have this
    Glitch on IE
    PLEAASSE Can someone help
    Regards Matthew [email protected]
    Everything works well but for the problem return link to the
    properties page after you have gone to the video.The property page
    becomes inactive

    Your page is a monster -
    Empty Cache
    10.6K 1 HTML/Text
    1.5K 1 Stylesheet File
    985.4K 25 Images
    997.7K Total size
    27 HTTP requests
    25 images with aggregate weight of ~1MB is much too large,
    you know?
    Anyhow, I cannot reproduce your problem in IE7. Are you
    referring to IE6,
    instead?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "fredbillmatt" <[email protected]> wrote in
    message
    news:fv0m9k$a7a$[email protected]..
    > Here is the site..almost ready for publication
    >
    http://www.matriley.com/glensite/index.html
    >
    > 1) Go to properties for sale
    > 2)Choose a suberb
    > 3)click on a property with a video
    > 4) watch the crazy video if you like
    > 5) Click go back to properties
    > ^) Yes the page is there but the property page is now
    inactive...why?
    > 8)The whole thing works fine on Firefox but we do have
    this Glitch on IE
    > PLEAASSE Can someone help
    > Regards Matthew [email protected]
    > Everything works well but for the problem return link to
    the properties
    > page
    > after you have gone to the video.The property page
    becomes inactive
    >

  • Removing BCC with Apple Script when automatically BCC myself is set in pref

    I have "Automatically Bcc myself" set in the Mail Composing preferences, which I like because I get a copy of email that I send. I also have an apple script that forwards messages to an email address. When I used this apple script on Tiger, the BCC option was never added (it might have been a bug with Mail in Tiger); however, now on Leopard, the BCC option is always added when I used the apple script.
    I've tried setting the BCC field to Null and Blank, but that doesn't seem to work. I suspect that the field is set upon send or the "make new" directive. Does anyone know a way to tell Mail to not Bcc automatically in an Apple Script?
    Here is the forward apple script program:
    (* Cf. http://www.macosxhints.com/article.php?story=20060219014940761 *)
    (* RS 31st July 2006 *)
    set theAuthority to "person AT here"
    tell application "Mail"
    set theMessages to the selection
    repeat with thisMessage in theMessages
    set newMessage to make new outgoing message at end of outgoing messages
    tell newMessage
    set visible to true (* comment out whole line to stop 'blinking' windows *)
    set content to thisMessage's source
    set subject to "Fwd: " & thisMessage's subject
    set bcc to null (* my attempt to set bcc to null or blank *)
    make new to recipient with properties {address:theAuthority}
    end tell
    send newMessage
    set read status of thisMessage to true
    set was forwarded of thisMessage to true
    set junk mail status of thisMessage to true
    end repeat
    end tell

    Thanks for that reply!
    After more google searching, I found this on http://www.macosxhints.com/article.php?story=20040425063255443
    One of the responses said that you can add the lines:
    delete bcc recipients
    delete cc recipients
    "in that order" to the new message tell and get rid of the recipients. I had tried the delete before, but I thought I had to get the recipients before I deleted them. I'm not a very good apple script person. Here is my final script
    (* Cf. http://www.macosxhints.com/article.php?story=20060219014940761 *)
    (* RS 31st July 2006 *)
    set theAuthority to "email address here"
    (* or your personal Knujon address *)
    tell application "Mail"
    set theMessages to the selection
    repeat with thisMessage in theMessages
    set newMessage to make new outgoing message at end of outgoing messages
    tell newMessage
    set visible to false (* comment out whole line to stop 'blinking' windows *)
    set content to thisMessage's source
    set subject to "Fwd: " & thisMessage's subject
    make new to recipient with properties {address:theAuthority}
    delete bcc recipients
    delete cc recipients
    end tell
    send newMessage
    set read status of thisMessage to true
    set was forwarded of thisMessage to true
    set junk mail status of thisMessage to true
    end repeat
    end tell

  • Mov WAIT to start if embedded in HTML

    Hi all,
    I've a large mov (about 250MB) embedded in a HTML page and delivered on CD-ROM.
    I don't know why if I start the mov from the Quicktime Player (double clic on the mov file) the mov starts fast, but If I navigate to the html page that embed the mov, the movie starts after many seconds (almost 20 seconds).
    This happens the first time I run the mov and on Internet Explorer (in Firefox it seems ok). I don't know on MAC.
    It seems that the mov starts when it's been fully read by the player, I've thought it could be for OBJECT or EMBED TAGS, but I've not found info about this problem... I've tried to use "qtsrcdontusebrowser" tag, but I've no success.
    Is there someone who knows why there's this difference of performance between the QT stand alone player and the Browser plugin?
    How can I solve it?
    Thanks in advance
    Federico

    Thanks
    but as I've written I don't publish that on web but on CD-Rom.
    I don't know why in Quicktime Player the movie starts fast but in the QT Browser Plugin it requires so much more time, even if both read from the same CD-Rom.
    Maybe Quicktime Player and Quicktime Browser Plugin play mov in different ways, so at the moment I've used the "target Quicktimeplayer" TAG to run the Player and avoid the problem, even if I'm looking for a better solution to start it into the HTML page.
    Still waiting for hints
    Thanks
    Fede

Maybe you are looking for

  • Activity Monitor crashes every time I launch it since Leopard upgrade.

    Activity Monitor crashes every time I try to launch it. It's done this ever since I first upgraded from Tiger to Leopard. I can't seem to narrow down why it happens. It doesn't seem to matter what's running already. I had it startup automatically whe

  • Desktop is no longer displaying all the colors on it's monitor.

    My desktop computer is no longer displaying all the colors on its montior.  I've replaced the monitor with a known good one and the problem remains the same.  The desktop is 6 months old and when I purchased it, the first one had to be replaced becau

  • Wallet and dbms_crypto

    Hello, I intend to use DBMS_CRYPTO and use personal key that is already stored in a wallet (file). Which steps must i take to bring this key as a parameter to DBMS_CRYPTO.ENCRYPT for encypting BLOB. Al examples i found till now use only self created

  • JSP and Images with database

    Ok, I have looked around on posts on this forum but still haven't come across an answer. I am trying to create a simple jsp page that contains some thumbnail images. The image locations are stored in a mysql database (e.g. http://www.somewhere.com/im

  • What r the activities involved

    Hi to all, thanks to jasmine and abir. i just want to know what  r the activites involved in  so called implementation.can anyone explain me id detail. mail me to [email protected] if u ve a material explaining this in detail r anyone wish to define