Windows Form passing on Javascript

Arg81

Well-known member
Joined
Mar 11, 2005
Messages
949
Location
Midlands, UK
Programming Experience
1-3
Is this possible?

I have created a simple Windows App that on a push of a button needs to restart a print server.

However, the restart button on the print server web front end uses Javascript.

I have successfully got my app passing on the IP address as a variable for the print server, but I also need it to immediately run the Javascript, as this asks the user whether they want to restart (Yes / No).

I currently use;

VB.NET:
[SIZE=2][COLOR=#0000ff]Dim printip as string = lblIP.text
Dim[/COLOR][/SIZE][SIZE=2] writer [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] IO.StreamWriter("c:\RestartQueue.bat")
writer.WriteLine("Start IEXPLORE.EXE " & printip & "/a_server.shtm")
writer.Close()
 
Process.start("c:\RestartQueue.bat")
 
[/SIZE]


At the point of opening Internet Explorer, I then want it to simulate pressing the "Restart" button on the webpage, which uses javascript:doRestart()

Any help would be much appriciated.

Kind Regards,
Luke


 
Back
Top