Public Group

is there anyway for a program to tell windows that a user hit the F5 key?

This topic is 4908 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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.

Share on other sites
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 :)

<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]

Share on other sites
A simple VBS script would cover it.

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.

Share on other sites
Quote:
 Original post by bobason456sure.. 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 :)*** Source Snippet Removed ***may need parent.bottom.window.location I cant remember.DaveC

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?

Share on other sites
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.

Share on other sites
i really don't know anything about html, would it possible for one of you to show me how to do this?

bump?

• What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 13
• 11
• 15
• 11
• 12
• Forum Statistics

• Total Topics
634151
• Total Posts
3015839
×