• 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: Script Menu or FastScript and paste
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script Menu or FastScript and paste


  • Subject: Re: Script Menu or FastScript and paste
  • From: Yvan KOENIG <email@hidden>
  • Date: Sun, 02 Aug 2015 18:38:41 +0200

What an ass ! I failed to insert the late code. Here it is :

--{code}
on run
my germaine()
end run

on germaine()

set testSay to true


tell application "System Events" -- get frontmost process
set frontmostProcess to first process where it is frontmost -- this will be the script process
if name of frontmostProcess is in {"Script Editor", "AppleScript Editor"} then
set visible of frontmostProcess to false -- hide the script process
repeat while (frontmostProcess is frontmost) -- wait until the script is hidden
delay 0.2
end repeat
set theApp to name of first process where it is frontmost -- get name of frontmost process (ignoring the script process)
set frontmost of frontmostProcess to true -- unhide the script process
else
set theApp to name of frontmostProcess
end if
end tell
set theDate to current date
set oldClipBoard to the clipboard as record # save it to reset it on exit
set leMessage to "Yvan KOENIG running Yosemite 10.10.4 in French (VALLAURIS, France) " & date string of theDate & space & time string of theDate
tell application "System Events"
set the clipboard to leMessage
if testSay then set inTheClipBoard to the clipboard as text
tell process theApp
set frontmost to true
keystroke "v" using {command down}
end tell
end tell
set the clipboard to oldClipBoard # reset the original content


if testSay then say inTheClipBoard
end germaine

--=====
--{code}



Yvan KOENIG running Yosemite 10.10.4 in French (VALLAURIS, France) dimanche 2 août 2015 18:36:36



 _______________________________________________
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

References: 
 >Script Menu or FastScript and paste (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Script Menu or FastScript and paste
  • Next by Date: Re: Script Menu or FastScript and paste
  • Previous by thread: Re: Script Menu or FastScript and paste
  • Next by thread: Re: Script Menu or FastScript and paste
  • Index(es):
    • Date
    • Thread