AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sparrow: AHK WebServer w/ AHK in HTML support (sources incl)
Goto page Previous  1, 2, 3, 4, 5, 6, 7
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
tinku99



Joined: 03 Aug 2007
Posts: 513
Location: Houston, TX

PostPosted: Tue Feb 02, 2010 4:32 pm    Post subject: keygen with ahkbb Reply with quote

genmce wrote:
Hey I tested this out and it works great!
How do I use keygen.hkml above with this?
I tried putting it in the www folder but got an error...

Try this:
www/keygen.hkml
Code:
<?ahk keygen() ?>

scripts/keygen.ahk
Code:
keygen(get, post)
{
; Initialize the secret seeds
SWP_Initialize(0x12345678, 0x12345678)   ; with optional 8 secret seeds

; Read the values
AppName := get.AppName
Version := get.Version
Name := get.Name
Email := get.Email
Fingerprint := get.Fingerprint
IP := get.IP

; Generate a key for me
Key := SWP_GenerateKey(Name, Email, Fingerprint )

; Test if user details are valid - disabled as always false for me.
; UserOK := SWP_IsUserAuthenticated(Name, Email, Key )

; Remove %20 from fields
StringReplace, Name, Name,`%20, %a_space%  , All
StringReplace, AppName, AppName,`%20, %a_space%  , All

; Record to the log file
FileAppend, %Name%`,%Email%`,%Fingerprint%`,%Key%`,%AppName%`,%Version%`,%IP%`n, Registrations.txt

return Key
; Return the generated key
; echo(Key)

; soundbeep

}
If this works for you, would you mind posting the client side scripts to use with this, using test server settings: 127.0.0.1:81

uptdates to ahkbb2.1:
1. added keygen
2. made the number of worker threads a variable (using 2 by default to make testing faster when I don't need more workers)
3. added posts and comments to ahkbb (127.0.0.1:81/ahkbb.hkml)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
genmce



Joined: 10 Jan 2009
Posts: 135
Location: Virginia

PostPosted: Tue Feb 02, 2010 9:58 pm    Post subject: Reply with quote

Thanks, will test and post after confirmed working.

It told me to download your .dll... which I did.
Do I still need the other version of the dll?
autohotkey1.dll, autohotkey2.dll ... etc?
_________________
KeyMce/GenMce - mackie emulator for pc keyboard/Convert your controller to mackie.
Midi I/O - Want to play with midi/ahk?
Back to top
View user's profile Send private message Yahoo Messenger
tinku99



Joined: 03 Aug 2007
Posts: 513
Location: Houston, TX

PostPosted: Tue Feb 02, 2010 11:05 pm    Post subject: dll copies Reply with quote

genmce wrote:
Thanks, will test and post after confirmed working.

It told me to download your .dll... which I did.
Do I still need the other version of the dll?
autohotkey1.dll, autohotkey2.dll ... etc?

autohotkey1.dll, autohotkey2.dll ... etc are just copies of AutoHotkey.dll.
They will be created by sparrow.core.ahk if autohotkey1.dll is not already present.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
genmce



Joined: 10 Jan 2009
Posts: 135
Location: Virginia

PostPosted: Wed Feb 10, 2010 1:47 am    Post subject: Re: keygen with ahkbb Reply with quote

tinku99 wrote:
genmce wrote:
Hey I tested this out and it works great!
How do I use keygen.hkml above with this?
I tried putting it in the www folder but got an error...

Try this:
www/keygen.hkml
Code:
<?ahk keygen() ?>

scripts/keygen.ahk
Code:
keygen(get, post)
{
; Initialize the secret seeds
SWP_Initialize(0x12345678, 0x12345678)   ; with optional 8 secret seeds

; Read the values
AppName := get.AppName
Version := get.Version
Name := get.Name
Email := get.Email
Fingerprint := get.Fingerprint
IP := get.IP

; Generate a key for me
Key := SWP_GenerateKey(Name, Email, Fingerprint )

; Test if user details are valid - disabled as always false for me.
; UserOK := SWP_IsUserAuthenticated(Name, Email, Key )

; Remove %20 from fields
StringReplace, Name, Name,`%20, %a_space%  , All
StringReplace, AppName, AppName,`%20, %a_space%  , All

; Record to the log file
FileAppend, %Name%`,%Email%`,%Fingerprint%`,%Key%`,%AppName%`,%Version%`,%IP%`n, Registrations.txt

return Key
; Return the generated key
; echo(Key)

; soundbeep

}
If this works for you, would you mind posting the client side scripts to use with this, using test server settings: 127.0.0.1:81

uptdates to ahkbb2.1:
1. added keygen
2. made the number of worker threads a variable (using 2 by default to make testing faster when I don't need more workers)
3. added posts and comments to ahkbb (127.0.0.1:81/ahkbb.hkml)


I have abandoned my plan, to run a server.
_________________
KeyMce/GenMce - mackie emulator for pc keyboard/Convert your controller to mackie.
Midi I/O - Want to play with midi/ahk?


Last edited by genmce on Sat Feb 20, 2010 12:24 pm; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger
Plenty
Guest





PostPosted: Thu Feb 18, 2010 4:41 pm    Post subject: POST and opera Reply with quote

I was stunned with functionality, until trying POST method under Opera.
Neither mine script nor included form.hkml work with opera, but are fine with IE and FF. Any clue why?
Back to top
goatjim
Guest





PostPosted: Mon Jun 07, 2010 2:37 am    Post subject: single exe Reply with quote

I love sparrow!
though it seamed to lock up frequently and
i wanted a version i could compile to a single exe, no external files

here is the outcome
http://jamesh.s3.amazonaws.com/sparrow.zip

downfall is you cant call pictures from sparrow (you could from an outside server)

this is perfect if you are wanting to use sparrow for automating a remote/headless server

it should lock up less often too
there is also a READ ME
Back to top
tomf80



Joined: 15 Jul 2010
Posts: 10

PostPosted: Thu Oct 28, 2010 5:32 am    Post subject: Reply with quote

Is there a version of this, or similar, that will run with autohotkey_l?

I get an error at line 27. Variable name contains an illegal character "Sparrow[MimeTypesLst]"

Thanks
Back to top
View user's profile Send private message
derRaphael



Joined: 23 Nov 2007
Posts: 841
Location: ~/.

PostPosted: Thu Oct 28, 2010 6:01 am    Post subject: Reply with quote

tomf80 wrote:
Is there a version of this, or similar, that will run with autohotkey_l?

I get an error at line 27. Variable name contains an illegal character "Sparrow[MimeTypesLst]"

Thanks


These types of variable names dont work with ahk_l since this is the object notation syntax which is exclusive in ahk_l and makes such names illegal.

sparrow has been designed to run with the ahk version from Chris Mallet which is now commonly known as AHK Basic.

dR
_________________

    All scripts, unless otherwise noted, are hereby released under CC-BY
Back to top
View user's profile Send private message
SparrowFan
Guest





PostPosted: Sat Jan 29, 2011 7:34 am    Post subject: Reply with quote

Exclamation
Seems to be a problem with the server after weaking up computer from the Sleep state.
I cant access the server, it must be restarted.
Is it normal?
Back to top
ruzz
Guest





PostPosted: Mon Jan 31, 2011 7:00 pm    Post subject: Reply with quote

derRaphael wrote:
tomf80 wrote:
Is there a version of this, or similar, that will run with autohotkey_l?

I get an error at line 27. Variable name contains an illegal character "Sparrow[MimeTypesLst]"

Thanks


These types of variable names dont work with ahk_l since this is the object notation syntax which is exclusive in ahk_l and makes such names illegal.

sparrow has been designed to run with the ahk version from Chris Mallet which is now commonly known as AHK Basic.

dR


So will it be fixed? Or will sparrow never support the latest AHK?

TIA
ruzz
Back to top
partyy
Guest





PostPosted: Tue Jul 26, 2011 2:53 am    Post subject: Reply with quote

Yeah what he said? ^^
Back to top
0x150||ISO



Joined: 01 Jan 2011
Posts: 42

PostPosted: Sat Oct 01, 2011 1:12 am    Post subject: Reply with quote

I was very excited to find this thread,
Then I read on... Confused

It would be profoundly amazing if there were an "ahk server" that ran on Apache.
_________________
01000001 01001000 01001011 01110010 01101111 01100011 01101011 01110011
Back to top
View user's profile Send private message
Frankie



Joined: 02 Nov 2008
Posts: 2850

PostPosted: Sat Oct 01, 2011 2:11 am    Post subject: Reply with quote

0x150||ISO wrote:
It would be profoundly amazing if there were an "ahk server" that ran on Apache.
You could write an AutoHotkey interpreter that runs on the Apache server. As far as I know, PHP just works by Apache running the interpreter with some arguments and reads from standard output.
_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7
Page 7 of 7

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group