Jump to content

WPI_2.7_Final by the Brain & Gresh


Recommended Posts

WPI is a great utility, but there is one thing that I am trying to do.

I modified the original code from boxes.js in the function FillBoxes() code

Original

for (i=1; (prog[i]!=null); i++)
{    
 if ((cons[i]!=null))
 {
 a = cons[i][0];
 b = cons[i][1];
 if (replpath(a)!=replpath(b)) // constraint ...
    continue;
 }

 if (cat[i] != null && cat[i][0] != oldcat ) // insert new category header
 {
 txt += ('<div class="category">' + cat[i][0] + '</div><hr>');
 oldcat = cat[i][0];
 cats += 2;
 }

Modded OriginalI capped the line I added.

for (i=1; (prog[i]!=null); i++)
{    
 if ((cons[i]!=null))
 {
 a = cons[i][0];
 b = cons[i][1];
 if (replpath(a)!=replpath(b)) // constraint ...
    continue;
 }

 if (cat[i] != null && cat[i][0] != oldcat ) // insert new category header
 {
 TXT += ('<BR><BR>')
 txt += ('<div class="category">' + cat[i][0] + '</div><hr>');
 oldcat = cat[i][0];
 cats += 2;
 }

The reson I added this was to put some spacing in the screen between categories. When I did this some of my text ran off screen. Any ideas on how to fix this? I am not the most fluent Java programmer but I can handle some stuff. Thanks!!

Louis

Link to comment
Share on other sites


If the heights of the categories change, you must also change the column handling (when to start a new column). Look at boxes.js, Lines 210ff:

if ( (winheight == 600) && ((pi+cats)>=(col*19))) { 
 if (col<cols)  { txt += ('</td><td width="' + colwidth + '%" valign="top" nowrap>'); col++; }
 else           {txt += backnext(lasti,colwidth,true); cats=0; pages++; col=1; pi=0; }
}        

if ( (winheight >= 768) && ((pi+cats)>=(col*(winheight/30.72)))) {
 if (col<cols)  { txt += ('</td><td width="' + colwidth + '%" valign="top" nowrap>'); col++; }
 else           { txt += backnext(lasti,colwidth,true); cats=0; pages++; col=1; pi=0; }
}        

the thing you have to change (according to what resolution you are using are the 2nd constraint of the ifs saying winheight=...

Especially the second value - 30.72 (used for resolutions of 1024 and above) - could be the one to change for you. Try to increase/decrease the value and see what happens.

Link to comment
Share on other sites

... the programs that I wanted are selected, so I go to bed, and let WPI do his thing. And see the next morning the same window with a simple message, and I must click OK

Ok. If you want it to run really unattended then edit generate.js, Line 142:

window.alert(getText(msgStartInstall));

Either delete the line completely or comment it like this:

//window.alert(getText(msgStartInstall));

No alert is shown. You're happy. ;)

Link to comment
Share on other sites

Hi guys , i'm using wpi ... dont know the version ..., the problem is that after the wpi's application choosing screen the installation is continuing to install but its reachs to windows desktop ... and its making all sort of problems  .... ( the picture is below )

what can i do?

Where's the prob. Everything runs fine, I think- The ballon's coming from XP's security center - ignore that for now and let the installation process come to an end.

Oh, yes - your version of WPI seems to be a very old one, when I look at the config.

Link to comment
Share on other sites

No alert is shown. You're happy. ;)

Yes, Hasi I'm realy very happy now. This was for me one thing I prefer. Like I said, when making the config file, I made a choice what kind off Apps I would have installed, so after the end of the timer, it looks for me yust easier when WPI just do is thing, so that I can enjoy my freetime..... ;)

Thanks for the solution anyway.

Link to comment
Share on other sites

Is there a setting to use selection buttons in oder to select between alternate software?

Or maybe drop down menus even? Select Office Suite, Select Graphics Prog, Select AntiVirus....

I mean, you can select between: Office2003 and OpenOffice, that kind of thing.

I also wish to have the utilities grouped in sections.... Office, Graphics, Backup...etc

Link to comment
Share on other sites

@fourte3n

I also wish to have the utilities grouped in sections....
That's what I called categories. Already built in.
... setting to use selection buttons in oder to select between alternate software ...

I don't understand your question. This app is about choosing applications for install. You do this by selecting them via checkboxes. So if you configure two different offfice suites, you can select one, both or none. Have you ever looked at the screenshots (follow the link in my signature) ?

Link to comment
Share on other sites

yep you misunderstood. The program uses 'check boxes' that let you select all options. What im talking about is the selection buttons that only let you select one (of a group) of buttons. Like when in reply you see two buttons to the left of the screen 'Guided Mode' or 'Normal Mode' This would stop you from selecting two office suites or anti viruses or firewalls...

Link to comment
Share on other sites

I have looked and not been able to find it. I am sure I am missing something stupid... here goes

When I let WPI run its course on the timer it gives me the message box. Is there anyway for it not to give the message box once the timer expires?

Link to comment
Share on other sites

I have looked and not been able to find it. I am sure I am missing something stupid... here goes

When I let WPI run its course on the timer it gives me the message box. Is there anyway for it not to give the message box once the timer expires?

Solved it.

I went to Generate.js and changed the code to this

function CreateFile(arg) {
var programs = new Array();
 var KeyBase = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx";
 var j = 0;

var msg;

//window.alert(getText(msgStartInstall));  

if (arg=='exit'){  // when pressing exit button, removes default checked checkboxes
 remChecks();
}

Just remmed out the line window.alert....

works great!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...