AutoHotkey Community

It is currently May 26th, 2012, 11:04 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 103 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject:
PostPosted: October 22nd, 2008, 2:19 pm 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
Slanter wrote:
Found an error when using this on Win2k SP4.

twhyman wrote:
i am on vista x64 and it crashes here too.


atm the crashes are an yet unresolved problem. while posting data to sparrow, the script tries to do several things at the same time, which is due to limitations of my code and some limitations of ahk not possible.

while reading incoming data the script interprets the fields and is unabled to serve other requests. when other requests come in the script generates internal winsock errors and cannot recover from them. the only possible fix i see at this point is to exclude the interpreter to a spawned child and have it communicate to core via IPC ... but this is a rather time critical issue and results in many different other problems. such as missing WM_* msgs from core. i am experimenting on this but not usable solution is found yet.

twhyman wrote:
And how can we compile it to an exe so we can do All in 1 web service script?
I tried compiling the core ahk but it does not work as a single exe, also tried to include the rest of the ahk file in the main folder but with no success.

Thanks
Twhyman


compiling needs the autohotkey.exe to be included. the scripts which are embedded into html code are started dynamically via lexikos' piperun. when being compiled, this part completly loses its functionality and the scripts wont work, since not interpreter can be launched to start the scripts.

when above described problem hopefully gets fixed, i'll rewrite the code to use my winsock2.ahk lib. this will also result in a cleaner more readable code, since all networking functions get abstracted with more meaningfull names.

probably lexikos will create a interpreter version of ahk which is capable of executing dynamically passed scripts as he described in his piperun thread.

doing a webserver with AHK is quite a challenge because many things are very timecriticall. along with structural problems of the script my hardware seems to break (generating unreproducable memory errors) which makes coding slightly more difficult, since on every error i have to find out is it my script or my computer...

to fix all these mentioned problems (excluding my hardware issues) i need to read more about winsock functionalities and take a very close look at the design of the core to avoid running into other difficulties.

thanks for all the comments so far.

greets
dR

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 22nd, 2008, 2:34 pm 
Offline

Joined: December 7th, 2005, 8:29 am
Posts: 345
Thanks a lot for the explenation :)

Is it possible to activate the hkml interpreter on apache or IIS?

One more question will sparrow will be ever able to run as a single exe webservice?

Hope i am not driving you crazy with all of my questions :oops: because i would really want to see AHK being able to function as a web service.

Thanks again for your efforts,
Twhyman

_________________
(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.


Last edited by twhyman on October 22nd, 2008, 2:51 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 22nd, 2008, 2:36 pm 
Offline

Joined: August 20th, 2008, 4:25 pm
Posts: 256
This would be cool in combination with an AHK browser. Like, a browser that enables the execution of AHK scripts. For example, the codes on this forum could include a button with a caption like 'Try' or 'Run' which will run the AHK code upon click.

_________________
-Chavez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 22nd, 2008, 4:48 pm 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
Chavez wrote:
This would be cool in combination with an AHK browser. Like, a browser that enables the execution of AHK scripts. For example, the codes on this forum could include a button with a caption like 'Try' or 'Run' which will run the AHK code upon click.


u can easily create such a browser by implementing sean's IE and COM methods into an AHK script and use AHKlerner's JS injection (or using lexikos dispatch methods directly) for HTML pages ... with some RegExReplacements on the HTML source from each of the displayed forum pages, and some lil Ahk code, u'd easily 'inject' a "save that script" or "run directly" button / link into that page.

ez

8)

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 22nd, 2008, 9:11 pm 
Offline

Joined: January 23rd, 2008, 6:38 pm
Posts: 162
Freakin sweet. This is EXACTLY what i've wanted to make for web applications that help you to control common computer tasks. Something that only you access. Very Very very nice. Keep up the good work.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 23rd, 2008, 6:49 am 
Offline

Joined: August 20th, 2008, 4:25 pm
Posts: 256
DerRaphael wrote:
Chavez wrote:
This would be cool in combination with an AHK browser. Like, a browser that enables the execution of AHK scripts. For example, the codes on this forum could include a button with a caption like 'Try' or 'Run' which will run the AHK code upon click.


u can easily create such a browser by implementing sean's IE and COM methods into an AHK script and use AHKlerner's JS injection (or using lexikos dispatch methods directly) for HTML pages ... with some RegExReplacements on the HTML source from each of the displayed forum pages, and some lil Ahk code, u'd easily 'inject' a "save that script" or "run directly" button / link into that page.

ez

8)


...you lost me after 'You can' :lol:

_________________
-Chavez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 24th, 2008, 9:46 pm 
Offline

Joined: January 23rd, 2008, 6:38 pm
Posts: 162
Can someone plz help me to turn this server into an EXE. would be very nice if absolutely everything could be compiled down to 1 exe, and 1 ini file (for port settings, etc.)

When i try to compile this it doesn't seem to get all the include files and such, and I've written a small website in hkml and would like to put it on a pc with no AHK.

any ideas, any help? It's freakin sweet I must say that (again). Perfect for making small "applications" that are web based but only really used in a local network situation.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 24th, 2008, 9:51 pm 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
u cant make it one exe.

_________________
Image
ʞɔпɟ əɥʇ ʇɐɥʍ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 25th, 2008, 12:45 am 
Offline

Joined: January 23rd, 2008, 6:38 pm
Posts: 162
do u care to expound? (cant is a strong word to a programmer :) you can do anything, it's just a question of if it's worth the time)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 25th, 2008, 2:19 am 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
silkcom wrote:
do u care to expound? (cant is a strong word to a programmer :) you can do anything, it's just a question of if it's worth the time)

well you can u just have to fileinstall the autohotkey.exe and make sure all of the script lines pointing to it are changed...im not sure what else you would have to fileinstall, as i have not reviewed the script in detail.....i just read in previous post by the creator (DerRaphael) that the script needs autohotkey.exe

_________________
Image
ʞɔпɟ əɥʇ ʇɐɥʍ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 25th, 2008, 3:04 am 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
compiling the sources to make it a single exe is not the problem, even to make it load its settings from an ini file ...

what makes it a problem is the HKML ... its execution relies on having an autohotkey.exe available which needs to be included into the compiled exe.

imagine it like this
Image

and because the embedded hkml scripts are executed via autohotkey.exe the whole interpreter needs to be included aswell. this sorta doubles the needed space and is slower at execution (compiled scripts are slower than script executed directly) so a compiled sparrow would be about ~ 450kb.

dR

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 25th, 2008, 5:27 am 
Offline

Joined: January 23rd, 2008, 6:38 pm
Posts: 162
:) thank you that makes tons more sense.

I wonder however, if you could write the site, and then compile the site directly in. Or create one that allows you to compile the site in. With images seperate is ok (and almost required). In fact, i'd like all css files and such to be external. But if all the html files were compiled in that would be even cooler than my first thought. Then the whole thing would be 1 thing, that would be great.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 26th, 2008, 11:01 am 
Offline

Joined: December 7th, 2005, 8:29 am
Posts: 345
DerRaphael wrote:
compiling the sources to make it a single exe is not the problem, even to make it load its settings from an ini file ...

what makes it a problem is the HKML ... its execution relies on having an autohotkey.exe available which needs to be included into the compiled exe.

imagine it like this
Image

and because the embedded hkml scripts are executed via autohotkey.exe the whole interpreter needs to be included aswell. this sorta doubles the needed space and is slower at execution (compiled scripts are slower than script executed directly) so a compiled sparrow would be about ~ 450kb.

dR


Can we set in the settings ini file the autohotkey.exe location? instead of compiling him in the core?

_________________
(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 26th, 2008, 12:33 pm 
Offline

Joined: July 29th, 2005, 5:32 pm
Posts: 179
twhyman wrote:
Can we set in the settings ini file the autohotkey.exe location? instead of compiling him in the core?
A simple alternative; copy the autohotkey.exe to the same folder as sparrow.Core.ahk, & make an autohotkey.ini file (in same folder too) that just has
Code:
#include sparrow.Core.ahk

Now when you want to launch sparrow from a computer that doesn't have ahk installed, you can just run the autohotkey.exe. :D

_________________
.o0[ corey ]0o.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 27th, 2008, 8:14 pm 
Offline

Joined: January 23rd, 2008, 6:38 pm
Posts: 162
i'll try that out. I still think it would be cool to be able to compile all ur files into 1 exe, so that autohotkey.exe wouldn't be necessary, and all your hkml files would be already compiled in. Though i'm talking a large change here.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 103 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 13 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