Re: !xStatsGraphShowPerformancePicker and setting evar

Brian Wolven <[email protected]>
Newsgroups gmane.comp.windows.shells.litestep
Message-ID <[email protected]>
Hale, Paul wrote:
>> From: news [mailto:[email protected]] On Behalf Of Brian Wolven
>> Sent: Friday, June 22, 2007 3:18 PM
>> To: litestep-HzvBz7w1J3cIFlVeWT/[email protected]
>> Subject: [Litestep] Re: !xStatsGraphShowPerformancePicker and 
>> setting evar
>>
>> Hale, Paul wrote:
>>> That being said, is there a way to write the contects of 
>> the clipboard 
>>> to a file on an event? If I create a button, click on it 
>> and execute:
>>> !xStatsGraphShowPerformancePicker
>>>
>>>  I want to it to:
>>>
>>> !xTextSaveEvar @$ConfigDir$\themevars.rc@ @ThemeVar@ 
>> @perfmon string@
>>> Can that be done?
>> I thought there was an ls clipboard module, but can't find 
>> anything ATM. The following script will do it, though. 
>> Execute it as follows (assuming it's saved as updateThemeVar.vbs):
>>
>> !execute [wscript "full_path_to_updateThemeVar.vbs" 
>> "your_theme_var_rc_file_path" evar_to_be_replaced]
>>
>> It'll give an error message if the file does not exist. If 
>> the evar does not exist it won't do anything.
>>
>> Hopefully.
>>
>> Make backups. =)
>>
> 
> Works like a charm! This paste the clipboard contect just as advertised.
> So now I am left with figuring out a way to fire this bang after the
> PerfMon string window is closed with an "OK". Is this the right path of
> thinking? :
> 
> *Alias !SetMem !Execute [!xStatsGraphShowPerformancePicker /bang1:
> [wscript "$ConfigDir$\UpdateThemeVar.vbs" "$ConfigDir$\themevars.rc"
> MemString]
> 
> This doesn't work, but I think it is close...

The "bang1:" stuff is from the weather script (it takes "named" arguments), and 
doesn't apply here. It'd be more like this:

*Alias !SetMem !Execute [!xStatsGraphShowPerformancePicker][wscript 
"$ConfigDir$\UpdateThemeVar.vbs" "$ConfigDir$\themevars.rc" MemString]

That's not going to wait for the performance picker to close, however, at least 
I don't think it would. (Do the bangs in an !execute "Block" until a process 
finishes?). I'm not sure how to get an event to fire off when the performance 
picker closes, other than to have a button or control of some kind to manually 
activate it, e.g., "Apply selected setting to theme" or the like.

If the module author could make it an option to execute a bang in conjunction 
with the performance picker that'd be sweet, but in the meantime it seems like 
you're left with a two-step process. The advantage of a two step process is that 
you could leave the performance picker open and apply multiple settings (one 
after each selection, e.g., memory, networking, etc.).

Alternatively maybe literunner could be used to detect when the performance 
picker closed and then run the bang. There'd be no way for it to know which 
theme setting was updated though.


---------------------------------------------------------------------
    Can't Unsubscribe? Check http://desktopian.org/listunsub.html
        LS List Homepage: http://wuzzle.org/list/litestep.php
            Get the LS FAQ: http://lsfaq.shellfront.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.