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 

a neat trick!

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Mon Apr 12, 2004 4:39 am    Post subject: a neat trick! Reply with quote

You can drag & drop files over .bat .exe .com .pif .cmd etc. files. this makes them run with the dropped file as their first parameter. u can do it with compiled AHK scripts as they too are executable, but not with .ahk files.

this single line code will add that functionality to .ahk scripts too!!

Code:
RegWrite, REG_SZ, HKCR, AutoHotkeyScript\shellex\DropHandler,,{86C86720-42A0-1069-A2E8-08002B30309D}



Chris, i'd strongly suggest adding it to default installation of AHK. i've used it for ages with .aut files and then with .au3 files ...it has no side-effects.

or maybe i can add it to the TextPad syntax installation script...if u feel for some reason it'd b better.
_________________
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Apr 12, 2004 5:14 am    Post subject: Reply with quote

Great stuff. I was wondering why something like "Run, MyScript.ahk param1 param2" didn't work. Maybe this will fix all such things.

Do you know if this works on Win9x?
Back to top
View user's profile Send private message Send e-mail
Beastmaster
Guest





PostPosted: Mon Apr 12, 2004 9:27 am    Post subject: Reply with quote

Quote:
or maybe i can add it to the TextPad syntax installation script...if u feel for some reason it'd b better
Boing ( --> a cartoon like kind of funny noise Laughing ) - here it is. My my trigger.

Would you mind to approve/confirm a default color scheme for syntax highlighting files. I'm willing to get one done (cause it looks like a plain matter of diligence work). But I would leave it with AHK's pros to decide about the order/categories and the colors (if there's something like a standard in the world of coding geeks Cool )

For a first review I've left the command reference (raw style) in the forum.
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Apr 12, 2004 11:03 am    Post subject: Reply with quote

I don't think we need standard colors. We should just be thankful when someone comes along with a syntax file, which takes a lot of time and effort. However, if there's no strong preference, the TextPad colors chosen by Rajat can be used.

I will be including the TextPad config and any others in an Extras folder with future releases.
Back to top
View user's profile Send private message Send e-mail
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Mon Apr 12, 2004 1:29 pm    Post subject: Reply with quote

Quote:
Do you know if this works on Win9x?


i reckon i've used it on WinME.
but test on W98 didn't work. will check if there's another way.

but i'm sure adding it won't break anything in those systems.
_________________
Back to top
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Mon Apr 12, 2004 2:18 pm    Post subject: Reply with quote

Quote:
Boing ( --> a cartoon like kind of funny noise ) - here it is. My my trigger.


beastmaster there were a couple of reasons y i added that.

firstly, bcoz its deviating from the default behaviour of .ahk scripts till now so i thought maybe Chris wud like to make it an option (maybe asked during syntax installation or something).

secondly, as he's already being nice by promptly listening to my frequent comments and suggestions (many of which he's already implemented) so if there's something that i can do instead of troubling him with it, then i'd be glad to do it.
_________________
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Apr 12, 2004 6:34 pm    Post subject: Reply with quote

You may be right about making this behavior optional: I suspect it would mess up some people who are innocently dragging and dropping files (to move them or make copies) and accidentally launch a script if they drop something too close to one.

Although clearly there are uses for drag & drop, it seems to me that such a feature wouldn't be used by the average user. Because of this, I won't make it the default. Instead, a checkbox during the installation process is probably in order.
Back to top
View user's profile Send private message Send e-mail
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Mon Apr 12, 2004 6:56 pm    Post subject: Reply with quote

yeah that'd do. Smile
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
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