Jump to content
Software FX Community

marco.shaw

Members
  • Posts

    249
  • Joined

  • Last visited

Everything posted by marco.shaw

  1. Something like the attached? I'm not sure how to change the text in each just yet, but I'm sure it can be done easily enough. Have a problem with the framing and such?
  2. Does that pose a technical problem? Anything you pass to out-gauge can be packaged in a .ps1 script or maybe even a function... Care to elaborate?
  3. You can't. See also: http://community.softwarefx.com/forums/t/9142.aspx
  4. I assume you're using the Creator. Could you copy your .pgf file here? I'll try it out and using your .pgf file will help me test more quickly.
  5. I have build 2806, and "-ToolTipFields Site" does not work properly, the tool tip shows me: ---------------- tickets:11 >10 ---------------- Which is not what we are asking it to do. Djake: When do you need this for? I can provide a workaround...
  6. I'll have to try it out. I believe you were sent a private link for paying customers. A new build was (2806) was placed there just this last Tuesday. I'll have to check if I have 2783 locally. I had problems with a particular build lately when I tried to upgrade, and that may be the version. I might have to go with a test virtual machine to be able to try that build out. First, I'll have to try to figure out how I can reproduce what you're trying to do with just a few lines of code as dummy/fake input. It could take me a few days to find time to play with this. (Just to clarify: I am not a PowerGadgets employee, so this testing is done in my spare time.)
  7. I was wrong, -refresh does accept milliseconds: -refresh 0:0:0.1 (for 100 milliseconds). That will make the scolling go much faster. So a 1/2 second refresh would be "-refresh 0:0:0.5" (seems anything missing is automatically filled in).
  8. Speed? You want slower or faster? For slower, just increase the -refresh value from 0:0:01 to something higher. To make it faster... Well, out-gauge -refresh doesn't seem to accept milliseconds. Another way would be to make it scroll 2 characters at a time, but the appearance would be "jerky-ish"...
  9. To use Sapien's read-inputbox, simply replace this code from my scrollv2.ps1: read-host "Enter the text to scroll" And replace with: Read-InputBox -message "Put something here." -defaultvalue "" -Title "Ticker Message" As simple as that...
  10. I don't have a solution for you, but would like to discuss with you how you are using PowerGadgets. Would you consider emailing me at marco DOT shaw AT gmail DOT com?
  11. OK, maybe this is the problem... You have to call it like this, for example: PSH>./scrollv2.ps1|out-gauge -type digital -floating -refresh 0:0:01 I have an idea on how I can get the $global variables to reset properly to zero (see note in the comments to my first version). I have to leave right now. Using read-inputbox will be simple to implement...
  12. How exactly are you trying to run it? My way actually prompts you in the PowerShell console. I've slightly edited my previous post to show the prompt in the PowerShell session. I could also edit it for use with read-inputbox...
  13. Sorry, I'm not fully following you. You mention not needing it to refresh, but you must have it refresh for the text to appear to scroll. That's how I create the illusion. I'm also going to add my flash code with the scrolling code... That might be useful in your scnenario where you just put up a new message: it will first scroll when something new is added, then start to scroll... You'd have to kill/quit the gadgets, then restart the .ps1 script. Is that acceptable, or you'd want something more automatic like that. Being able to start a gadget, have it run *forever*, but have the text be variable all the time could have some issues. I hope I'm making myself clear... ZoomIssue.zip
  14. OK, here's "version 2". Instead of using read-inputbox from Sapien, I just used read-host which is built-in with PowerShell. You may want to modify "test.tmp" to a name/location more appropriate. This is a temporary file only, that will be created, then deleted. -------scrollv2.ps1------------ $global:value=7$spacer=" "*7 if (test-path test.tmp) { $global:string=get-content test.tmp;remove-item test.tmp} else { if ($global:string -eq $null) { read-host "Enter the text to scroll"|out-file -filepath test.tmp -encoding ascii $global:string=get-content test.tmp }} $scrollString=$spacer+$global:string+$spacer$scrollText=$scrollString.Substring($global:iteration,$global:value) if ($global:iteration -lt $scrollString.length-$global:value) { $global:iteration++ } else { $global:iteration=0 } $scrollText------------ Sorry, no code comments this time around... Let me know if that does the trick for you. [Edit: Added a prompt to the read-host cmdlet.]
  15. Interesting use of my blog post. I don't have time right now to provide you with a working/tested solution, but I see some fundamental issues with variables and how PowerGadgets with refresh works: 1. You didn't declare a -refresh parameter in your out-gauge call.2. You cannot use out-gauge in this manner to use it to refresh.3. When you do actually use -refresh, a couple of problems will happen: a) You are declaring a *local* or *script* variable when you simply declare "$string=read-inputbox...". When using -refresh, your first invokation of the .ps1 script runs in the current PowerShell runspace/console, but on the 2nd (and forever after) invokation of the script, it is actually run from another "detached" PowerShell runspace. This new detached runspace starts from scratch and will try to run "$string=read-inputbox..." again by itself, but won't be able to send anything to you because it can't talk to the console.4. I also mention in the blog post about seeing strange things when the ticker is first called (having to reset global variables to zero manually). So, the important thing that I think will be required is that when the script is first called, it will have to write the string to a temporary file, and then the new PowerShell runspace will read the file, store its contents in a *global* variable, then delete the temporary file. Something for you to think about... I'll provide you with something that works by Tuesday, if you need help. [Edit: Added point #4.]
  16. You can change the folder: Open up the .pgf file in Notepad or another text editor, and edit these 2 lines to your liking with the full path: ... <Data.CurrentLocation>FileSystem::C:</Data.CurrentLocation> ... <Data.DrillDown.Script>C:\start-monitor.ps1 -s {gwmi win32_process -comp localhost}</Data.DrillDown.Script> ...
  17. OK, so you are talking about 2 issues? #1. When you do a PCAnywhere to your desktop, the gadgets don't appear as they should through your remote session? #2. When you reboot the desktop itself, the gadgets don't appear as they should when the system restarts? Or is this a reboot done through PCAnywhere, and you are still viewing the gadgets through the remote session?
  18. I'll try to blog about it, but it could be a few weeks. I've thought of a "wrapper" script that could interactively ask the user some questions and build the gauge that way, based on the answers provided. Explaning how to create these extra gauges through the Creator would be too time consuming to cover in detail. It did help me find the proper parameters though.
  19. Here, put this all on *one line* though (precede each new line below with a single space when you combine it all): get-wmiobject Win32_PerfRawData_PerfOS_Memory|out-gauge -mainvalue {$_.availablembytes} -InnerGauges_Add radial -InnerGauges_0_radialgauge_Value {$_.pagereadspersec} -InnerGauges_0_Layout_Target AnchorPoint -InnerGauges_0_Layout_AnchorPoint"-0.4,-0.4" -InnerGauges_Add radial -InnerGauges_1_radialgauge_Value {$_.writecopiespersec} -InnerGauges_1_Layout_Target AnchorPoint -InnerGauges_1_Layout_AnchorPoint "0.4,-0.4" [Edit: Mention that one needs to add a space to each line, e.g. from above is "-InnerGauges_Add[space]radial"]
  20. Sorry, where do these come from: ModifiedPageListBytes, StandbyCacheCoreBytes, StandbyCacheNormalPriorityBytes? I don't see them in Win32_PerfRawData_PerfOS_Memory on XP. Which one do you want in the main gauge? I'm assuming you'd like to see the other values as "inner gauges"?
  21. The extra functionality you're asking about would be adding the drilldown via the Creator or a having a grid-type cmdlet available? Or both? (Feedback is always important!)
  22. Let me do some research on GetProcessWorkingSetSize/GetProcessWorkingSetSizeEx. I like to think there's always a way, especially with PowerShell... It is pretty easy to incorporate several values into a signle gadget. What would you like to see? One main needle for the current total, then smaller inline needles/gauges representing other data?
  23. OK, so what you're wanting is: 1. A needle to tell you the current value. 2. Some smaller indicators of the current minimum and maximum values that WorkingSet has reached. The values will change/reset if the current min or max is passed to their new values. I would think it would be easier to manage this within a PSH script, and pass the values off to out-gauge after. That will require creating some custom objects. Do I have #1 and #2 right above? From there, I can write something up hopefully today.
  24. Start with this: 1. Copy the attached test.pgf.txt file to your system in C:\, and rename to test.pgf. 2. Copy the start-monitor.ps1 script from here to C:\: http://thepowershellguy.com/blogs/posh/archive/2007/01/21/powershell-gui-scripblock-monitor-script.aspx. (I could attach it here if you have problems.) Copy both to the same location, double-click test.pgf which should start a gadget, then try double-clicking the gadget itself. This is a basic framework for what you've asked for. Let me know what you think... In the next 2 weeks, I'll try to create a guest blog post on this. You don't have access to the drilldown features from Creator, but there's a copy and paste trick that can help out here. [Edit: The original test.pgf puts the path and snap-ins as per my configuration. Attached a new test.pgf referencing C:\ and removed the extra snap-ins I have loaded.]
  25. There isn't an option for single-click versus double-click, but a double-click/drilldown could open up a Windows form by simply calling a PowerShell script written to do so. That being said, you might want to pass what was double-clicked on to the form somehow? Give me a slightly more detailed example, considering what I've said above... The resulting Windows form could have option buttons listed for you to do more specific tasks like you mention.
×
×
  • Create New...