• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scriptable multi-clipboard utility?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scriptable multi-clipboard utility?


  • Subject: Re: Scriptable multi-clipboard utility?
  • From: "koenig.yvan" <email@hidden>
  • Date: Sun, 09 Mar 2014 23:11:42 +0100


Le 09/03/2014 à 19:57, Michael Grant <email@hidden> a écrit :

Thanks again! That works with styled text. I also tried it with a group of copied files from the Finder, but when trying to paste them after running the script, only one file was fully restored for pasting in the Finder. The other filenames are still there as text. Still, progress!

Michael


I guess that you copied from the Finder then select a text window to apply the script.
When the script restores the clipboard record it does that in the Text Editor.

I wrote a bare script to look at the process behavior.

To work in the best conditions, I decided to encapsulate the instructions related to the « complete » clipboard in a tell "Finder"  block.

tell application "Finder"
set clipboardAsRecord to the clipboard as record
(*
{«class furl»:file "Macintosh HD:Users:yvankoenig:Desktop:mailboxes.txt",
«class ut16»:"mailboxes.txt mailboxes 2.txt", 
«class utf8»:"mailboxes.txt mailboxes 2.txt", 
Unicode text:"mailboxes.txt mailboxes 2.txt", 
string:"mailboxes.txt mailboxes 2.txt"}
*)
end tell
tell me to set clipboardAsText to the clipboard as text
set the clipoard to "azerty"
tell application "Finder"
set the clipboard to clipboardAsRecord
end tell
delay 1
tell application "Finder"
the clipboard as record
end tell
(*
{«class furl»:file "Macintosh HD:Users:yvankoenig:Desktop:mailboxes.txt", 
Unicode text:"mailboxes.txt mailboxes 2.txt", 
string:"mailboxes.txt mailboxes 2.txt", 
scrap styles:«data styl01000000000010000E00030000000C00000000000000», 
«class utf8»:"mailboxes.txt mailboxes 2.txt", 
«class ut16»:"mailboxes.txt mailboxes 2.txt"}
*)

As you may see, the resetted contents is not the original one.

The components aren’t in the same order and an extraneous component is added.

My guess is that the engineers never imagined that we will try to do that one day so the changes are fooling the Finder.

I'm not optimistic about that but it may be the subject of a bug report.


Yvan KOENIG (VALLAURIS, France) dimanche 9 mars 2014 23:11:38
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Scriptable multi-clipboard utility?
      • From: Shane Stanley <email@hidden>
References: 
 >Scriptable multi-clipboard utility? (From: Michael Grant <email@hidden>)
 >Re: Scriptable multi-clipboard utility? (From: Michael Grant <email@hidden>)
 >Re: Scriptable multi-clipboard utility? (From: "koenig.yvan" <email@hidden>)
 >Re: Scriptable multi-clipboard utility? (From: "koenig.yvan" <email@hidden>)
 >Re: Scriptable multi-clipboard utility? (From: Michael Grant <email@hidden>)
 >Re: Scriptable multi-clipboard utility? (From: "koenig.yvan" <email@hidden>)
 >Re: Scriptable multi-clipboard utility? (From: Michael Grant <email@hidden>)
 >Re: Scriptable multi-clipboard utility? (From: "koenig.yvan" <email@hidden>)
 >Re: Scriptable multi-clipboard utility? (From: Michael Grant <email@hidden>)
 >Re: Scriptable multi-clipboard utility? (From: "koenig.yvan" <email@hidden>)
 >Re: Scriptable multi-clipboard utility? (From: Michael Grant <email@hidden>)

  • Prev by Date: Re: Scriptable multi-clipboard utility?
  • Next by Date: Re: Scriptable multi-clipboard utility?
  • Previous by thread: Re: Scriptable multi-clipboard utility?
  • Next by thread: Re: Scriptable multi-clipboard utility?
  • Index(es):
    • Date
    • Thread