AHK Timing from 60 to 0 - time

When I press (example) f:: my time starts counting down from 60seconds to 0s. In the last two seconds I have to press f:: and the countdown must start again from 60 to 0.
Is it possible through AHK to make me press with f:: anytime within 60 sec and AHK to click within the last two seconds. I don't need it for a computer game and any help would be greatly appreciated.
So far I haven't tried anything because either it doesn't exist, or I been looking in the wrong place.

Related

Automatically Turn a Toggle On and Off in Max MSP

How do I automatically turn a toggle on and off in Max MSP? For instance, if I want this toggle to print out this message for 30 seconds, and then stop printing for 30 seconds, and then on and off again by itself for a set period of time without me manually adjusting it, what should I do?
To turn a toggle on or off every 30 seconds, you can connect it to the output of a [metro 30000] object.

Is it ok to set a minimum display time for the spinner from the UX standpoint?

I have a task to generate a file based on the data from several records (sources) that could be selected on UI. A user can select from 1 to 100 records. The generation (request processing) time depends on the number of selected records. It can be from several milliseconds to approximately 5 seconds.
I am planning to display the spinner component for this request. But as I mentioned above it might be processed too fast and the spinner will blink. So, is it ok from the UX standpoint to set some minimum displaying time for the spinner to prevent irritating blinks? If yes, then what is the best timeout? 1 second?
P.S. I have read a great Progress Indicators Make a Slow System Less Insufferable article on the Nielsen Norman Group website. But it does not fully answer my question.
Neilson's research would suggest that your guess of 1 second is in the right area - or more specifically, that the time needed is somewhere between 0.1 second and 1 second. I'd probably try 0.5 seconds and see how that feels for the users.
Note that as you can approximately tell in advance what the time will be, you know immediately weather or not to turn on your spinner. So, if the user has less than 10 selected when they press the button (based on the numbers given above, assuming a linear relationship, 10 would be about 0.5 seconds) DON'T display the spinner, but otherwise, IMMEDIATELY display the spinner. This is based on the principle that if the program knows something UX related in advance, that should be immediately shown to the user (the same principle that says you should simply not allow options that are impossible to be selected - i.e. disable them - rather than letting the user choose them and then saying "sorry, can't do that").

Live Timer // Parse & Swift

Im trying to figure out how can I do a live 30 second timer which every 30 second something happens. No matter who opens the app the timer will continue to run even if you just open the app and the timer might be on 20s or 10s or even 1s. And right when it hits zero, I have something that pops up.
I have it done but it's a timer that starts when the app is view is opened and always starts from 30s and if someone else opens the app he also starts from 30s i want it so that who ever opens the view the timer is still running.

How to drag 4 non child windows as one unit

Edit: I would like the dragging to appear "smooth" -- the refresh rate of each docked window while dragging to stay above 15 frames per second.
I've written this AutoHotKey script to demonstrate the concept but the animation is far from smooth.
(For this demo script to work, you must open 5 copies of notepad and save the documents as XXX1 ... XXX5)
SetTitleMatchMode, 2
WinGetPos,x1,y1,w1,h1,XXX1
WinGetPos,x2,y2,w2,h2,XXX2
WinGetPos,x3,y3,w3,h3,XXX3
WinGetPos,x4,y4,w4,h4,XXX4
WinGetPos,x5,y5,w5,h5,XXX5
yy1:=y1
Loop
{
xx1:=x1
WinGetPos,x1,y1,w1,h1,XXX1
If (x1<>xx1)
moveAll()
}
return
moveAll()
{
global
WinMove,XXX1,,%x1%,%yy1%
x:=x1+w1
WinMove,XXX2,,%x%,%yy1%
x+=w2
WinMove,XXX3,,%x%,%yy1%
x+=w3
WinMove,XXX4,,%x%,%yy1%
x+=w4
WinMove,XXX5,,%x%,%yy1%
}
Can anyone either optimize this script or suggest a proven method? (Or even show that it can't be done.) If it needs to be written in another language, so be it. It appears that Windows is limiting the repainting of windows to a certain total number of repaints on screen per second.
As per the comments, SetWinDelay, -1 and SetBatchLines, -1 will make it smoother. I disagree with using SetWinDelay, 5, since we want the pause between two WinMoves to be as small as possible. Although probably not noticebale to the naked eye, -1 will minimize that pause.

System notification window stuck causes the program to get stuck[Cocoa][Mac OSX]?

I am trying to show a notification window in a Mac application.Something that would come up in the trial version of the application.The window would be unmovable for 30 seconds(and it would have a counter counting down to 0).After 30 seconds it would continue execution.
Here is the code.
_systemNotificationWindow = [[SystemNotificationWindow alloc]initWithWindowNibName:#"SystemNotificationWindow"];
NSLog(#"1111");
[self.systemNotificationWindow setActionDelegate:self];
[self.systemNotificationWindow startTimer:30];
NSLog(#"2222");
[self.systemNotificationWindow showWindow:self];
NSLog(#"3333");
NSLog(#"4444");
The code is stuck at this line
[self.systemNotificationWindow showWindow:self];
It shows the window but neither the timer is working nor the window is going away after 30 seconds.Alsoo 3333 and 4444 are not being printed.
It sounds like you're missing an event loop to control the timer, so I'm guessing that you're displaying the window before an event loop has been created.
You can read more about events here and run loops here.

Resources