AutoHotkey Community

It is currently May 26th, 2012, 1:27 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: November 22nd, 2008, 7:14 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
This question is probably very silly, but I still decided to ask it here because it is AHK-related. So,

is it possible in AHK to run my script not from my computer, but, let's say, from some remote server?

If I need to check some website for changes and register those changes in some list, but I can't run my home computer all the time, could I just upload my AHK script to some free (or non-free) hosting server and have my script run there all the time for me?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2008, 7:45 pm 
Yes, if it´s a windows-server.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2008, 7:53 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
So, how can I found out whether a certain server is a window's server or not? Will they write that in their description of services they provide?

And, even if it's a window's server, how will I know that it will run my script there? Is it that usual "scripts are supported" or something else that I must be looking for?

And also, what about AHK scripts? Will they know what AHK is, or I have to, perhaps, compile my script before uploading it to their server?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2008, 8:32 pm 
Offline

Joined: July 25th, 2006, 9:06 am
Posts: 51
If the PC is electrically off then nothing is running.
Needs electrons to work.
P


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2008, 8:43 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
peterm wrote:
Needs electrons to work


Will there not be some electrons still working on the remote server?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2008, 10:57 pm 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
i hardly doubt that a company which runs a webserver will let U have a script (precompiled, pure whatever) being run on a computer they make money with.

u can however rent a remote server with a running windows and do whatever u desire with it - as long as u are willing to pay for that service

google for website monitoring - there are several companies offering such a service

_________________
Image
    All scripts, unless otherwise noted, are hereby released under CC-BY


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2008, 7:31 am 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
DerRaphael wrote:
i heavily doubt that a company which runs a webserver will let U have a script (precompiled, pure whatever) being run on a computer they make money with.

But what about those providers that allow you to create your own websites and
even provide you with unlimited space (once you’ve reached a certain threshold,
you can automatically increase your space on their server)? If they give me so
much space free and allow me to create and upload as many html pages as I
just want, why would they mind me uploading some of my scripts too?

Don’t they already run my html pages round the clock for free (anyone can
have an access to my html pages placed on their server and watch them at any
time)?

Or, perhaps, there is a big difference between having your html pages and
having your scripts there?

DerRaphael wrote:
google for website monitoring - there are several companies offering such a service

Here I found one link => [CLICK HERE], and according to what it says, there
doesn’t seem to be much difference between uploading an html document
(i.e. creating your own web page) and uploading and running a script.

Let’s say I have a very simple script, something like this one:

Code:
msgbox, 3, , do you want to know the name of the smallest country in the world?
IfMsgBox No
    return
IfMsgBox yes
msgbox, Vatican
    return

Can I upload it on a free-hosting server just the way I would do with an html
document and have it run there in this way? Or maybe I could simply insert
it into an html document of my page and, thus, whoever opens that page will
automatically run my script?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2008, 3:30 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
At yahoo.answers I've just been advised to download a Webspider at
http://www.openwebspider.org. I was told there that Webspider is exactly what
I need for my task. Has anyone here ever used a Webspider before? Can you
please comment on that?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2008, 12:19 am 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
hi benny - a webspider utility is definitly not what u need.

a webspider, captchures a current state of a webpage such as ahk.com whatever - and will only run from ur computer when this one is powered on.

what u definitly need is a deeper understanding how things work. i dont mean to offend.

however, there are free websites around, which will drop u an email whenever a page changed.

the so called free-hosting companies give u space that u can use to make ur data accessible. under no circumstances will ur stuff be executed unless it is a hard safetychecked php script which will run within several limits (perl, and asp also possible, but kinda rare) - a phpscript is a so called webservice script, with the purpose of generating htmlsites, which would otherwise be to many to take care of (such as the forum pages, here which are a perfect example) - if u're advanced enough in php scripting (and ur free-provider allows such content), u can however misuse these script for many different tasks such as monitoring other websites.

dR

_________________
Image
    All scripts, unless otherwise noted, are hereby released under CC-BY


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2008, 12:22 am 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
check this one: http://www.changedetection.com/

_________________
Image
    All scripts, unless otherwise noted, are hereby released under CC-BY


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2008, 6:25 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
Hello, DerRaphael!!!

Thank you for your time.

DerRaphael wrote:
hi benny - a webspider utility is definitly not what u need.

a webspider, captchures a current state of a webpage such
as ahk.com whatever - and will only run from ur computer
when this one is powered on.

I kind of suspected that the webspider was not the way to go,
because, as you said, its actions were dependant on whether or
not my computer was on. The one who gave me this suggestion
on yahoo.answers obviously didn’t get my point in the question.

DerRaphael wrote:
what u definitly need is a deeper understanding how things
work. i dont mean to offend.

Sure. I am just a newbie, so I am just learning. (Of course I am
not offended.)

DerRaphael wrote:
the so called free-hosting companies give u space that u can
use to make ur data accessible. under no circumstances will
ur stuff be executed unless it is a hard safetychecked php
script which will run within several limits (perl, and asp also
possible, but kinda rare)


To tell you the truth, I’ve already become quite excited about
the idea of solving this task by the way of writing some script.
I think I will start from asp-script way. I know it will take time
to learn, but why not? Plus, I do have free time these days, so
why not try learning something?!

Here I found a snippet of asp script, which looks to be relevant
to what I am trying to accomplish (below is a quote from here):

******************************************************↓
This function is used to grab an HTML page using Microsoft's
XMLHTTP component , using this component you can grab any
page off the internet . Here is the code for this example:


<%
Function GrabPage(strURL)
Dim objXML
Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
objXML.Open "GET" , strURL , False ,"",""
objXML.Send
If Err.Number = 0 Then
If objXML.Status = 200 then
GrabPage = objXML.ResponseText
Else
GrabPage = "Incorrect URL"
End if
Else
GrabPage = Err.Description
End If
Set objXML = Nothing
End Function
%>



And you call the GrabPage Function like this:

<%= GrabPage("http://www.expertsforge.com")

******************************************************↑

What do you think about it?

DerRaphael wrote:
... a phpscript is a so called webservice script, with the purpose
of generating htmlsites, which would otherwise be to many to take
care of


On another forum I was given one more way, which also seems
to be the way to solve my problem. When I took the first look at
it, I thought that that supporter was also suggesting something
dependable on my computer being powered, but he later insisted
it was not. Here is the quote of my communication with him:

******************************************************↓
///////////////////////////////////////
get this:
http://www.interlog.com/~tcharron/wg...3_1-binary.zip

create a batch file: testsite.bat


echo --------------- >>logfile.txt
date >>logfile.txt
time >>logfile.txt
echo --------------- >>logfile.txt
wget http://www.yoururl.com >>logfile.txt


put it in windows scheduler to run every 20 minutes

///////////////////////////////////////

I still have some questions:

1)
get this:
http://www.interlog.com/~tcharron/wg...3_1-binary.zip

I have downloaded this zip file from your link and unzipped it.
To tell you the truth, I don’t know how I should proceed next.
I thought there would be something like “install” file, but
there isn’t one. So, I guess, nothing needs to be installed
here, right?

2)
create a batch file: testsite.bat

How do I create this batch file? Is it like I have to create a
common Notepad file and then change its extension from .txt
to .bat? And where do I place it after creating it? Into the
same folder where all the other unzipped files are?

3)
put it in windows scheduler to run every 20 minutes

Please explain to me how to do that?

4) Lastly, the most important question: after I have fully
followed on your instructions, will I be able to turn off my
computer and be sure that the desired task is still
being carried out? I am afraid what you are suggesting is
simply creating a task on my computer that will be carried
out by itself every time I turn on my computer. That would
mean I would have to keep my computer on all the time,
otherwise, if I turn it off, the task process will also stop. Am
I correct? If yes, then this is not what I really want. Perhaps,
what I need is a web-page-html-periodically-copying script
that I could somehow place on some remote windows server
that would run my script all the time regardless of whether
my computer is on or off.

///////////////////////////////////////


1. all you need the is wget.exe file.

2. you can use notepad and simply save the file as .bat
it has to be in the same directory where wget.exe is

3. start > control panel > scheduled tasks

4. you place this script on a server you have access to, and
it will check the url and place the output in logfile.txt in the
same directory. SOME MACHINE has to be up all the time for
the task to be carried out, there is no way around that.

///////////////////////////////////////
******************************************************↑


So, what do you think about his proposed way?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2008, 4:21 pm 
Quote:
So, what do you think about his proposed way?


this requires ur computer being on ...

did u check the link i posted?

having a service monitoring any webpages for u and dropping your infos about these pages via email - could be redirected from a email provider to ur cellphone (just the note, a new email from monitoring company dropped in - not the entire email)

this way u wont need to mess with ASP or any other server side scripting language (btw - i'd recommend u learn php over asp, php runs also on windows but additionally on linux and other unix-like systems, too)

dR


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 28th, 2008, 11:45 am 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
dR [nli] wrote:
this requires ur computer being on ...
Really?! Sounds quite disappointing... So, it seems that
this supporter didn’t get my point either

dR [nli] wrote:
did u check the link i posted?
I did (I am sorry I didn’t notice that I accidentally cut out
the part of my previous letter, where I wrote about it). It’s
an amazing link and exactly the service that I need! Thank
you.

dR [nli] wrote:
this way u wont need to mess with ASP
or any other server side scripting language
Yes, it will for sure save a lot of my time; but I would really
like to try the server-scripting way, too. So, here I have
another naive question: if “AutoHotkey is an open source
macro-making utility for WINDOWS...” (quote from Wiki),
then why can’t we simply compile our ahk files, place them
on some windows server and run them there? Let’s say I
have a very simple script like this one:
Code:
FileAppend, a line in my file on the windows server, file.txt

Why is it so that, while I have no problems of running my
script on my windows computer, I still cannot run it on a
windows server? Why do we always have to switch to
either php or asp and write our scripts all over again?

dR [nli] wrote:
btw - i'd recommend u learn php over asp,
php runs also on windows but additionally on linux and
other unix-like systems, too
Thanks for telling me about it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 28th, 2008, 12:07 pm 
I am not clear on exactly what you want to check and how often, but if you look at the ChangeDetection.com Faq you will see that only changes in the page text are detected (and typically pages are checked only once a day). Also, there are items specifically excluded from detection:
Faq wrote:
Are there changes that won't be detected?
Yes. Text from external files or retrieved by JavaScript are not counted as changes to the page being monitored. Also, web masters can exclude portions of a page by using a special ChangeDetection tag. Additionally, changes in images and flash content are not monitored.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 28th, 2008, 1:25 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
oops, I didn't notice that :( ...
Well, it's okay - just another reason to plunge into server-scripting.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Cerberus, SifJar and 21 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group