minimizing the IDE

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

minimizing the IDE

floriangrond
Dear List, is there a way to minimize the IDE from sclang (I'm on Windows)? Best, Florian
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: minimizing the IDE

ddw_music
fgrond wrote
Dear List, is there a way to minimize the IDE from sclang (I'm on Windows)?
sclang doesn't have any direct access to the IDE window. It can directly control GUI windows created by the sclang process only. The IDE is a separate process -- its window(s) don't belong to sclang, so... there's not an easy way.

It might be possible to do it indirectly, IF you can find a Windows commandline executable that can manipulate windows. At [1], I see a reference to something called NirCmd [2]. With that, it appears you could do:

"nircmd win min (something here to find the window)".unixCmd;

"(something here to find the window)" -- I'm not going to work that out for you, because I'm not on Windows and I can't try it myself. According to NirCmd help, you can match a string at the beginning, in the middle, or at the end. I'm seeing "SuperCollider IDE" at the end of the window title, so I *guess* this might work (untested, you'll probably have to adjust):

"nircmd win min etitle \"SuperCollider IDE\"".unixCmd;

(Note that you have to escape \"quotes\" inside SC string literals.)

YMMV, I can't test this and I never heard of nircmd until today, so I can't vouch for it. I did successfully use wmctrl in linux similarly, so the basic idea is sound. It all depends on the external tool.

hjh

[1] http://superuser.com/questions/297850/is-there-a-command-line-utility-equivalent-to-wmctrl-on-windows

[2] http://www.nirsoft.net/utils/nircmd.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: minimizing the IDE

floriangrond

Thanks a lot for this! Florian

On Jan 5, 2017 22:58, "ddw_music" <[hidden email]> wrote:
fgrond wrote
> Dear List, is there a way to minimize the IDE from sclang (I'm on
> Windows)?

sclang doesn't have any direct access to the IDE window. It can directly
control GUI windows created by the sclang process only. The IDE is a
separate process -- its window(s) don't belong to sclang, so... there's not
an easy way.

It might be possible to do it indirectly, IF you can find a Windows
commandline executable that can manipulate windows. At [1], I see a
reference to something called NirCmd [2]. With that, it appears you could
do:

"nircmd win min (something here to find the window)".unixCmd;

"(something here to find the window)" -- I'm not going to work that out for
you, because I'm not on Windows and I can't try it myself. According to
NirCmd help, you can match a string at the beginning, in the middle, or at
the end. I'm seeing "SuperCollider IDE" at the end of the window title, so I
*guess* this might work (untested, you'll probably have to adjust):

"nircmd win min etitle \"SuperCollider IDE\"".unixCmd;

(Note that you have to escape \"quotes\" inside SC string literals.)

YMMV, I can't test this and I never heard of nircmd until today, so I can't
vouch for it. I did successfully use wmctrl in linux similarly, so the basic
idea is sound. It all depends on the external tool.

hjh

[1]
http://superuser.com/questions/297850/is-there-a-command-line-utility-equivalent-to-wmctrl-on-windows

[2] http://www.nirsoft.net/utils/nircmd.html



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/minimizing-the-IDE-tp7629946p7629990.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Loading...