Login | |
|
 |
Re: Create single interface to login to multiple sites - 8/24/2004 11:38:49 PM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
Lcough Unfortunately, I am not sure how to do what you are looking to do. Sorry.
|
|
| |
|
|
|
 |
Re: Create single interface to login to multiple sites - 8/30/2004 12:14:51 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
Would you want this script to run at boot up?
|
|
| |
|
|
|
 |
Re: Create single interface to login to multiple sites - 8/31/2004 7:31:39 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
There are a couple ways to do this, all depends on how your work/school network is configured and how you log on to the laptop. Basically, you can check for a network folder i.e. This will check for the folder once ever 10 seconds for 1 min. quote: Count = 0 Do If Fso.FolderExists("\\server\Share\Folder") then DoSomething here Count = 10 Else Count = Count + 1 End If Wscript.Sleep 10000 'Pause for 10 seconds Loop until Count = 10 If Count = 10 then Wscript.quit
Or you can check for a network source via the IPaddress/computername. All depends on the route you want to go.
|
|
| |
|
|
|
 |
Re: Create single interface to login to multiple sites - 9/1/2004 2:00:53 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
quote: To check for an IP or Computer name, how would I go about that?
Here is some code (see below) that I have used to ping a PC via Computername. You don't need to use the GetIP sub if your don't want to return the IP address. There is a script encoder that will encrypt a script but it is not that safe. Another way is to look at something like AutoIT (www.hiddensoft.com) which allows you to create an EXE that would be a bit safer as you can password protect the exe. Off to a meeting. Mike quote: Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject") Dim WshShell : Set WshShell = createobject("wscript.shell") strComputer = "The-Computer-Name" 'Ping Computers set png = WshShell.exec("ping -n 1 " & strComputer) do until png.status = 1 : wscript.sleep 10 : loop strPing = png.stdout.readall 'NOTE: The string being looked for in the Instr is case sensitive. 'Do not change the case of any character which appears on the 'same line as a Case InStr. AS this will result in a failure. Select Case True Case InStr(strPing, "Request timed out") > 1 strReply = "Request timed out" strIpAddress = GetIP(strPing) Case InStr(strPing, "could not find host") > 1 strReply = "Host not reachable" strIpAddress = "N/A" Case InStr(strPing, "Reply from") > 1 strReply = "Ping Succesful" strIpAddress = GetIP(strPing) End Select msgbox strReply & vbcr & strIPAddress Function GetIP(ByVal reply) Dim P P = Instr(reply,"[") If P=0 Then Exit Function reply = Mid(reply,P+1) P = Instr(reply,"]") If P=0 Then Exit Function GetIP = Left(Reply, P-1) End Function
|
|
| |
|
|
|
 |
Re: Create single interface to login to multiple sites - 9/20/2004 12:00:47 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
I am not sure if this can be done with vbscript but you can check out AutoIT. They have a program to reveal what is in an active window which would allow you to see what can be read from that window. www.hiddensoft.com Mike
|
|
| |
|
|
|
 |
Re: Create single interface to login to multiple sites - 9/23/2004 12:37:48 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
What does your header look like in your HTA page? Below is what I use in mine. Dim WshShell : Set WSHShell = CreateObject("Wscript.Shell") Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
|
|
| |
|
|
|
 |
Re: Create single interface to login to multiple sites - 9/23/2004 4:32:34 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
From what you are saying, it seems like HTA would be the way to go. I have not tried to launch IE in a HTA page though, will need to give it a try. Try this, notice no wscript before the createobject. Set objIE = CreateObject("InternetExplorer.Applicatin","objIE_") Will give this a try myself. Mike
|
|
| |
|
|
|
 |
Re: Create single interface to login to multiple sites - 9/23/2004 4:45:28 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
This worked for me when launching a webpage from an HTA page. quote: <head> <title>Something</title> <HTA:APPLICATION ID="oHTA" SCROLL="no" APPLICATIONNAME="HTA Verification" NAVIGABLE="yes"> </head> <body bgcolor="#E1ECFC" text="#000000" style="font-family: Verdana; font-size: 8pt"> <script language="VBscript"> Sub Window_Onload Set IE = CreateObject("InternetExplorer.Application") ie.left=0 ie.top=0 ie.menubar=1 ie.toolbar=1 ie.navigate "http://www.google.com" ie.visible=1 End sub </script> Something something something </body>
|
|
| |
|
|
|
 |
Re: Create single interface to login to multiple sites - 9/24/2004 9:15:15 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
One of the best is Primalscript but it is also the most expensive. The one I use is Editplus www.editplus.com , it is only around 30-40 or so. It does HTML/Vbscript/AutoIT, etc. I have demo'd Admin Script Editor: http://www.adminscripteditor.com and it looks promising, about the only thing holding me back is that I am not able to test the exe packager. To me this is the feature that would push me to buy it. As to the forms issue, I can honestly say that I have never used it, and can't think of another way to do this. Will need to think on it.
|
|
| |
|
|
|
 |
Re: Create single interface to login to multiple sites - 9/25/2004 5:55:08 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
A couple things come to mind, 1) Create a seperate script that you use to send keys. or Create this script of the fly 2) create an AutoIT exe to send keys.
|
|
| |
|
|
|
 |
Re: Create single interface to login to multiple sites - 9/26/2004 11:48:51 PM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
quote: Originally posted by LCoughdrop Also, out of curiousity is there any way to change the width, height or screen position of the HTA
In your script section add this: sub window_onload() window.resizeto 500, 400 Window.MoveTo 450,450 end sub quote: -the "always_on_top" status? -any way to minimize to systray? -any way to launch the HTA from within a vbs...?
-This might be one of the settings in the header, but can't remember which. -Not that I know of. -Yes, WshShell.Run "Mshta.exe Filename.hta",1,true Now that I think on it, I am using a Forms(0) thing in one of my HTA's, here is a quick example of it. This will open a window so you can browse for a file. Once OK is clicked it will pop-up a msgbox with the file name quote: <head> <title>Something</title> <HTA:APPLICATION ID="oHTA" SCROLL="no" APPLICATIONNAME="HTA Verification" NAVIGABLE="yes"> </head> <body bgcolor="#E1ECFC" text="#000000" style="font-family: Verdana; font-size: 8pt"> <script language="VBscript"> sub but_onclick() status = document.forms(0).elements(0).value msgbox status end sub sub butc_onclick() status = "cancel" end sub </script> <form> <INPUT TYPE="file"></input> <input type="button" id="but" value="OK"></input> <BR><BR> <input type="button" id="butc" value="CANCEL"></input> <BR><BR> Browse for file, then click OK. </form> </body>
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|