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 

Run from command line

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
guyclee
Guest





PostPosted: Mon Oct 30, 2006 4:57 pm    Post subject: Run from command line Reply with quote

Is there a way to run the commands from the command line instead of making scripts for everything you want to do?

Example:

AutoHotKey Click

Instead of having to create a file with Click in it and then running that file?

I know it might sound like a weird question, but I really need it.

Thanks!
Back to top
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Mon Oct 30, 2006 5:00 pm    Post subject: Reply with quote

Basically, the answer is no...
There might be workarounds, but we need to know the exact use case.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
SKAN



Joined: 26 Dec 2005
Posts: 6223

PostPosted: Tue Oct 31, 2006 8:54 am    Post subject: Reply with quote

PhiLho wrote:
There might be workarounds


@PhiLho: Where is that workaround! I remember seeing a solution that can parse & execute the command. But I not able to get the keywords right Sad .. I have been searching in vain.

Smile
_________________
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3644
Location: Belgrade

PostPosted: Tue Oct 31, 2006 9:10 am    Post subject: Reply with quote

Solution can be made in the form of a batch file.

ahk.bat command, p1, p2, p3, p4, p5


This will be slow as istance of AHK must be executed for eatch command.
Better approach would be to communicate with running instance of AHK and send it the command typed in console. Running instance can execute this command dynamicaly using Execute(..) function in the scripts.
_________________
Back to top
View user's profile Send private message MSN Messenger
BoBo
Guest





PostPosted: Tue Oct 31, 2006 11:28 am    Post subject: Reply with quote

A virtual script! Interesting to create virtual/self-dissappearing viruses !? Confused
Back to top
majkinetor



Joined: 24 May 2006
Posts: 3644
Location: Belgrade

PostPosted: Tue Oct 31, 2006 11:41 am    Post subject: Reply with quote

chillout for 1 second.
_________________
Back to top
View user's profile Send private message MSN Messenger
BoBo
Guest





PostPosted: Tue Oct 31, 2006 5:25 pm    Post subject: Reply with quote

Quote:
chillout for 1 second.
Done. Who's next? Twisted Evil
Back to top
Robert Carnegie



Joined: 01 Jun 2005
Posts: 53
Location: Scotland

PostPosted: Wed Nov 01, 2006 1:15 am    Post subject: Reply with quote

Wasn't there a program written that whatever you pass to it in variables, the name of an AutoHotkey command and parameters, it executes that command?

So you'd just need a little bit more - which may already exist - for a script that accepts command line parameters and uses that module to run the specified command.

I wouldn't mind being able to write a Cmd file or a Windows shortcut that contains something like "WinSet, Top, OnscreenKeyboard". Put it in the Quick Launch bar. Of course I can perfectly well have a shortcut that points to an AHk script, but that means more maintenance and possibly less portability - in the sense of making it harder to move the thing between computers.
Back to top
View user's profile Send private message Send e-mail
SKAN



Joined: 26 Dec 2005
Posts: 6223

PostPosted: Wed Nov 01, 2006 8:04 pm    Post subject: Reply with quote

I earlier wrote:
I have been searching in vain.


Got it !!! :: Execute AHK code dynamically! by jonny
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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