Deutsch   English   Français   Italiano  
<sgntmq$aqo$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Souris 8-) <souris@meta-science.fr>
Newsgroups: fr.comp.sys.mac.programmation
Subject: Re: [Apple Script] Quel code pour mettre une application en premier plan ?...
Date: Wed, 1 Sep 2021 13:03:22 -0000 (UTC)
Organization: =?UTF-8?B?TcOpdGEtU2NpZW5jZQ==?=
Lines: 36
Message-ID: <sgntmq$aqo$1@dont-email.me>
References: <sgnou7$a7s$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 1 Sep 2021 13:03:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5b2df95aaa14203950d54595992da0bd";
	logging-data="11096"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19XsOIM41IsJqQ0xWQfdoum"
User-Agent: MacCafe/2.06(bs) (macOS 11.5.2 (20G95) - iMac18,3)
Cancel-Lock: sha1:dQgEnt/J4ik5TXIk5Zgn/iClkho= sha256:DKz6xvSSJzUYdKFWCDB3pvuozITuQO6I1FXRHfpqwuM=
	sha1:eD6EMk0NNTH+2ky3Ur6+7F+BNK0=
In-Reply-To: <sgnou7$a7s$1@dont-email.me>
Bytes: 2030

Le 1er septembre 2021 à 13:41, Souris 8-) a écrit :


> [Apple Script] Quel code pour mettre une application en premier plan ?...
>
> Bonjour, quel instruction pour mettre une application déjà ouverte en premier
> plan ?
>
> merci
>
> suivi programmation
>
> -- 

Pour mettre une application en premier plan, j’ai trouvé deux solutions à tester:

tell application « TextEdit »
  Activate
end tell


tell application "System Events"
   tell application process "TextEdit"
      set frontmost to true
   end tell
end tell

la première est la seul qui fonctionne avec Xojo...

-- 
-- 
  \ /    Croire c'est le contraire de savoir,
-- o --  si j'y crois, je ne sais pas,
  / \    si je sais, pas la peine d'y croire.
--> Je crois pas, car je sais que c'est faux malgré tout...