Re: !xStatsGraphShowPerformancePicker and setting evar
Paul <[email protected]>
| Newsgroups | gmane.comp.windows.shells.litestep |
|---|---|
| Message-ID | <[email protected]> |
Brian Wolven wrote: > 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] > I knew it was named arguements, I was hoping I could do the same with it as you did with the weather and the actionfolder. > 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.). I don't think it works that way. In order to have the string copid to the clipboard, you have to press "OK". So the multiple strings would not work that way. I agree that the module author option would be sweet. > > 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. I had thought about that as well. Or maybe one.dll ( I think that is the right module). But I came up with the same shortcoming as you. How about this...and this is just thinking out loud. What if Literunner would tell if the PerfMon was closed, then an option !alert gave you the choice of where to write the evar? Sort of like this: *Script bang !SetPerfMonString *Script exec !xStatsGraphShowPerformancePicker *Script exec !Confirm "Apply to CpuString?" "Apply Changes?" [!varset accept yes] [!varset accept no] *Script gotoif ["%{accept}" = "no"] no *Script exec !Execute [wscript "$ConfigDir$\UpdateThemeVar.vbs" "$ConfigDir$\themevars.rc" CpuString] *Script exit *Script label no *Script exec !Confirm "Apply to MemString?" "Apply Changes?" [!varset accept yes] [!varset accept no] *Script gotoif ["%{accept}" = "no"] no *Script exec !Execute [wscript "$ConfigDir$\UpdateThemeVar.vbs" "$ConfigDir$\themevars.rc" MemString] *Script exit *Script label no *Script exec !Confirm "Apply to NetString?" "Apply Changes?" [!varset accept yes] [!varset accept no] *Script gotoif ["%{accept}" = "no"] no *Script exec !Execute [wscript "$ConfigDir$\UpdateThemeVar.vbs" "$ConfigDir$\themevars.rc" NetString] *Script exit *Script label no *Script ~bang That is just a quick paste job, I know it isn't correct. I don't know how to make more than a yes or no, be nice if I could just have an alert with the three options on it. Paul --------------------------------------------------------------------- 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