Results 1 to 3 of 3
  1. #1
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,970
    Thanks
    424
    Thanked 1,600 Times in 1,450 Posts

    Medical PowerShell?

    Hey Y'all,

    As some of you know I recently (3 months ago) had knee replacement surgery. Everything went extremely well and I've even played some mild tennis the other day. However, one thing that was giving me trouble was completing my physical therapy exercises at home. The exercises require counting reps and timing the holds and rests. Well my drug addled mind was having a problem keeping track. My better half pitched in but it quickly got boring (three times a day) and she started to loose track!

    So I thought I should be able to program my computer to do this simple counting work. PowerShell to the rescue of course. This actually worked so well, for me at least, I thought I'd pass it along for anyone else that could find it useful.

    Along the way I learned some new PS techniques while improving this program:
    1. Have the program automatically setup a shortcut on the desktop w/hotkey to make it easier to start.
    2. Make PS talk to me so I wouldn't have to look at the screen, just have the keyboard on the floor with me.
    3. How to make ScriptBlocks from strings.
    4. Retrieving an array from a CSV file.
    5. How to check to see if an Assembly is loaded.

    So even if you don't need to do PT maybe you can pickup some useful PS techniques. In the attached zip file there are three files:

    Invoke-PTExerciseRoutine.ps1: Original version that has a small code block to call each individual exercise.
    Invoke-PTExerciseRoutine-File.ps1: Original version modified so it reads the exercise parameters from a csv file which means you can change the regime w/o writing any code!
    Exercises.csv: A sample exercise routine. This file can be created with any spreadsheet program that will write a file in MSDOS CSV format. You can also use an editor that writes out plain text files.

    Here are the Files: Invoke-PTExerciseRoutineFiles.zip

    As always comments welcome, especially if you have a better way...always looking to improve my PS skills.

    HTH
    Last edited by RetiredGeek; 2017-01-19 at 15:03.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  2. #2
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Tennessee,USA
    Posts
    182
    Thanks
    41
    Thanked 17 Times in 15 Posts
    As some of you know I recently (3 months ago) had knee replacement surgery.
    I am one of those who was not aware of your surgery. Best wishes on your recovery. Hope no complications arise.
    Michael

  3. #3
    5 Star Lounger RockE's Avatar
    Join Date
    Dec 2009
    Location
    Paducah, Kentucky
    Posts
    652
    Thanks
    59
    Thanked 122 Times in 112 Posts
    I'm sure that we all wish you continued recovery, RetiredGeek.
    Clone or Image often! Backup, backup, backup, backup...
    - - - - -
    Home Built System: Windows 10 Home 64-bit, AMD Athlon II X3 435 CPU, 16GB DDR3 RAM, ASUSTeK M4A89GTD-PRO/USB3 (AM3) motherboard, 512GB SanDisk SSD, 3 TB WD HDD, 1024MB ATI AMD RADEON HD 6450 video, ASUS VE278 (1920x1080) display, ATAPI iHAS224 Optical Drive, integrated Realtek High Definition Audio

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •