AutoHotkey Community

It is currently May 26th, 2012, 5:17 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: March 1st, 2009, 9:19 pm 
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.)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2009, 9:28 pm 
Offline

Joined: August 2nd, 2008, 12:31 am
Posts: 101
Command Line Paramaters, or if you need to send it half way through executing Post/Send Message

_________________
Woot.

Please read forum etiquette


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 2nd, 2009, 2:39 pm 
Offline

Joined: June 9th, 2008, 2:32 am
Posts: 936
Location: Canada
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.

_________________
Image
I know i have 6 legs. It's cuz I'm special.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Miguel, Mtes, perlsmith, rbrtryn, stanman and 73 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