Jump to content

Recommended Posts

Posted

Hey guys,

Does anyone have a script that can skip like a random number of lines, then write a value from the inputbox command to a specific word...

I just want to be able to put like a 1 - 7 from an inputbox after the extremeserver part.

Ex:

'Skip the line below

SLGOrchardSite.properties - Properties file for the SLGOrchardSite database

'skip the line below

driver = com.mysql.jdbc.Driver

'Change the extremeserver part of this line

dbConnection = jdbc:mysql://extremeserver:3306/

'Skip the line below

database = ClusterDB

Thanks if anyone can help


Posted

Please try to explain your problem a little more clearly, I don't understand enough to even take an educated guess at something for you.

Posted

i want to be able to have inputbox, so the user can put a number value from 1 -7 and that value with get inserted right after the word extremeserver.

After they input the value it will save the file with the changes..

Does that help?

Posted

The bit about random number of lines through me off the scent. So all you want is to replace extremeserver with extremeservern where n is an integer from 1-7(incl) and chosen by user input.

Posted

Some thing like this maybe

Save as ServerNumber.hta

 <!--
Created By Gunsmokingman Friday, January 04, 2008
-->
<HTML><HEAD>
<TITLE>Server Number</TITLE>
<HTA:APPLICATION ID='ServerNumber'
Scroll='No'
SCROLLFLAT ='No'
SingleInstance='Yes'
SysMenu='Yes'
ShowInTaskBar='No'
MaximizeButton='No'
MinimizeButton='No'
Border='Thin'
BORDERSTYLE ='complex'
INNERBORDER ='Yes'
Caption='Yes'
WindowState='Normal'
APPLICATIONNAME='Server Number'
Icon='%SystemRoot%\explorer.exe'>
<STYLE Type="text/css">
Body
{
Font-Size:9.05pt;
Font-Weight:Bold;
Font-Family:Arial,Tahoma,Comic Sans MS,Segoe Ui;
Color:#001254;
BackGround-Color:Transparent;
Filter:progid:DXImageTransform.Microsoft.Gradient
(StartColorStr='#fdf7f1',endColorStr='#d1cbc5');
Margin-Top:1;
Margin-Bottom:1;
Margin-Left:4;
Margin-Right:4;
Padding-Top:1;
Padding-Bottom:1;
Padding-Left:4;
Padding-Right:4;
Text-Align:Center;
Vertical-Align:Top;
Border-Top:2px Solid #cbc7c3;
Border-Bottom:3px Solid #a6a29e;
Border-Left:2px Solid #bcb8b4;
Border-Right:3px Solid #b2aeaa;
}
Select.Bx1
{
Font-Size:7.95pt;
Font-Weight:Bold;
Font-Family:Arial,Tahoma,Comic Sans MS,Segoe Ui;
}
.Sel1
{
BackGround:#D9D9D9;
Color:#3A3A3A;
}
.Sel2
{
BackGround:#E9E9E9;
Color:#235779;
}
BUTTON
{
Cursor:Hand;
Font-Size:8.05pt;
Font-Weight:Bold;
Font-Family:Arial,Tahoma,Comic Sans MS,Segoe Ui;
Color:#002264;
Filter:progid:DXImageTransform.Microsoft.Gradient
(StartColorSTR='#bbddff',endColorSTR='#224488');
Padding-Top:1;
Padding-Bottom:2;
Margin-Left:2pt;
Margin-Right:2pt;
Border-Top:2px TransParent;
Border-Bottom:3px TransParent;
Border-Left:2px TransParent;
Border-Right:3px TransParent;
}
.B1
{
Color:#005353;
Filter:progid:DXImageTransform.Microsoft.Gradient
(StartColorSTR='#bbddff',endColorSTR='#228844');
}
</STYLE>
<script LANGUAGE='JScript'>
window.resizeTo (225,139), window.moveTo (195,175);
</SCRIPT>
<script Language="VBScript">
Function ComputerNumberSelect()
For i = 0 to (ComputerNumber.Options.Length - 1)
If (ComputerNumber.Options(i).Selected) Then
If ComputerNumber.Options(i).Value = "Computer Number" Then
Exit For
Exit Function
Else
alert("extremeserver" & ComputerNumber.Options(i).Value)
End If
End If
Next
Exit Function
End Function
</SCRIPT>
</HEAD><BODY Scroll='No'>Select Your Server Number
<SELECT size='4.55' name='ComputerNumber' style='width:131pt;' Class='Bx1'
OnChange='ComputerNumberSelect()'>
<OPTION Value='Computer Number' Class='Sel1'> Select Server Number</OPTION>
<OPTION Value='1' Class='Sel2'>  001</OPTION>
<OPTION Value='2' Class='Sel1'>  002</OPTION>
<OPTION Value='3' Class='Sel2'>  003</OPTION>
<OPTION Value='4' Class='Sel1'>  004</OPTION>
<OPTION Value='5' Class='Sel2'>  005</OPTION>
<OPTION Value='6' Class='Sel1'>  006</OPTION>
<OPTION Value='7' Class='Sel2'>  007</OPTION>
</SELECT>
<DIV Style='Margin-Top:3pt;'>
<BUTTON ID='Btn01'
OnMouseOver='this.className="B1"'
OnMouseOut='this.className=""'
Onclick='window.close()'
Style='Width:45pt;Height:13pt;'>Close</BUTTON>
</DIV>
</BODY></HTML>

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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