is there anyway for a program to tell windows that a user hit the F5 key?
alright, here is what i'm trying to do:
my ftp server kicks out users who aren't doing anything after a certain amount of time. i do not know of any way to fix this, and can't change the settings for my ftp server even if i wanted to as i'm away at school.
so i want to write a program that has windows tell IE every minute or so, to refresh the ftp file page. this way i'll still be giving the server commands and won't get kicked off. is there anyway to do this? thank you for your time.
sure.. create a web page with two frames .. name one frame "bottom" and have it navigate your ftp server. In the top frame add the following javascript.. and begin debuging :)
may need parent.bottom.window.location I cant remember.
DaveC
[Edited by - bobason456 on August 15, 2005 6:11:24 AM]
<script language="Javascript"><!--function reload() { parent.bottom.location = "www.ftpserver.com/ftppage.html"}setTimeout("reload()", [[[50000]]]);//--></script>
may need parent.bottom.window.location I cant remember.
DaveC
[Edited by - bobason456 on August 15, 2005 6:11:24 AM]
A simple VBS script would cover it.
Refresh.vbs:
That should work, although it's untested.
EDIT: That will obviously require IE to be the topmost window. You could probably do it with Internet Explorer's object - but I'm too lazy to check, I've got to run.
Refresh.vbs:
Dim WshShellSet WshShell = CreateObject("Wscript.Shell")If WshShell.AppActivate("Your FTP Window Title") = False Then End //Just die.End ifWhile WshShell.AppActivate("Your FTP Window Title") = True WshShell.Sendkeys("{F5}") Wscript.Sleep(60000) //Send the F5 key, sleep for 60 seconds, loop. Will exit when you close the program, theoretically.Wend
That should work, although it's untested.
EDIT: That will obviously require IE to be the topmost window. You could probably do it with Internet Explorer's object - but I'm too lazy to check, I've got to run.
Quote:Original post by bobason456
sure.. create a web page with two frames .. name one frame "bottom" and have it navigate your ftp server. In the top frame add the following javascript.. and begin debuging :)<br><br>*** Source Snippet Removed ***<br>may need parent.bottom.window.location I cant remember.<br><br>DaveC<!--QUOTE--></td></tr></table></BLOCKQUOTE><!--/QUOTE--><!--ENDQUOTE--><br><br>first off, i'd like to thank both of you for your help so far. this javascript way seems to be easy and will work. but how do i point the bottom frame of a webpage to an ftp server?
you can navigate ftp servers in your browser (e.g. ftp://ftp.microsoft.com/). You should get prompted for user/pass on your own server, but you should only have to enter that once if the refresh is working.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement