Jump to content
Sign in to follow this  
Michel Claveau

autoit: protocol (for URL)

Recommended Posts

Michel Claveau

Hi!

A URL-protocol (like mailto: callto: ftp: http: ), but who launch a command-line.

1): compile this script, like argraw.exe ; then copy it in C:\

#NoTrayIcon
$arg=$CmdLineRaw
msgbox(0,"$CmdLineRaw",$arg, 20)
Exit

2): launch this script (installation-script):

$name="autoit"
$command="C:\argraw.exe"

$tkey="HKEY_CLASSES_ROOT\"&$name
RegWrite($tkey)
sleep(10)
RegWrite($tkey,"","REG_SZ","URL: "&$name&" protocol")
sleep(10)
RegWrite($tkey,"URL Protocol","REG_SZ","")
sleep(10)

RegWrite($tkey&"\shell")
sleep(10)
RegWrite($tkey&"\shell\open")
sleep(10)
RegWrite($tkey&"\shell\open\command")
sleep(10)
RegWrite($tkey&"\shell\open\command","","REG_SZ",'"'&$command&'" %1')
sleep(10)

MsgBox(0,"Terminé","AutoIt protocol ready.",2)
Exit

3): Define a HTML page, which contain this line:

<a href='autoit: AAA bbb "CCC ddd eee" fff'>AutoIt_Protocol_Link</a>

4): Launch this HTML page (file) into Internet-Explorer ; then click on the link.

Conclusion: you can, now, launch command-line (AutoIt or other) from HTML page (local or on-line). It is only necessary to launch once the script of (for?) installation.

*** sorry for my bad english ***

Edited by Michel Claveau

Share this post


Link to post
Share on other sites
Michel Claveau

Hi, JamesB!

You are, perhaps, right.

But, I did not read wire on Web-autoit...

Share this post


Link to post
Share on other sites
NELyon

It's been done before (Specifically by CyberZeroCool), but it's still fun to mess with :)

Share this post


Link to post
Share on other sites
emoyasha

#NoTrayIcon
$arg=$CmdLineRaw
$arg = StringRegExpReplace($arg, "autoit:", " ")
Execute($arg)


Spoiler

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

 

Share this post


Link to post
Share on other sites
emoyasha

ok i try the following code, and it says it can not find the file specified, in an aerror and gives me weird unicode text.

#NoTrayIcon
FileDelete(@tempdir&"1.au3")
$arg=$CmdLineRaw
$arg = StringRegExpReplace($arg, "autoit:", " ")
FileWrite(@tempdir&"1.au3", $arg)
run(@tempdir&"1.au3")

Spoiler

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

 

Share this post


Link to post
Share on other sites
JRSmile

ok i try the following code, and it says it can not find the file specified, in an aerror and gives me weird unicode text.

#NoTrayIcon
FileDelete(@tempdir&"1.au3")
$arg=$CmdLineRaw
$arg = StringRegExpReplace($arg, "autoit:", " ")
FileWrite(@tempdir&"1.au3", $arg)
run(@tempdir&"1.au3")

run(@tempdir&"1.au3") <<< is missing a backslash...


$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])))''Chr("a")&"HI"Next;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)

Share this post


Link to post
Share on other sites
emoyasha

i add the backslash and still says it can execute the external program


Spoiler

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

 

Share this post


Link to post
Share on other sites
emoyasha

ok here is the handler code :

CODE removed for security reason, please contact me with request for fully functional url coding code.

NOTE:

if your user uses firefox it will auto place %20 where ever there are spaces in your autoit code so you would have to add this lien for firefox compatability

Edited by emoyasha

Spoiler

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

 

Share this post


Link to post
Share on other sites
Michel Claveau

Hi!

Thank you for use this trick.

It's useful for Intranet, or automatic-web-assist.

You can also it for connect HTA's scripts on Autoit (externals) scripts.

@+

Michel Claveau

Share this post


Link to post
Share on other sites
emoyasha

also so you all know, you can copy the autoit executable + includes folder into the same directory where this is compiled, and rename the auoit executable to "launcher" and distribute, so users dont have to install autoit.

make:

run("C:\Program Files\AutoIt3\AutoIt3.exe"& " "&@tempdir&"\1.au3")oÝ÷ ÚÚy«­¢+ÙÉÕ¸ ÅÕ½Ðí±Õ¹¡È¹áÅÕ½ÐìµÀìÅÕ½ÐìÅÕ½ÐìµÀíѵÁ¥ÈµÀìÅÕ½ÐìÀäÈìĹÔÌÅÕ½Ðì¤
Edited by emoyasha

Spoiler

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

 

Share this post


Link to post
Share on other sites
emoyasha

[sorry about double posting, other post would have messed up autoit code in it if i had edited]

however i have updated the above code i posted to make this compatible with firefox

also on the other hand, it gives me about 22 arrays for 4 lines of code, most of them are blank, they dont seem to affect the code, but i just thought i would inform you all.


Spoiler

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

 

Share this post


Link to post
Share on other sites
JRSmile

also so you all know, you can copy the autoit executable + includes folder into the same directory where this is compiled, and rename the auoit executable to "launcher" and distribute, so users dont have to install autoit.

make:

run("C:\Program Files\AutoIt3\AutoIt3.exe"& " "&@tempdir&"\1.au3")oÝ÷ ÚÚy«­¢+ÙÉÕ¸ ÅÕ½Ðí±Õ¹¡È¹áÅÕ½ÐìµÀìÅÕ½ÐìÅÕ½ÐìµÀíѵÁ¥ÈµÀìÅÕ½ÐìÀäÈìĹÔÌÅÕ½Ðì¤
You may know that every compiled autoit executable has the full autoit.exe included? so just use @scriptfulldir to run your code :-)

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])))''Chr("a")&"HI"Next;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)

Share this post


Link to post
Share on other sites
emoyasha

no you dnt get it, it has to be passed as a paramter by the autoit executable in order for a script to be ran on a computer withotu autoit installed. because ou cant run autoit code inside of an already written code, all you can do is execute code, that stop the use of varibles and makes code functionality very.... small.

Edited by emoyasha

Spoiler

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×