Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to script web page naviagtion

Status
Not open for further replies.

weberm

Programmer
Dec 23, 2002
240
US
I'm not sure if this is the right place to ask this, but how would one make a script to navigate a web site, login, and download a file?
 
Hi

Hope you are not thinking to client side scripting, for example in JavaScript.

To accomplish this task you have to write a script or program which will act like a browser. So the easiest way is to choose a language which has already HTTP client components or functions capable to handle remote files. I tried this :
[ul]
[li]Perl - the LWM modules[/li]
[li]PHP - the functions which can handle remote files or the socket functions[/li]
[li]Kylix / Delphi - the Indy components[/li]
[/ul]
Choose something, then go to a forum related to that language.

Feherke.
 
Definetly need more information.
I have an application which requires me to manually use my browser to go to a secure website, login, select, and then download a file from that site. We used to have a script written in WinBatch that was scheduled to perform these tasks without human intervention, but was rendered inoperable by an upgrade to the site about a year ago, plus, we no longer have the resource who originally created the script. I thought there was a way to record my keystrokes and clicks in Windows but I guess that's no longer the case, so it appears I'm going to have to create the batch script one way or another.
 
Logon scripts can be useful tools for configuring desktop environments for users. Some of the things such scripts can be used for include mapping network drives, connecting to shared printers, gathering system information, synchronizing system clocks, and so on. In fact, just about anything you can do from the command-line can be done using a logon script.

Logon scripts have been around for a while and most administrators of Windows-based networks have had occasion to use them. On Windows NT domain-based networks things were simple: if a user needed to have his environment configured using a logon script, the administrator would first write a logon script using the batch programming language, which has been around since the days of MS-DOS. Once written, this script was saved using a .bat extension to make it executable, but to make it work for a particular user the script needed to be found in the NETLOGON share of the domain controller to which the user’s account was authenticated. In Windows NT this NETLOGON share corresponded to the %systemroot%\system32\repl\import\scripts folder, and by placing the script in this folder on the PDC it was automatically replicated to all BDC’s in the domain. Once this was done, the administrator only had to add the name of the script to the Logon Script Name field on the User Environment Profile dialog box using User Manager for Domains.

Then Windows 2000 came along, with its support for assigning logon scripts using Group Policy and its built-in support for Windows Script Host (WSH) as an alternative for traditional batch scripts. While WSH lets you create much more powerful logon scripts and Group Policy lets you manage logon scripts more easily, a problem arises when your networking environment has a mix of desktops that include legacy platforms like Windows 95/98 and Windows NT 4.0 Workstation. The rest of this article provides some suggestions for managing logon scripts in both a mixed (Windows 2000/XP/2003 and legacy Windows 95/98/NT) environment and a pure Windows 2000 (or later) environment.

 
I eventually decided to use WinBatch, with an eye towards rewriting it in Perl (with the LWM modules) and incorporating it into my shell script which processes the downloaded files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top