| View previous topic :: View next topic |
| Author |
Message |
derRaphael
Joined: 23 Nov 2007 Posts: 841 Location: ~/.
|
Posted: Wed Oct 22, 2008 1:19 pm Post subject: |
|
|
| 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 _________________
All scripts, unless otherwise noted, are hereby released under CC-BY |
|
| Back to top |
|
 |
twhyman
Joined: 07 Dec 2005 Posts: 339
|
Posted: Wed Oct 22, 2008 1:34 pm Post subject: |
|
|
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 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 Wed Oct 22, 2008 1:51 pm; edited 1 time in total |
|
| Back to top |
|
 |
Chavez
Joined: 20 Aug 2008 Posts: 256
|
Posted: Wed Oct 22, 2008 1:36 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
derRaphael
Joined: 23 Nov 2007 Posts: 841 Location: ~/.
|
Posted: Wed Oct 22, 2008 3:48 pm Post subject: |
|
|
| 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
 _________________
All scripts, unless otherwise noted, are hereby released under CC-BY |
|
| Back to top |
|
 |
silkcom
Joined: 23 Jan 2008 Posts: 162
|
Posted: Wed Oct 22, 2008 8:11 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Chavez
Joined: 20 Aug 2008 Posts: 256
|
Posted: Thu Oct 23, 2008 5:49 am Post subject: |
|
|
| 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
 |
...you lost me after 'You can'  _________________ -Chavez. |
|
| Back to top |
|
 |
silkcom
Joined: 23 Jan 2008 Posts: 162
|
Posted: Fri Oct 24, 2008 8:46 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1381 Location: USA
|
Posted: Fri Oct 24, 2008 8:51 pm Post subject: |
|
|
u cant make it one exe. _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
silkcom
Joined: 23 Jan 2008 Posts: 162
|
Posted: Fri Oct 24, 2008 11:45 pm Post subject: |
|
|
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) |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1381 Location: USA
|
Posted: Sat Oct 25, 2008 1:19 am Post subject: |
|
|
| 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 _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
derRaphael
Joined: 23 Nov 2007 Posts: 841 Location: ~/.
|
Posted: Sat Oct 25, 2008 2:04 am Post subject: |
|
|
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
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 _________________
All scripts, unless otherwise noted, are hereby released under CC-BY |
|
| Back to top |
|
 |
silkcom
Joined: 23 Jan 2008 Posts: 162
|
Posted: Sat Oct 25, 2008 4:27 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
twhyman
Joined: 07 Dec 2005 Posts: 339
|
Posted: Sun Oct 26, 2008 10:01 am Post subject: |
|
|
| 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
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.
|
|
| Back to top |
|
 |
freakkk
Joined: 29 Jul 2005 Posts: 179
|
Posted: Sun Oct 26, 2008 11:33 am Post subject: |
|
|
| 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.  _________________ .o0[ corey ]0o. |
|
| Back to top |
|
 |
silkcom
Joined: 23 Jan 2008 Posts: 162
|
Posted: Mon Oct 27, 2008 7:14 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
|