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 

Passing a variable to another script

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





PostPosted: Sun Mar 01, 2009 8:19 pm    Post subject: Passing a variable to another script Reply with quote

Hello, I would like to know if there is a way to set a variable in another script?

Example: I have a main script running, and want to run another script to do a task for the main script, I run that script from the main script, then want to set a variable to it.

Coding example for "Main Script":
Code:

Run,DRIVE:\DIR\Script.ahk
ThatScript.Variable = Value


Is there any way to do something like this in AutoHotKey?

I have already searched this board for help on this, and it returns too many results that are not what I am looking for.

I know of ways that I could do this, but it would be slow/possibly inaccurate. (Like writing to a temporary text file and having the script ran by the main script read it after the main script writes it to the text file before running the secondary script.)
Back to top
Jex



Joined: 01 Aug 2008
Posts: 101

PostPosted: Sun Mar 01, 2009 8:28 pm    Post subject: Reply with quote

Command Line Paramaters, or if you need to send it half way through executing Post/Send Message
_________________
Woot.

Please read forum etiquette
Back to top
View user's profile Send private message
SpiderGames



Joined: 09 Jun 2008
Posts: 936
Location: Canada

PostPosted: Mon Mar 02, 2009 1:39 pm    Post subject: Reply with quote

if thats too confusing try this.

Script 1
Code:

Send, {F24}



Script 2
Code:

F24::
;dothis


Other simple ways can be used my apending files. using teh above method and then having the second script read it.
_________________

I know i have 6 legs. It's cuz I'm special.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
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