topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 15, 2024, 2:18 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Command-line parameters?  (Read 19977 times)

kati42

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 10
    • View Profile
    • Donate to Member
Command-line parameters?
« on: June 19, 2009, 11:16 AM »
I'm trying to use DesktopCoral with Rainmeter, but because I'm a convertible tablet user, I have odd needs.  ;)  Basically, I need to move the reserved area depending on the screen orientation (landscape vs. portrait), and resize it based on that orientation as well.

If I could give DesktopCoral command-line parameters to set the size, location, docking, etc, then I could have a sidebar when in landscape mode, and a top bar in portrait mode (without having to go into DesktopCoral settings)...

The biggest challenge might be changing the current instance instead of creating a second one (ie, now when I run it twice I get two copies).

Actually, multiple instances would be nice too (but less critical) - there could be an ID given at the command line, and if it matches an active instance, it changes that instance.  If it doesn't, it creates a new instance with those parameters.

Anyway, this would be very helpful to me, and probably other Tablet users as well.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Command-line parameters?
« Reply #1 on: June 19, 2009, 01:17 PM »
commandline support would be pretty easy to add, let me go ahead and do that.

kati42

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 10
    • View Profile
    • Donate to Member
Re: Command-line parameters?
« Reply #2 on: June 20, 2009, 10:01 PM »
That would be awesome, and would really help my tablet usability!

Thanks!!

kati42

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 10
    • View Profile
    • Donate to Member
Re: Command-line parameters?
« Reply #3 on: June 25, 2009, 05:58 PM »
When it's implemented, will the new version appear in the New Version thread, or will it be in a special beta area?

Thanks,

kati42

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Command-line parameters?
« Reply #4 on: June 26, 2009, 06:47 AM »
ill try to implement it this weekend and then make a normal release of it.

kati42

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 10
    • View Profile
    • Donate to Member
Re: Command-line parameters?
« Reply #5 on: June 26, 2009, 04:13 PM »
Sweet.  No problem if it's not the weekend, though - I have too many deadlines right now to do anything with it anyway.  :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Command-line parameters?
« Reply #6 on: June 27, 2009, 04:39 PM »
i changed my mind and put up a beta for testing before i release:

https://www.donation...esktopCoralSetup.exe

Available Commandline Options/Parameters:

-floatpos X Y WIDTH HEIGHT
-monitorid #
-placement float|left|top|right|bottom
-dockwidth #
-dockheight #

For example:

DesktopCoral.exe -monitorid 2 -placement left -dockwidth 100
DesktopCoral.exe -placement float -floatpos 20 30 600 480

kati42

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 10
    • View Profile
    • Donate to Member
Re: Command-line parameters?
« Reply #7 on: June 27, 2009, 11:46 PM »
Cool!  I have my deadlines, but there were a few others at the Rainmeter forum that were interested.  I'll point them here!

kati42

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 10
    • View Profile
    • Donate to Member
Re: Command-line parameters?
« Reply #8 on: July 02, 2009, 12:10 AM »
The command-line options work great!  Thank you.

But I think I need one more feature.  Let me give my usage scenario so that this makes sense.

I start off using my tablet in landscape mode.  I have a 48px wide sidebar implemented in Rainmeter plus DesktopCoral to reserve space for it.  I switch to portrait mode.  Rainmeter detects the resolution change (from 1280x800 to 800x1280) and swaps Rainmeter configs to an 18px high bar along the top of the screen. I need to move DesktopCoral from the right dock at 48px wide to a top dock at 18px high.

Right now, I end up creating an additional DesktopCoral instance every time I swap between landscape and portrait.

So I need to either modify an existing instance of DC, or I need to be able to close the current instance before running a new one with the new parameters. I think I could "kill" the process in Rainmeter, but that seems unfriendly.

Also, I'm fine with only a single instance of DC, but others may want more than one -- perhaps each instance could have an ID that is 1 for the first one invoked, 2 for the second, etc.?

Anyway - I would need something like:

// when switching to 1280x800 (landscape)
DesktopCoral.exe -close // (which wouldn't do anything if it weren't already open)
DesktopCoral.exe -placement right -dockwidth 48
// when switching to 800x1280 (portrait)
DesktopCoral.exe -close
DesktopCoral.exe -placement top -dockheight 18

OR:

// when switching to 1280x800 (landscape)
open)
DesktopCoral.exe -move -placement right -dockwidth 48
// or DesktopCoral -instance 1 -placement right -dockwidth 48
// when switching to 800x1280 (portrait)
DesktopCoral.exe -move -placement top -dockheight 18
// or DesktopCoral -instance 1 -placement top -dockheight 18

Presumably if an instance # does not exist when the command line refers to it, it would be created...

Anyway - any of those solutions would be sufficient for me.

Thanks for all your work; I made a donation a few months ago, and if this last feature is added, I'll make another because it will be so helpful!

kati42

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 10
    • View Profile
    • Donate to Member
Re: Command-line parameters?
« Reply #9 on: July 16, 2009, 06:06 PM »
Do you think this request is (reasonably) possible, or do you think I should find another way to solve my problem?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Command-line parameters?
« Reply #10 on: July 16, 2009, 06:16 PM »
it's a bit tricky.. may i suggest you see if you can't use a commandline tool (or rainmeter itself) to kill any running instanced of desktop coral, and solve it that way?
and let is know if it works.

flattery

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Command-line parameters?
« Reply #11 on: October 02, 2009, 11:11 AM »
Should be able to detect the resolution change and then place it per the users settings for the different resolution I would think...

liquidstate

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Command-line parameters?
« Reply #12 on: May 17, 2010, 03:30 PM »
Available Commandline Options/Parameters:

-floatpos X Y WIDTH HEIGHT
-monitorid #
-placement float|left|top|right|bottom
-dockwidth #
-dockheight #

Would it be possibe for you to add a command line option to enable transparent mode?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Command-line parameters?
« Reply #13 on: May 18, 2010, 04:49 AM »
seems like an easy enough feature to add.  can you share with us what you would be planning on using the feature to do?