Breaking News
Max’s Cool Beans

Script to Configure Windows Desktop?

NO RATINGS
View Comments: Newest First | Oldest First | Threaded View
<<   <   Page 4 / 4
Max The Magnificent
User Rank
Blogger
Re: Batch files
Max The Magnificent   6/4/2014 9:17:35 AM
NO RATINGS
@MeasurementBlues: You could simply create some shortcuts to open the files and programs you want or copy the paths from the shortcuts and paste them into a batch file.

But that would just open the files -- not place everything where I want stuff on the screens (sad face) -- on the other hand I agree it would be a step along the way -- but I'm going to try the script stuff recommendd in an earlier comment as soon as I get a free moment.

MeasurementBlues
User Rank
Blogger
Batch files
MeasurementBlues   6/3/2014 11:12:13 PM
NO RATINGS
@Max

I automate certain tasks such as doing quick backups by writing batch files. use a text editor and save the file with a .bat extention. For example

You could simply create some shortcuts to open the files and programs you want or copy the paths from the shortcuts and paste them into a batch file. For example


"C:\Users\mrowe\Documents\EE Times\My excel file.xlsx"

then add the next shortcut to the next thing you want to open.

You could put the batch file on your desktop or amke a shortcut to the batch file. OK you do have to open the batch file once booted, but it save hunting around for everything.

betajet
User Rank
CEO
Creature of habit -- to a degree
betajet   6/3/2014 3:02:56 PM
NO RATINGS
I'm a creature of habit -- to a degree.  However, I've never habituated myself to any particular GUI desktop, so I'm pretty good at switching between various versions of Windows (I like 2000, dislike NT, loathe Vista, dislike 7, won't touch 8), Macintosh, and Linux desktops.  Maybe when I have the inclination to write my own desktop I'll have something worth forming a habit around :-)

Now individual programs and programming languages are another story.  I'm definitely a creature of habit there.

[Subject line and first line refer to a stanza of Bob Dylan's "I shall be free #10".]

Max The Magnificent
User Rank
Blogger
Re: Windows Script Host + Run and Place Utility
Max The Magnificent   6/3/2014 1:51:32 PM
NO RATINGS
@jakmal: Your requirements can be achieved through a script executed through Windows-based Script Host (you can use VBScript or JavaScript) and an additional utility called as 'Run and Place'...

You are my hero!

Max The Magnificent
User Rank
Blogger
Re: Windows Script Host + Run and Place Utility
Max The Magnificent   6/3/2014 1:50:35 PM
NO RATINGS
@jakmal: If you want, I can pass on a link to rap.exe. I downloaded it around 6 years back and my source seems to have disappeared (a cursory Google search doesn't lead me to the link now).

So long as rap.exe was a free utility that anyoner coudl download and run, then that woudl be wonderful. How big is it? Would it be possible to ZIP it up and email it to me at max@CliveMaxfield.com

jakmal
User Rank
Rookie
Windows Script Host + Run and Place Utility
jakmal   6/3/2014 1:14:16 PM
NO RATINGS
Max,


Your requirements can be achieved through a script executed through Windows-based Script Host (you can use VBScript or JavaScript) and an additional utility called as 'Run and Place'. I personally have a setup similar to yours to create this sort of workspace:



The difference is that mine is a single monitor, while yours is made of 3 (but, I guess the principle remains the same if you can address any particular location using a pixel co-ordinate).

My js script for the above pic is as below. I just double click this file (or, right click and Open With -> Microsoft Windows-based Script Host) and the programs automatically start in the required locations. (The 'Run and Place' utility rap.exe is in the same path as cluer.exe in the paths mentioned below)

[code]

oShell = WScript.CreateObject("WScript.Shell") ;
oShell.CurrentDirectory = "G:\\Crosswords";
oShell.Run("gvim \"D:\\Dropbox\\Crosswords\\Neyartha\\Database.txt\"" ) ;
oShell.Run("\"G:\\Portables\\LibreOfficePortable\\LibreOfficeCalcPortable.exe\" \"D:\\Dropbox\\Crosswords\\Neyartha\\CrosswordClueTypes.xls\"" ) ;
oShell.CurrentDirectory = "C:\\Program\ Files\ (x86)\\Crossword\ Man\\Wordplay\ Wizard\ 1.1";
oShell.Run("wordplay.exe") ;
oShell.CurrentDirectory = "C:\\Program\ Files\ (x86)\\WordWeb";
oShell.Run("wwnotray.exe");
oShell.CurrentDirectory = "G:\\Portables\\SQLiteSpy";
oShell.Run("SQLiteSpy.exe \"D:\\Dropbox\\Crosswords\\Database\\CompilersHelp.sqlite\"");
oShell.CurrentDirectory = "C:\\Program\ Files\ (x86)\\Clue\ database";
oShell.Run("rap.exe /x=530 /y=610 /w=500 /h=560 cluer.exe");

[/code]

If you want, I can pass on a link to rap.exe. I downloaded it around 6 years back and my source seems to have disappeared (a cursory Google search doesn't lead me to the link now).

 

<<   <   Page 4 / 4
Flash Poll
Radio
LATEST ARCHIVED BROADCAST
Join our online Radio Show on Friday 11th July starting at 2:00pm Eastern, when EETimes editor of all things fun and interesting, Max Maxfield, and embedded systems expert, Jack Ganssle, will debate as to just what is, and is not, and embedded system.
Like Us on Facebook

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
EE Times on Twitter
EE Times Twitter Feed
Top Comments of the Week