mvordeme;434004 Wrote: 
> There is one little problem with the settings dialog, though, which is
> probably due to the way Perl handles string variables. I was thinking
> about a way to avoid having to tell people to copy my VB script to the
> system32 directory and ended up trying to use the %USERPROFILE%
> environment variable which points to the user's settings directory. In
> order to pass the variable to the cmd executable unharmed, it has to be
> enclosed in double quotes. The actions I am currently using all look
> like this:> 
Code:
--------------------
  >   > cmd /C cscript "%USERPROFILE%\ConfigureLO.vbs" /Action:busy /Log:true
--------------------
> > This setting is not properly loaded back into your settings dialog but
> cut off at the quotes:> 
Code:
--------------------
  >   > cmd /C cscript 
--------------------
> > So the next time I save the settings, the actions will be broken.

OK, the next version will have the "backtick becomes double-quote"
work-around.  Here's the cmd line interpreting in the new version: 
Biggest change: any cmd line can include the time flags, not just the
wake alarm cmd:


Code:
--------------------
    
  # `   becomes         "
  # %d  beccomes        unix epoch time (UTC) e.g. 1234567890
  # %l  becomes         unix epoch time + localtime offset
  # %s  becomes         localtime 'YY-MM-DD HH:MM:SS'
  # %f  becomes         localtime 'short-date', usu 'MM-DD-YY'
  # %t  becomes         localtime 'HH:MM:SS'
  # {+/-nnnn}           is used as a offset correction to the supplied 
time...e.g. '{-120} would subtract two minutes from the time..
  
--------------------


Example not-idle command:

sudo /usr/bin/logger `SrvrPowerCtrl %t {-120} not idle`

..is executed as:

sudo /usr/bin/logger "SrvrPowerCtrl 13:39:32  Not Idle"

..puts this into the system log:

Jun 21 13:51:32 localhost username: "SrvrPowerCtrl 13:49:32 Not Idle"


-- 
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to