Written by Kevin Heaton, Insight Software Solutions
Offers to restart Dropbox when Windows wakes up from sleep mode.
Download the umrestartdropboxwhenwindowswakesup.mex macro file and save it to your hard drive where you store your macro file(s). If desired, import the macro into your existing macro file by clicking File, Import, Import Macros.
Click to tell Windows to go to Sleep. Then press the power button or press a key to wake up Windows. The macro will run when Windows wakes up.
Windows sends messages when certain events occur. When Windows wakes up from sleep, a WM_POWERBROADCAST message is sent with the message’s wParam set to PBT_APMRESUMEAUTOMATIC. By creating a macro with a System Event activation with these values a macro will run when Windows wakes up.
Macros can be set to run when other system events occur. All that is needed is to find the correct message values for the event. Reference pages document the values for system messages. Message values may be shown in decimal (536) or hexadecimal (0x218) formats, but the system Event macro activation expects decimal values.
The WM_POWERBROADCAST value is 536 decimal and the PBT_APMRESUMEAUTOMATIC value for wParam is 18 decimal. These values are used in this macro to run when Windows wakes up.
To restart Dropbox the macro first tries to determine if Dropbox is running. It does this by using the Move Mouse to Notification Area Icon command. If the Dropbox icon is found it clicks to stop Dropbox. Then it uses the Program Launch dropbox.exe command along with the /systemstartup parameter to start or restart Dropbox.
This macro may need to be modified to reliably restart Dropbox on your computer.
You may want to perform different actions when Windows wakes up. Modify this macro to remove the commands to restart Dropbox and replace them with your desired actions.
Macro Express Pro
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |