This Applescript will correct links & programs for posting

Since I have been posting to these forms, I have been annoyed by the conversions that are done to my posts. A word surrounded by asterisks gets bolded. When I decide to make a link to a post, I can never remember the exact format. When I posted AppleScript code, I found that it is squish to the left. The AppleScript I have posted here gets around these problems.
Robert
The first thing that you need to do is to make the text into an AppleScript program.
start the AppleScript Editor
/Applications/AppleScript/Script Editor.app
copy the text to the Applescript editor.
save the text to a file as an application and do not check any of the boxes below.
!http://farm4.static.flickr.com/3544/3390737677_645a847e28.jpg?v=0!
now, let's build a link to a post.
get the link to a reply.
Goto this Webpage:
http://discussions.apple.com/post!reply.jspa?messageID=9003196
Copy the Web page address from the top of your Web browser page. This is the standard highlight the address then do a command+c
Now you should run my AppleScript program by going back to the Script Editor. Optional, click the words event log to see the debug information. Click on the run icon.
!http://farm4.static.flickr.com/3423/3391549168_9ce8b6fcd9.jpg?v=0!
The link has been modified. Paste the link onto your Web page. This is the standard command+v.
For a more typical usage, placed the program on the dock or make an alias on the desktop.
Robert
Name: alter-clipboard
Input: Clipboard
Output: Clipboard
This AppleScript program is designed to convert a forum-reply web address  to a link to a forum post, to convert special characters to their HTML symbols, and to convert programming language code to a  form that does not get mangled.
1)   When you wish to reference another Apple discussion forum post, I found the process convoluted.  The Apple form software does not provide for the display of a form post link.  Instead, you must  construct the link from a reply post.  This AppleScript simplifies the process.
  When the clipboard contains a link to a forum reply page, do the conversion.
  Here is that way:
  a) Find the particular post you wish to reference.  
  b) Click on the reply icon.  
  c) Copy  the Web address to the clipboard  (command+c).  
  d) Run this AppleScript to convert the Web address.  
  e) Paste (command+v) the converted Web address into your post.
   For example, you:  
   • Want to reference a post on how to improve the performance of Tiger.  You find a post by Texas Mac Man with a list of possibilities.  
   • Click on the Reply option and highlight the Web address because you know the address contains a reference to this post.
   • Type command+c to copy the address to the clipboard.  The clipboard now contains:
     http://discussions.apple.com/post!reply.jspa?messageID=9124252
   •  Run this AppleScript to convert the Web address. The clipboard now contains:   
           http://discussions.apple.com/message.jspa?messageID=9124252#9124252
   • Type command+v to paste the address   into your new post.
2)  Assume that the clipboard contains  special symbols or formated programming language code to convert.  
  The simpleFormatting property switch in the code selects teletype text ( tt ) when true and selets preformated text ( pre ) when false.      
  This AppleScript will converted special symbols used in these forums to a form not used by the forum software in order to preserve the original characters.
  For the symbols, see:
  See "Other formating tags are available as shown below" in
  http://discussions.apple.com/help.jspa#format
  An alternative to using these symbols is document in this post:
  http://discussions.apple.com/thread.jspa?messageID=607563
  Also, this AppleScript preserves indentation used in programs or Terminal output.
  a) Copy  the text to the clipboard .  
  b) Run this AppleScript to convert the text
  c) Paste the converted text into your post.
  For example,  the asterisks will be preserved:
     mac $ ls *oup*
     Youpi Key Editor.plist  Youpi Key.app alias  
  For example,  the indentation will be preserved:
     on adding folder items to this_folder after receiving dropped_items
        repeat with dropped_item_ref in dropped_items
           display dialog "dropped files is " & dropped_item_ref
        end repeat
     end adding folder items to
  Author: rccharles
  Copyright 2009 rccharles
  GNU General Public License
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation,  version 3
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   For a copy of the GNU General Public License see <http://www.gnu.org/licenses/>.
property simpleFormatting : true -- when true use tt tag to enclose; when false use pre tab to enclose
on run
  -- Write a message into the event log.
  log "  --- Starting on " & ((current date) as string) & " --- "
  set theClip to the clipboard
  if length of theClip > 33 and characters 1 thru 33 of theClip as string = "http://discussions.apple.com/post" then
       http://discussions.apple.com/post&#033;reply.jspa?messageID=9003196
   convert to:
       http://discussions.apple.com/message.jspa?messageID=9003196&#035;9003196
     set theClip to alterString(theClip, "post!reply", "message")
     set {frontPart, postNumber} to textToList(theClip, "=")
     set theClip to theClip & "#" & postNumber
  else
     --  see http://www.asciitable.com/ for the ASCII translations
     -- must be the first change so as not to cause problems.
     set theClip to alterString(theClip, "#", "&#035;")
     --  You need to use either the numeric form of the HTML symbol or
     --  translate HTML character enties as seen below.
     set theClip to alterString(theClip, "&amp;", "&amp;amp;")
     set theClip to alterString(theClip, " ", "&amp;nbsp;")
     -- Preserve blanks
     -- converts two spaces to a space and non-breaking space
     set theClip to alterString(theClip, "  ", "  ")
     set theClip to alterString(theClip, "!", "&#033;")
     set theClip to alterString(theClip, "[", "&#091;")
     set theClip to alterString(theClip, "]", "&#093;")
     set theClip to alterString(theClip, "<", "&#060;")
     set theClip to alterString(theClip, "*", "&#042;")
     set theClip to alterString(theClip, "+", "&#043;")
     set theClip to alterString(theClip, "_", "&#095;")
     set theClip to alterString(theClip, "--", "&#045;&#045;")
     set theClip to alterString(theClip, tab, "   ")
     -- suggested by red_menace from the Mac forums
     set theClip to alterString(theClip, "-", "&#45;")
     set theClip to alterString(theClip, "^", "&#94;")
     set theClip to alterString(theClip, "~", "&#126;")
     if simpleFormatting then
        set theClip to "<tt>" & theClip & "</tt>"
     else
        set theClip to addWrapper(theClip)
     end if
  end if
  set the clipboard to theClip
end run
on alterString(thisText, delim, replacement)
  set resultList to {}
  set {tid, my text item delimiters} to {my text item delimiters, delim}
  try
     set resultList to every text item of thisText
     set text item delimiters to replacement
     set resultString to resultList as string
     set my text item delimiters to tid
  on error
     set my text item delimiters to tid
  end try
  return resultString
end alterString
-- textToList was found here:
-- http://macscripter.net/viewtopic.php?id=15423
on textToList(thisText, delim)
  set resultList to {}
  set {tid, my text item delimiters} to {my text item delimiters, delim}
  try
     set resultList to every text item of thisText
     set my text item delimiters to tid
  on error
     set my text item delimiters to tid
  end try
  return resultList
end textToList
-- suggested by red_menace from the Mac forums
-- some constants and switches
property TextColor : "#000000" -- black  (see http://www.w3schools.com/tags/ref&#095;colornames.asp)
property BackgroundColor : "#FFEE80" -- medium/canary yellow -- "#FFDDFF" -- a light plum/purple
property BorderColor : "#000000" -- black
property TheWidth : "width: 720px; " -- a width attribute
property UseWidth : true -- use the width attribute?
property LineCount : 25 -- the number of lines before including the height attribute
property TheHeight : "height: " & ((LineCount * 13.6) as integer) & "px; " -- a (rough) maximum height for the formatted box
on addWrapper(SomeText)
  fix up some formatting and add a tag wrapper  (see http://www.w3schools.com/tags/default.asp)
     parameters -      SomeText  text to add the wrapper to
     global items -   LineCount, TheHeight, UseWidth, TheWidth,  KeepFormatting,                         
                 BorderColor, TextColor, BackgroundColor
     returns [text]:      the wrapped text
  set {Height, Width} to {"", ""}
  if (count paragraphs of SomeText) is greater than LineCount then set Height to TheHeight
  if UseWidth then set Width to TheWidth
  -- hack...
  -- seems like the apple forum software doubles the returns in a pre tag
  set SomeText to alterString(SomeText, return, "<br>")
  -- change the style properties as needed
  set SomeText to "<pre style=\"
     font-family: Monaco, 'Courier New', Courier, monospace;
     font-size: 10px;
     font-weight: normal;
     margin: 0px;
     padding: 5px;
     border: 1px solid " & BorderColor & ";
     " & Width & Height & "
     color: " & TextColor & ";
     background-color: " & BackgroundColor & ";
     overflow: auto;\"
     title=\"\">" & SomeText & "</pre>
  return SomeText
end addWrapper

Hi,
There is message type BANK_CREATE for posting the FI related Bank details. Using the change pointers you can trigger the idocs for posting the bank related data.
Regards,
Uday

Similar Messages

  • BDC Program for posting FI document

    Hi everyone!
    Anyone out there already made a BDC program for posting FI documents with this concept:
    User will upload a spreadsheet file with the line items per row
    User will input which TCODE user will use for posting
    BDC program will then post the document using the line items in the spreadsheet file
    I need to make a BDC program with that concept but having a hard time to think of a good algorithm to make my program very flexible.
    Thanks!

    you can use batch input program RFBIBL00 to pasrk document. Please check these links for more information.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAGTFADM/CAGTFADM-FI.pdf
    http://help.sap.com/printdocu/core/print46b/en/data/en/pdf/CAGTFADM-FI.pdf
    Have a processing routine defined for the specific Idocs that come into SAP.
    So, as and when the idocs are in, the routine triggers and you can codeappropriately in the routine for parking the idocs.
    Check these threads
    BAPI For Parking FI Document
    Post FI Parked Documents
    You can use message type INVOIC, IDoc Type INVOIC01/02 with process code INVF (FM IDOC_INPUT_INVOIC_FI) for FBV1 transaction.
    See if there are any BAPI/FMs for parking an FI document.
    1.. Use INVOIC01 IDOC with INVF process code (This works for Vendor Line Items only). I read the documentation somewhere that, this would work even if the line items are > 999
    2.. BAPI_ACC_INVOICE_RECEIPT_POST (This works for Vendor Line Items only)
    3.. BAPI_ACC_DOCUMENT_POST (Tax jurisdiction allocation not calculated properly)
    4.. BAPI_ACC_GL_POSTING_POST (No tax line items allowed for this BAPI)

  • Photos does not support external editing like iPhoto. Is there likely to be an upgrade to change this or will I abandon Photos for software that does support editing in Photoshop?

    Photos does not support external editing like iPhoto. Is there likely to be an upgrade to change this or will I abandon Photos for software that does support editing in Photoshop?

    iPhoto does work and there is an upgrade:
    Go to the App Store and check out the Purchases List. If iPhoto is there then it will be v9.6.1
    If it is there, then drag your existing iPhoto app (not the library, just the app) to the trash
    Install the App from the App Store.
    Sometimes iPhoto is not visible on the Purchases List. it may be hidden. See this article for details on how to unhide it.
    http://support.apple.com/kb/HT4928
    One question often asked: Will I lose my Photos if I reinstall?
    iPhoto the application and the iPhoto Library are two different parts of the iPhoto programme. So, reinstalling the app should not affect the Library. BUT you should always have a back up before doing this kind of work. Always.

  • Standard IDOCS, Programs for posting FI & bank related data.

    Hi,
    (1)Are there any idocs available for posting FI documents, Vendor master?
    (2)Are there any outbound idocs, programs for sending data to banks. EG:positive pay etc?
    Kindly reply to these questions. Correct answer will be awarded points.
    Regards,
    Akshaya.

    Hi,
    There is message type BANK_CREATE for posting the FI related Bank details. Using the change pointers you can trigger the idocs for posting the bank related data.
    Regards,
    Uday

  • Mail has correct outgoing smpt address, but Comcast will not accept it for the correct email address. Only on one of the computers (MacBookPro Lion)

    Always worked until this morning, and works on a different copy of MAIL on the other computer. When I try to send mail using my comcast email address, as always, Comcast rejects that email address for the smpt address that is correct and has always worked before. I can't find any .plist files for MAIL to delete, either.

    SERVICE ANNOUNCEMENT
    Dear Valued XFINITY Internet Customer, 
    Action Taken:
    On August 1, Comcast announced that we will no longer support the use of port 25 for sending email. Many older email clients (such as Outlook Express) default to using this port to send email. Please read this message to understand how this action may impact your ability to send email, and what you should do next.  
    Comcast Webmail Users:
    If you use a web browser to access Xfinity Connect or other webmail service, this action will not affect your ability to send or receive e-mail.  
    Email Program Users (Outlook Express, Outlook, MacMail, etc.):
    If you use an email program, this action will disable your program's ability to send email until you change your email program settings to send email on port 465.  To protect your email security, click on the link for your current email software, then follow the step-by-step instructions to change your settings.
    Outlook Express
    Outlook 2003
    Outlook 2007
    Outlook 2010
    Windows Mail
    Mail (Apple OS X)
    Don't see your email software? Then locate the preferences for your mail account in the software you use and provide the settings listed on this page.  Prefer professional tech support? A highly trained, Tech Expert can remotely change your settings to secure your email. To find out about one-time service and fixes, please call 1-877-550-0793 or visitxfinity.com/SignatureSupport.  If you are not using Xfinity Connect and use another email provider, please contact your provider for its recommended port settings. Most email providers offer an alternative to port 25 for sending email.  If you have additional questions please visit our Help and Support site or our Customer Forums where many questions are discussed and answered by the Comcast community.  Thank you for choosing Comcast!  Sincerely,
    Comcast Customer Security Assurance
    This is a service-related email. Comcast will occasionally send you service-related emails to inform you of service upgrades or new benefits.  Services and features are subject to Comcast's standard terms and conditions of service and are subject to change.  Copyright 2012. Comcast. All rights reserved. All other trademarks are properties of their respective owners.  Comcast respects your privacy. For a complete description of our privacy policy, click here.  Please do not respond to this email. Responses are not monitored.  This message is for the designated recipient only and may contain privileged and confidential information. Any misuse of this email is strictly prohibited. For information about Comcast email preferences, visit comcast.com/preferences.  Comcast
    One Comcast Center
    1701 JFK Blvd.
    Philadelphia, PA 19103-2838
    Attn: Care

  • Posting Program for Incoming Invoice

    Hello,
             I have a requirement to develop an Inbound Interface for Incoming Vendor Invoice which needs to be posted into SAP. Is IDOC_INPUT_INVOIC_MM the Posting Function Module which is used for this Purpose? Or do I need to develop a Custom Posting Program for Posting Invoices in MIRO? Please suggest the available BAPIs & FMs for MIRO Transaction if I need to go for a Custom Development.
    Thanks,
    Venkata Phani Prasad K.

    Hi,
    The posting program for Posting an Vendor Invoice is IDOC_INPUT_INVOIC_MRM which is associated with the process code INVL.
    I have used the above FM only to post the Vendor invoice idocs and it was successful.
    Thanks,
    Mahesh.

  • How to find out the table for Posting Key and A/R & A/P Document types

    hi folks,
    can you let me know which TABLE is used to Posting key and also which TABLE is used for Account Receivables and Account Payables.
    Thank you in advance.

    To find the table of posting key, select any posting key at OB41, then press F1, then click on hammer icon the table used will be displayed. For Posting Key TBSL is the table used.
    Posting Key TBSL
    Customer Master (General)  KNA1
    Customer Master (Company Code) KNB1
    Vendor Master (General) LFA1
    Vendor Master (Company Code) LFB1
    Satish
    (please close the thred if u satisfiy with the answer)

  • How to see the underlying program for Infoset  query in ECC?

    HI all ,
    we have generic datasource based on Infoset .
    now ii need to add 2 fields from batch characteristics .
    my question is how to go & edit the underlying abap program .
    i have added the fields to the extract structure , but not populated the 2 fiields .
    regards ,
    srinivas .

    Hello,
    Go to SQ02 T code -
    > Give your Info set Name -
    >Click on your Info set -
    >There top you will find Option GO TO click on Go To then you will get Global Properties -
    >if you click on Global Properties -
    >You will get another scree there if you click on External Program------->You will get  underlying program for Infoset  query in ECC.
    if you find the answer usefull kindly asign some points.
    Regards,

  • I have iTunes 11.4 and Windows 7. Using iTunes on Windows 7, I get message that iTunes has stopped working and Windows will close the program and notify me if a solution is available. Same message for last two days. Anyone else getting this?

    I have iPad 2, iPhone 5s, both with iOS 7.1.2. I use PC with Windows 7 and hard wire internet service and iTunes to update apple products; no wi-fi. I updated iTunes to v11.4 on 09/11/14. I ran Windows update on 09/10/14. I did not try to open iTunes on my PC until yesterday 09/16/14. I got the message: "iTunes has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."  I got the same message today.  Does anyone know if this is a Windows problem and if a solution is coming or an iTunes problem?  I can get iTunes on iPad and iPhone.  All other programs PC are working correctly.  I use Norton Internet Service on PC.  I ran virus scans and repair/reinstall iTunes yesterday on PC.

    Hello notime4,
    The article linked below details some useful troubleshooting steps that can help stabilize iTunes on your computer.
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/TS1717
    Cheers,
    Allen

  • TS1424 HELLO! whenever i try to access the itunes store from the itunes on my laptop i get this message: ITUNES HAS STOPPED WORKING a problem caused the program to stop working correctly. windows will close the program and notify if a solution is availabl

    for a few weeks i have not been able to access the itunes store from the itunes on my laptop. every time i click on it it tells me it cannot access the store...not sure why. and says this: ITUNES HAS STOPPED WORKING a problem caused the program to stop working correctly. windows will close the program and notify if a solution is available.

    I had this exact same problem.  I found this fix and it worked for me. 
    Step 1:
    Browse to C:\Program Files (x86)\Common Files\Apple\Apple Application Support and copy the filen named QTMovieWin.dll. 
    Step 2:
    Browse and past that file into C:\Program Files (x86)\iTunes.
    Hope this helps you.  I wish I could remember where I saw this originally so I could thank them.
    Good Luck.
    Anthony

  • I Cannot get my organizer to work for Elements 13. "A problem caused the program to stop working correctly. Windows will close the program......" is the error I get. I've uninstalled and reinstalled the program and tried various other things based on the

    I Cannot get my organizer to work for Elements 13. "A problem caused the program to stop working correctly. Windows will close the program......" is the error I get. I've uninstalled and reinstalled the program and tried various other things based on the MANY other complaints with this same issue and nothing is working. How can this problem be corrected?

    Hi,
    Which operating system are you running on?
    Are you upgrading from a previous version of Photoshop elements or is this your first?
    Are you trying to load the organizer or the editor or do both fail?
    Brian

  • Can't launch the organizer in Elements 13. "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."  This happed with Elements 11, too.

    Can't launch the organizer in Elements 13. "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."  This happed with Elements 11, too.

    juliana
    Do you have any version of Premiere Elements 13 or only Photoshop Elements 13 which comes with Elements Organizer 13?
    Let us look at the following for Elements Organizer 13....
    1. Deletion of disabling the Elements Organizer 13 setting file which is named psa.prf. In Windows 7, 8, o 8.1 64 bit, it is found in the
    path
    Local Disk C
    Users
    Owner
    AppData
    Roaming
    Adobe
    Elements Organizer
    13.0
    Organizer
    and in the Organizer Folder is the psa.prf file that you delete or disable by renaming it from psa.prf to psa.prfOLD.
    2. If the above gains you successful entry into the Elements Organizer 13, then you can
    a. create a new catalog
    and/or
    b. repair or optimize the current one
    See Elements Organizer 13/File Menu/Manage Catalogs/Catalog Manager.
    3. There are times that certain formats will bring the Elements Organizer down when you try to import those formats into
    it.  But, from what you wrote, your current problems do not sound media related.
    3. At your earliest opportunity, please update Elements Organizer 13 to 13.1 using its Help Menu/Updates.
    Please review and consider and then let us know the outcome.
    Thank you.
    ATR

  • Hey ! At the moment I am creating a eBook, which should contain links to iTunes. Does anyone know, if it is necesary to join the affiliate program for this ?? Cause I don`t want to ;-)

    Hey ! At the moment I am creating a eBook, which should contain links to iTunes.
    Does anyone know, if it is necessary to join the affiliate program for this ?? Cause I don`t want to ;-)

    Hi Bruce,
    I'm getting closer. I actually tried a variety of  expressions, such as "== null" and yours, but the problem persists.
    I am settling on the following, but there is a hangup related to the field that is being looked at for the condition that I will explain in a minute. Here's the script:
    if 
    (ViolationsTable.ViolCorrSection.ViolationsText.DebitVal.isNull || ViolationsTable.ViolCorrSection.ViolationsText.DebitVal.rawValue.length == 0)
    ViolationsTable.ViolCorrSection.instanceManager.removeInstance(parent.parent.index);
    else
    app.alert ("Warning Statement);
    ViolationsTable.ViolCorrSection.instanceManager.removeInstance(parent.parent.index);
    What happens is that, no matter which row in my table I'm in when I click the remove instance button, the script is always looking to the DebitVal field in the first row of the table. So, if the first row is empty, the message box won't appear for the removal of any row in my table. If the first row has a value in DebitVal, then the deletion of any row in the table will trigger the message box.
    I need a way to specify the script to look at the DebitVal field in the row that I am clicking in, without messing up the remove instance command.
    Ideas?
    Dave

  • I keep getting an error message that reads: There is a problems with this windows installer package A program required for this install to complete could not be run. Contact your support personnel or package vendor. How do I correct this problem.

    I keep getting an error message that reads: There is a problems with this windows installer package A program required for this install to complete could not be run. Contact your support personnel or package vendor. How do I correct this problem. HELP !!!!!!!!!!!!!!

    Try the following user tip:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • Shortly after launching into itunes, it freezes and I get the following message: A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available. How do I resolve this issue?

    Shortly after launching itunes, the program freezes and gives me the following message:A problem has caused the program to stop working correctly. Windows will close the program and notify you if a solution is available. The program then closes, even if I have not completed what I am doing. How do I resolve this problem?

    That is what I thought. Cannot figure out how to turn it off, though.
    However, when I talked to her over the phone, she is definitely using Firefox. I tried to access her Internet Explorer, but it has been deactivated, I believe by Firefox.
    She primarily uses the Internet to communicate with her kids, grandkids, and great grandkids. Her e-mail account is with Yahoo Mail, and she uses Firefox to access it. Occasionally, she uses the web to look up information, and may have downloaded a virus.
    Do you think there's something in Yahoo Mail that conflicts with Firefox? Is there some remnant of Internet Explorer that needs to be deactivated? Could she have a virus?
    Any information would be gratefully appreciated. I live 7 hours away, and can only help her over the phone. I'm trying to develop a course of action that I can use with her. I know a little bit about Firefox, so need your expertise.

Maybe you are looking for

  • How to use a where clause in an inner query

    String approv="pend"  query = "Select Eno From EmpLeave Where  Status_approval='"+approv+"' and Eno in (Select Eno from EmpLeave  group by Eno having count(Eno)>1)"; bt in the result even the rows without "pend" is also displayed... can sumone plzz t

  • Measure usage  at user level

    Hi, Is there any way i can measure or see how my sap resources being utilised, apart from ewa report where i get only consolidated report on db,transaction etc, i am looking at the report  where i want to see how much each user is using or accessing

  • Problem with screen capture

    The first problem is I successfully captured a video from my DV camera, but when I put the second tape in to continue, it can't find the camera again. I've re-booted but nothing worked. Any suggestions?

  • Shmmax - kindly assist

    Hi, let's say i have a db server with the following databases: STAR1 - 1GB SGA STAR2 - 2GB SGA STAR3 - 3GB SGA How much do i have to set for shmmax? The SHMMAX parameter is used to define the maximum size of a single instance? or the total memory of

  • How to preserve aspect ratio with a responsive layout?

    Hi, I have an image that I need to place in the centre of my stage. The image is that of a ball and has 400px by 400px size. I want my animations to be responsive so that the image will scale but still maintain the correct aspect ratio. Currently if