AutoHotkey Community

It is currently May 27th, 2012, 1:11 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: January 8th, 2010, 4:43 pm 
Offline

Joined: May 12th, 2009, 3:36 pm
Posts: 27
Hello,
I have a script which can be opened directly or within another ahk file by using "run":

Run, xyz.ahk


By calling this file from another ahk file I want to run it with a parameter like

Run, xyz.ahk "parameter 1"

Error message:
Image


So, how it is possible to "Run" / open a ahk file within another ahk file with parameters?

carlos


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 8th, 2010, 4:46 pm 
remove the quotes i believe


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 8th, 2010, 5:56 pm 
Offline

Joined: May 12th, 2009, 3:36 pm
Posts: 27
aguy wrote:
remove the quotes i believe


No, the same error message appears.

Online help for "Run":
To pass parameters, add them immediately after the program or document name. If a parameter contains spaces, it is safest to enclose it in double quotes (even though it may work without them in some cases).
And interpreting "immediately" as "without blank" results in an error message, too...


carlos


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 8th, 2010, 6:05 pm 
Offline

Joined: October 9th, 2006, 8:19 pm
Posts: 236
Location: Finland
I quess you'll have to specify the executable:
Code:
Run AutoHotkey.exe xyz.ahk params

_________________
Pekka Vartto


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 8th, 2010, 6:14 pm 
Offline

Joined: May 12th, 2009, 3:36 pm
Posts: 27
svi wrote:
I quess you'll have to specify the executable:...

Hmm, without parameters and without authotkey.exe the ahk script will be processed.

But let's have a try...

Wow! That's the solution!

e.g.
Code:
Run, autohotkey.exe target.ahk "parameter 1" "para2" ""with quotation mark"

target.ahk:
Code:
msgbox, %1%`n%2%`n%3%


Many thanks for your help!!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Leef_me, Ohnitiel and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group