473,765 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Script to grab web page

drhowarddrfine
7,435 Recognized Expert Expert
I have a web application that will generate a web page and tuck it in a top secret location on the server. I need a Windows XP box to be able to run a program in the background to check to see if the page is there and fetch this page from the server and print it on the Windows printer. It should poll the server every minute or two.

XP Pro is available but would rather it run on XP Home. The page is located in an unpublished area of the server but does not need to be secured. The page would be html, text only for now, but I could tolerate plain text (for now).

If this was a 'nix box, I could use a shell script and wget and write a script in 10 lines to do this but none of that is installed on Windows. I reeeaaaallly don't want to have to install anything on the Windows box to do that so I'm wondering if there is an equivalent scripting method that would work with something in Windows and do what I want.

From googling a little, all I see is everything done in VB. I reeeaallly don't want to have to learn VB to do what should be a trivial task, and I'm concerned what I would have to download and install just to develop the code.

Can someone give me a clue, please?
Send me the code.
It's URGENT!!!
;)
Nov 19 '08 #1
20 5298
Nepomuk
3,112 Recognized Expert Specialist
Luckily, MS seems to have realised how powerful the unix shell and how lame theirs is. So, they developed the Windows PowerShell which can downloaded for free. OK, you preferred to install nothing, but I think you may want to change your mind for this. The syntax seems to be quite similar to that in bash, so you should find your way around it quickly.
Send me the code.
It's URGENT!!!
;)
OK, because it's you. Here are two versions of wget for the PowerShell: simple version and more powerful version. ^^

Greetings,
Nepomuk
Nov 20 '08 #2
drhowarddrfine
7,435 Recognized Expert Expert
**sigh**
More to learn.

Or not.

I saw the PowerShell thing yesterday and thought it was an editor. I also see it's hooked in with .NET and you must(?) learn some of the .NET stuff.

The decision is between learning that or installing Windows on a box, downloading the PlatformSDK and coding in Win32, something I have experience with. I don't want to do either but feel more comfortable doing the latter. I'm also concerned that forcing customers to install PowerShell just to run my little script would be highly inconvenient.

And I'm looking at 10 lines of code in 'nix and I'd be done right now. People wonder why I feel the way I do about Windows.
Nov 20 '08 #3
Nepomuk
3,112 Recognized Expert Specialist
I just thought some more and remembered Cygwin. It basically gives you a unix-like command line for Windows and it runs bash (and some other shells too), so no need for relearning. However you'd still have to install something.

Is there a way around that? Maybe - with win-bash for example, which is a port of an old version of bash. You don't have to install it, just copy the exe somewhere. If you want to load it from the windows command line, put the place that exe is in in the Path variable. I've never tested it, but it sounds good, right?

There are similar projects like GNU BASH For Windows, GNU utilities for Win32, MinGW and probably many more. I don't know which of these have to be installed and which don't, but maybe you can tell us more soon? ^^

Oh, maybe just downloading wget for Windows will do the job too - it all depends on the script you want to write.
And I'm looking at 10 lines of code in 'nix and I'd be done right now. People wonder why I feel the way I do about Windows.
Believe me, I can understand your frustration. Since I've been using Linux, I feel very limited every time I use a Windows machine.

Greetings,
Nepomuk
Nov 20 '08 #4
drhowarddrfine
7,435 Recognized Expert Expert
Yes, I've used cygwin but there, again, I'd have to install it. I'm also wondering if it might conflict with Win networking.

Does anyone happen to know if VB.NET is installed by default with .NET or Windows itself? I'm wondering if I might find someone to write this simple script for me.

As I was typing this, I was thinking whether Firefox and Prism (or is it Weave?) could do this. It interacts with web apps and is standalone from the browser and a smaller footprint. But I don't know if it could print. Of course, then I'd have to learn how to use it but that would be far more useful than VB.NET.
Nov 20 '08 #5
Nepomuk
3,112 Recognized Expert Specialist
Does anyone happen to know if VB.NET is installed by default with .NET or Windows itself? I'm wondering if I might find someone to write this simple script for me.
As I understand it (and I don't know much about .NET) all .NET languages are translated to a common byte code language, so it doesn't matter which .NET language a program was written in, if the Framework is installed, you can run it.

Greetings,
Nepomuk
Nov 20 '08 #6
drhowarddrfine
7,435 Recognized Expert Expert
I know that but is vb.net installed automagically on all systems?

Right before I went to bed, I saw an article talking about VBScript. I'm wondering if that's on all systems. I don't think it needs .NET and it looks basic enough.
Nov 20 '08 #7
AmberJain
884 Recognized Expert Contributor
Hello,

Right before I went to bed, I saw an article talking about VBScript. I'm wondering if that's on all systems. I don't think it needs .NET and it looks basic enough.
I dont know much about VB or .NET but I am sure that VBscript is available on all the systems and it doesnot needs .NET.

In wikipedia's words:

VBScript is installed by default in every desktop release of Microsoft Windows since Windows 98,[1] and may or may not be included with Windows CE depending on the configuration and purpose of the device it is running on.
A VBScript script must be executed within a host environment, of which there are several provided on a standard install of Microsoft Windows (Windows Script Host, Internet Explorer). Additionally, The VBScript hosting environment is embeddable in other programs, through technologies such as the Microsoft Script control (msscript.ocx).
Hope this helps....
AmbrNewlearner
Nov 20 '08 #8
Curtis Rutland
3,256 Recognized Expert Specialist
If you're into scripting, VBScript would be the way to go. Probably won't be all that difficult, but I'm not a scripting kind of person.

On the other hand, if you're a programmer, and you have Visual Studio, you could write a windows service pretty quickly. Then you wouldn't have to worry about scheduling the script to run.

From what I have experience with, the second is easier, but if you don't have a working knowledge of .NET, (which should be installed in either SP2 or SP3 by default) then I would go with the first.
Nov 20 '08 #9
drhowarddrfine
7,435 Recognized Expert Expert
OK, so now I know VBScript is what I can use. Back to the original question:
I have a web application that will generate a web page and tuck it in a top secret location on the server. I need a Windows XP box to be able to run a program in the background to check to see if the page is there and fetch this page from the server and print it on the Windows printer. It should poll the server every minute or two. XP Pro is available but would rather it run on XP Home. The page is located in an unpublished area of the server but does not need to be secured. The page would be html, text only for now, but I could tolerate plain text (for now).
Nov 20 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4678
by: R | last post by:
Hi, I have an image loaded on my page that comes from a remote site using JavaScript I'm using... <script src='http://www.whatever.com/JD088?template=GX5'></script> The image loads fine but my page seems to wait for this image to load before
1
4806
by: net | last post by:
I know how to make a page open itself at a certain size and location - I use: <html> <head><script language="Javascript"> window.resizeTo(370,220); window.moveTo(10,10); </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head>
2
7952
by: mmcc128 | last post by:
When I call this... ------------------------- function funcWinTopJS(){ var s = document.createElement('script'); s.type = "text/javascript"; s.src = "Javascript/Master.asp"; document.documentElement.appendChild(s) } ----------------------------
5
1474
by: P4tryk | last post by:
I load some page using XMLHttpRequest. It has some java script on it. I add this page (using innerHtml) to another but then the java script doesn't run. The main page has <script> function go() { getElementById("replaceContent").innerHtml=httpReq.text; }
3
8265
by: Dustin II. | last post by:
Hi, I have an ASP.NET solution, and the ASPX page I have a form , I want to copy some of the data from that form to the clipboard, I am using the below script the script works fine when I use a normal anchor tag with the onclick event, but I want to be able to use an actual asp control like the hylperlink or linkbutton. I have tried the link button but it gives an error saying Compiler Error Message: BC30456: 'VBScript' is not a member of...
0
1610
by: manywolf | last post by:
I have an aspx page that fires the page load event twice for every load. I tried every fix that was suggested in all the posts on this and other forums. None changed the behavior. After one post that suggested they had an img tag with src="", I decided to look for instances of "src" and one by one start removing that code to see if it changed anything. Below is the one that, when I removed it, although it broke the flash menus and header, solved...
1
1646
johnbob2010
by: johnbob2010 | last post by:
Is it possible to grab something off a given web page (like page title) and send that along with the form when they click submit? I guess the question is - can I variablize the page title and then pull that variable into the form when submitting? I am using bnbform.cgi on my web host.
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.