Can anybody translate this one-line Visual Basic into AppleScript?

I have been pulling my hair out in trying to get InDesign CS4 to markup selected text with an XML tag. Supposedly this can be done using Visual Basic. Is there anybody out there that could possibly translate this seemingly simply code into AppleScript?
myText.AssociatedXMLElements.Item(1).XMLElements.Add("break", myText)
Here is another example:
With myTSRangeText.AssociatedXMLElements.Item(1).Parent.XMLElements.Add("znak")
  Call .Markup(myTSRangeText)
End With
I am still thinking that AS cannot do this… but it is worth a shot to ask.
Thanks in advance,
Jeff

If it makes any difference
This is what I have so far using AppleScript. It is very very close. But the result of running the script appends the tagged text to the end of the text in the frame. In other words, it looks like this: (assuming I had the characters "word" highlighted). This is because I can only seem to tell the story to markup using the tag. I cannot tell the selection to markup using the tag?
This word is the item I want to tag.[word]
I am wanting the result to tag the selected item. So it should look like this:
This [word] is the item I want to tag.
tell application "Adobe InDesign CS4"
    tell document 1
        set selText to object reference of (text from character 1 to character -1) of selection
        set selTextString to selText as string
        display dialog selText as string
        set parentStoryID to parent story of selection
        set myXMLTag to (get XML tag "theDate")
        set myXMLStoryTag to (get XML tag "Story")
        tell XML element 1
            set theStoryElement to make XML element with properties {markup tag:"Story"}
            tell theStoryElement
                set myXMLElement to make XML element with properties {markup tag:"theDate", contents:selTextString}
                tell parentStoryID to markup using theStoryElement
            end tell
        end tell
    end tell
end tell

Similar Messages

  • ActiveMovie Control,Translating ActiveX calls from Visual Basic into Labview

    Hello,
    I want to use DirectX to display a movie. In the attached file is a Visual Basic example
    which I tried to translate into Labview.
    To play the movie IMediaControl from ActiveMovie control type library Version 1.0 C:\WINDOWS\system32\Quartz.dll) is used.
    To display the current Position I tried to wire the IMediaPostion. But I have no idea how to implement this in the Block Diagram.
    After opening it the following message is shown.
    Error 3005 occurred at Automation Open: Object specified is not creatable in Play Movie Current Possition.vi
    Attachments:
    Play_Movie_Current_Possition.vi ‏48 KB

    Hello Joe,
    the Windows Media Player has a lot of overhead. I also found it difficult to deal with the different Versions.
    I want to display data in a graph and show the connected video frame in a separate window.
    I used the QuartzTypeLib because it is on every Windows Computer and is easy to code in VB.
    With one call I can start the video in Labview., but I find no way to wire the current position. I do not really understand how ActiveX is implemented in Labview. I attached a LV 7.0 vi. I hope you can open it.
    Tiemo
    Attachments:
    Play_Movie_Current_Position.vi ‏63 KB

  • LabView TEDS library into DLL or ActiveX Control so that I can use it in C or Visual Basic?

    We are developing software in LabWindows/CVI and Microsoft C. I heard that LabView can generate DLLs. Can I turn LabView TEDS library into DLL or ActiveX Control so that I can use it in C or Visual Basic development environment?

    Technically what you are proposing is possible with LabVIEW. With LabVIEW's application builder, VIs can be built into dlls. Also, LV has ActiveX hooks and so you could create a system for calling into it from CVI. However, this is not what I would recommend.
    The LabVIEW VIs have been written to a preliminary version of the IEEE specification (1451.4) that describes the TEDS data which is primarily why I'm advising you against using them. Once the IEEE spec is approved (the current timeline is currently late March), it will become public and you can write your own code according to the specification (or wait for someone else to write it). To help you get started, the spec includes flex and bison code that describes the syntax and structure of the template files
    Internally, we've written some C, C++ and Java code to the preliminary version of the spec and we've found that we can duplicate the functionality of the TEDS Library for LV in roughly 2 weeks in any other language.

  • I can't figure this one out...

    I've imported a .swf file into one of my table cells. The
    cell is 700x200. The .swf file is 700x200.
    http://www.associatespd.com/CHSA_Web
    I've recut and resaved my .psd file TWICE. I can't figure
    this one out.
    It seems that the flash file is stretching or something, its
    off one pixel on the right. When i set my flash file at 699 width,
    it was one pixel off on the right.
    Can any offer any suggestions. I'm completely out of ideas.
    Thanks in advance.

    Ally86 wrote:
    > Okay, so I have great vision. But what's the fix? The
    suspense is killing me!
    >
    > My logic is saying that since your graphics is off in a
    precise pattern, and
    > only in your Flash object, that it was moved somewhere
    in the flash file
    > itself. So it would make sense that it would line up if
    you replaced it with
    > the original image (if the problem is in the flash, not
    the table).
    >
    > In my mind, I imagine your flash includes half of the
    text graphics, cut off
    > at that horizontal split - since your movie loads in
    only part of the screen.
    > Maybe I'm beating a dead horse, but double check the
    layer (in your .swf file)
    > that your lettering is in for that eagle-eye split.
    >
    > If it's there, just move the second half over. If it
    can't be seen in the
    > flash, I promise I'll shut up. Just humor me, pretty
    please . . . (I have a
    > sneaking suspicion you're willing to try anything)
    >
    it looks like the graphic's width might have been transformed
    at 101% in Flash.
    If the actual image file has the right width, I don't see any
    other possible explanation.
    You should double check in Flash authoring, select your
    graphic (or your MC or whatever object you
    might have converted it to) and open the transform and/or
    info panel. One of these panels will show
    you the % width and height ratio of your object...
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

  • TS1702 iBooks won't load PDF files any more on my Ipad2. Anybody seen this one before?

    Hello All,
    iBooks won't load PDF files any more.
    I have a lot of PDF files so I thought I reached a maximum number of files or space so I deleted a lot of old files but this did not help.
    I rebooted, synced, updated, restarted, etc. - everything that I can think of and I still have the same problem.
    I don't remembered the last file that I loaded into iBooks, as I usually put them into collections.
    I can still load PDF files into other applications like PDF Reader, but I prefer to have them all in iBooks.
    Anybody seen this one before?
    I have 64GB iPad2 and I have over 14GB free space.

    There have been several threads on this topic over the last few weeks. It's not clear what the issue is, and it is not universal, but tend to effect users storing large numbers of PDFs in iBooks. Possible it has some thing to dowith capacity of the app, or specific characteristics of some of the PDFs.
    You might have a look at the "More Like This" list to the left of this page.

  • Can someone translate this vi to LV 5.0?

    Can someone translate this vi to LV 5.0?
    Thanks
    Gorka
    Attachments:
    Write_Table_and_Chart_to_XL.llb ‏240 KB

    Try this one.
    Hope it works!
    Brian
    Attachments:
    Write_Table_and_Chart_to_XL50.llb ‏163 KB

  • It just doesn't work and help is needed, hence why I'm on a Forum? Brownie points for whoever can help on this one...

    So. As always, it's about iTunes - as Apple is the most inconvenient corporation ever founded. Anyway! I've had this problem for about 6 months and haven't bothered to ask anyone. I've restored the computer numerous times and tried to fix the issue with help from other nonsensical forums. The problem is that 'apple mobile device service' is eating up a large amount of CPU, and therefore tends to make the computer run like a log. I have uninstalled it before but then iTunes won't recognize my iPod - funnily enough. As well as this, iTunes won't connect to the store? However, it doesn't say it's not, it just doesn't load. It states that it is 'accessing iTunes store', but it's not. I'm running all of this on a windows 7 Acer extensa 5235 - just in case that helps. It probably won't, but you guys are clever, right? I mean, I could probably ask you to peel an orange for me, and you'd do it without even physically touching it. Just with the power of your omnipotent minds. Anyway yeah, if anyone can help on this one, would be much appreciated.

    Wow what a rambling mess and complete waste of time.
    Did you try a search of the forums for similar issues?  Doing so would have revealed multiple similar issues with valid troubleshooting, saved you time, and saved those that have read that crap from being subject to your rambling psychosis.
    FYI, in the future, get to the point and cut the crap when asking for help.
    Oh, completely uninstall iTunes and reinstall the current version of iTunes.

  • Hi I am a beginner to ABAP HR .Can anybody suggest how one will write

    Hi I am a beginner to ABAP HR .Can anybody suggest how one will write a program to gat SSN number from the infotype and display it.What are the infotypes used for getting SSN numbers and the various steps involved in doing that.Thanks everybody in advance.

    you can use
    HR_READ_INFOTYPE funtion module for IT0002
    and
    By using LDB PNP
    Get Pernr
    Start of selection
    RP_PROVIDE
    End of selection

  • Hi i updated my iphone but it says that This iPhone is not currently setup to work with carrier you're attempting to use. Please insert another SIM card from a supported carrier or request that this iPhone be unlocked. how can i unlock this one?

    hi i updated my iphone but it says that This iPhone is not currently setup to work with carrier you're attempting to use. Please insert another SIM card from a supported carrier or request that this iPhone be unlocked. how can i unlock this one?

    Your iPhone was hacked or jailbroken before and through the update it locks back to the original carrier. Only the original carrier can unlock the iPhone. You have to contact them and find out what the procedure you needs to follow.

  • How can I translate this from PL/SQL into embedded SQL!?

    CURSOR TEMP1 is
    SELECT emp.fname fname, emp.lname lname, emp.ssn, dname,emp.salary salary, emp1.fname supervisor_fname, emp1.minit supervisor_mdlname,emp1.lname supervisor_lname FROM employee emp, employee emp1,department d
    WHERE emp.superssn=emp1.ssn(+) and emp.dno=dnumber order by ssn;
    PNTR_TEMP1 TEMP1%ROWTYPE;
    --calcualting values for the cursor TEMP1
    for PNTR_TEMP1 in TEMP1 loop
    fname:= PNTR_TEMP1.fname;
    lname:= PNTR_TEMP1.lname;
    ssn := PNTR_TEMP1.ssn;
    dname:=PNTR_TEMP1.dname;
    sup_name:=PNTR_TEMP1.supervisor_fname||' '|| PNTR_TEMP1.supervisor_mdlname||' '||PNTR_TEMP1.supervisor_lname;
    salary := PNTR_TEMP1.salary;
    n_deps:=0 ;
    /* how can I translate this to embedded SQL...I'm using C++*/

    Hi,
    you can follow this link to use cursor in Pro*c /C++
    http://www.csee.umbc.edu/help/oracle8/server.815/a68022/sql.htm
    Regards

  • Just bought an iMac. I want to be able to "remote in" to work. I've been told to download software from Microsoft site but can see there are several versions available. Can anybody advise which one I need. Thanks

    Just bought an iMac. I want to be able to "remote in" to work. I've been told to download software from Microsoft site but can see there are several versions available. Can anybody advise which one I need. Thanks

    You mean Microsoft Remote Desktop Connection Client for Mac

  • Can anybody clarify this problem?

    IN Fs00, if we click dropdown button beside Gl account we will get 1 screen , there if u click ok button , then we can see the all GL master. But, when i was practising, it is not showing. with that gl a/c's i had  posted entries, and saw ledger also.
    Can anybody clarify this problem?

    Hi Srinivas
    This is system problem, ask to you basis guy
    and system admin.
    Other wise check in different system.
    Thanks
    Ranjith

  • Can anybody explain this S_OUT-MAKTX+0(20)?

    can anybody explain this S_OUT-MAKTX+0(20)? what 0(20) implies?

    Here .. u r going to use onli <b>the first 20 characters from the beginning of the string S_OUT-MAKTX</b>..
    seee...
    suppose w_char is a variable of type C of 30 characters length and having the content as 'SAP-ABAP FORUMS'.
    i.e w_char = 'SAP-ABAP FORUMS'.
    now
    w_char+0(4) = 'SAP-'.
    W_CHAR+1(4) = 'AP-A'.
    W_CHAR+3(5) = '-ABAP'.
    i.e <b>Starting from the Third character and upto 5 characters... AND here the counting of the characters starts from 0.</b>
    Hope u understood...
    regards,
    sai ramesh

  • I have office for mac and my return button just keeps on takeing me to the next page as does any letter. I can only basicaly do one line, please help?

    I have a macbook pro and my return key keeps on taking me to another page, I can only basically do one line per page can anyone help?

    Office is a Microsoft application and your issues may be best handled at their web site support.

  • Can WEBUTIL_C_API call dll coded in visual basic

    Hi all
    I wonder if WEBUTIL_C_API supports calling methods in a dll coded in Visual Basic? Or it only supports C, C++ and Visual C++?
    Thank you

    Hi
    I am wondering because in webutil documentation I found this:
    The WebUtil_C_API is a comprehensive API which allows you to call into C libraries on the client. The API only supports Win32 Clients.
    Thank you

Maybe you are looking for

  • Podcast has downloaded for some people but not others

    hello i have an established podcast we have been running for 3 years now. We've just reached our 54th episode and after i uploaded it the podcast it went through to the itunes store... i refreshed my podcast directory and it didnt download to my imac

  • I can't find my siri

    I can't find my Siri. Ever since i bought this 4s

  • How can i refresh my 5s that erase all its content to factry reset

    I tried to reset my 5s they asked me pascode in typed 0000 its my pascode then it again asked me pascode i retyped it never hapened before well i retyoed it says incorect in redbar i tried few atempts the jt says try after 5 minuts then 15 then 60 mi

  • PS CC trial crashes on startup if graphics are enabled

    I recently got a PS CC trial, and when I open it, it crashes immediately. Then when I open it again a dialog comes up saying there's a problem with the display driver and graphics have been temporarily disabled. If I enable them, the cycle starts aga

  • MRP Exception report to send to SAP inbox

    Hello friends, The MRP exception report comes to my outlook and these reports are huge in size. I want them to go to my SAP inbox instead of outlook. I have changed the communication method of my user setting from "INT E-MAIL" to "E-Mail" but it didn