Comments (18)
Ok I'll see what I can produce and get some feedback from everyone (pomodoro timings would've been ideal though!)
@josebama preview his Alfred set up here (I think requires premium) #4 (comment)
Essentially you can have one workflow that sets the status, runs a timer and then clears the status. Not ideal as it will interrupt your screen to perform the changes but an interim solution possibly
from slack_applescript.
Hi all,
I think I have something working now. This is very much a test carefully feature right now as the UI part makes it very brittle. There are issues I've not been able to overcome yet where if my mouse is in the position on screen where the dialog pops up it ruins the tab ordering.
Any help to overcome this would be appreciated.
set status "on lunch" until "8:30 pm"
set status "on lunch" with icon ":knife_fork_plate:" until "20:30"
Note that you can use a 12 hour clock or a 24 hour clock. I am only support same day status clearances currently but should be enough for most pomodoro cases.
I won't be working out the in X minutes or in Y hours just yet as that adds some more complications I don't think the library is ready for just yet. Once this is stable then I'll look to add some of that functionality
from slack_applescript.
Will take a look - thanks for the idea
from slack_applescript.
I've been looking at doing the same thing, but I believe it's not possible with slash commands. The only option that I could see is instead of using the slash command for setting the status, navigate through the UI with keystrokes.
Something like ββ§Y, text
, β₯, emoji
, β₯, β₯ and then choose one option from the list with the arrow keys but that's slow, very limited in options and very fragile, as any tiny change in the UI could break it.
I guess we will have to wait for Slack to allow setting expiring statuses through slash commands.
If you are using Alfred, you can add a delay and then call clear status:
but you will lose focus of whatever you were doing when the time to clear the status comes
from slack_applescript.
That's a cool technique - I do have some UI management flows e.g. focussing windows and they do seem to break fairly regularly. I could create an option where if you set the timer it goes through a UI function but if left blank it uses the slash command?
from slack_applescript.
You could do something like this to set a status for 30 minutes:
tell application "System Events"
keystroke "y" using {command down, shift down}. # Display status change dialog
delay 0.2
keystroke "Lunch break" # Status text
keystroke tab # Highlight emoji selection button
keystroke return
delay 0.2
keystroke ":sandwich:" # Search emoji
delay 0.2
keystroke return # Select first result
keystroke tab # Emoji selection button
keystroke tab # Clear text button
keystroke tab # "Clear after" dropdown
delay 0.2
key code 126 # 4 hours
key code 126 # 1 hour
key code 126 # 30 minutes
keystroke return
keystroke tab # Save button
keystroke return
end tell
from slack_applescript.
Thanks - I have been looking into it. My struggle at the moment is designing a nice usable dictionary definition for this.
I could create a definition for each one
set status x for 1 hour
set status x for 4 hours
set status x and bring up date picker
but it doesn't feel user friendly to me yet. Have you got any ideas?
from slack_applescript.
Hi!
I would also love to have this feature π I actually need to clear the slack status after 25min (I'm working with the pomodoro technique and it divides time in chunks of 25min, I'm trying to communicate it to my colleagues with my slack status).
I don't know why do you think that set status x for 1 hour
or set status x for 4 hours
is not user friendly, I found them pretty clear and readable. I would really appreciate having the minutes version:
set status x for x minutes
Thanks!
from slack_applescript.
Hi Julia,
The difficulty I was having was communicating the the preset values slack offers (1 hour, 4 hours etc).
They do have a custom option but it presents a calendar view which could be a little more brittle to code against the UI. Also trying to surface the options clear after today/this week isn't easily revealed.
I think there's enough demand now though for me to give this a go and use the custom method by default perhaps, but I think it will be one of the trickier items to build robustly.
I'll keep this thread updated
from slack_applescript.
Sorry Julia
A further update. It seems 25 minutes isn't really an option within slack - you can only choose a specific date and time at half hour intervals.
Perhaps we are heading into the area of needing this to become more of a background app that can run using this library as the core library.
Are you running any other tools such as Alfred/Keyboard Maestro?
from slack_applescript.
Thanks a lot for the explanations, now I understand what you meant π
A further update. It seems 25 minutes isn't really an option within slack - you can only choose a specific date and time at half hour intervals.
I would say that 30min instead of 25min would be acceptable already for my use case.
Are you running any other tools such as Alfred/Keyboard Maestro?
No, I'm running the script using the automator as explained here. I have Alfred installed (only free version for now) but I don't see how it would help because it only executes the scripts right?
from slack_applescript.
Just as heads up, I ended up deleting the timer in Alfred to disable the status. I ended up sending unintended messages in slack because I would be typing when the timer would go off and switch the focus to the slack window.
What Iβm doing now is set the status for 30 minutes through the UI navigation that I mentioned previously and I set do not disturb for 25 minutes through the slash command. And in the status I briefly explain that if Iβm in DND Iβm focusing, otherwise Iβm in a break.
from slack_applescript.
I should also add that you can be as precise with the time as you like. Not limited to half hour intervals i.e 6:51 pm
is perfectly valid
from slack_applescript.
Hi @samknight,
Thanks a lot for the effort π I've been trying the new until
functionality and it works like a charm! I found an issue when using it with the icon though.
This command sets the status and the clear time perfectly:
set status statusMessage until endTime
But when I add the icon it fails:
set status statusMessage with icon ":tomato:" until endTime
Error: "The variable icon is not defined." number -2753 from "icon"
The status of slack after running the script:
from slack_applescript.
Thanks - all fixed now in v1.3.1
from slack_applescript.
@samknight I pulled the current master version and I still have the icon issue I commented. Thanks!
from slack_applescript.
Once more for luck! v1.3.2
from slack_applescript.
It is working now, thanks a lot!
from slack_applescript.
Related Issues (20)
- Script error when Slack set to French HOT 2
- Nothing works HOT 3
- Hoping for listing workspaces and channels HOT 4
- Status command sometimes malforms HOT 2
- Clearing Status is not working HOT 3
- mini guide / advice on reverse engineering Slack.app HOT 1
- [Question] Is it possible to get the amount of all unread messages? HOT 1
- Can't get script "Slack" HOT 5
- Where is the source? HOT 2
- Is there a way to get a title of currently focused Slack channel? HOT 1
- clear message box or warn before entering commands HOT 8
- Not a valide command HOT 2
- Support "for" in set status command HOT 2
- not a issue but a feature request HOT 1
- Set as Away & Set as Active not working HOT 2
- Respect hidden Slack during operation HOT 1
- Commands won't execute if Input Option to use "Cmd Enter" is selected HOT 3
- Away command clashes with similar hubspot command
- Canβt get menu item 1 of menu "Workspace" HOT 2
- "Slack.zip" was removed in the latest commit HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slack_applescript.