Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect hidden Slack during operation #38

Open
jgm-ktg opened this issue Nov 28, 2022 · 1 comment
Open

Respect hidden Slack during operation #38

jgm-ktg opened this issue Nov 28, 2022 · 1 comment

Comments

@jgm-ktg
Copy link

jgm-ktg commented Nov 28, 2022

	tell application "System Events"
		set visible of application process "Slack" to false
	end tell

Sending a message in the above context seems to make Slack visible again. Can this be avoided?

@samknight
Copy link
Owner

samknight commented Feb 25, 2023

Thanks for sharing this script - I hadn't found a way to get this to work in the background before but I think this might be solution to a lot of problems.

I've done some testing today and found that I still need to precede setting th visibility to false with

tell application "Slack"
activate
//set visibility
//send commands
end tell

This has the problem of:
1: Flashing Slack onto the screen initially
2. having to reset the visibility status inside of each command in my script

Do you have any suggestions on how I can solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants