Jump to content
Macro Express Forums

A way to get system uptime using Macro Express?


Recommended Posts

When I create a macro with nothing but "alt-tab" in it, the script it generates is as follows:

==============================

<MACRO PLAYBACK SPEED Speed='1"/>

 

<MOUSE MOVE Option ="\x01" X="195" _PROMPT="0x000A" />

 

==============================

 

So, where's alt/tab?????

Link to comment
Share on other sites

  • 1 month later...

Hi, you can launch the built-in Windows util systeminfo.exe and capture the output in a variable. However, this util can be slow because it tries to gather a lot of other info about your system. Also it only shows "System Boot Time", so you'd have to parse through a lot of other info and also perform additional calculations to determine uptime. On the plus side, systeminfo.exe is installed on every Windows PC (since Win XP I believe), and you do not have to specify its exact location since it resides in the default Windows path.

 

An easier method would be to use the uptime.exe utility which you can get for free at http://uptimeexe.codeplex.com/

 

It's a command-line util which does not have to be installed. Just copy it to anywhere. It runs in a split second and will report your boot time and also your uptime. I've written a script that parses the info from uptime.exe into separate variables. You can add additional logic for your purposes.

 

-Lemming

 

System Uptime for TsunamiZ.mex

 

May I suggest to add a way to get system uptime? I want to make a macro that doesn't run unless a certain amount of system uptime has elapsed.

 

BTW: I use Windows 7.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...