AutoHotkey Community

It is currently May 26th, 2012, 10:54 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: August 21st, 2008, 1:14 pm 
Offline

Joined: September 19th, 2005, 1:31 am
Posts: 115
My autohotkey.ini file includes utilities.ahk, which contains a hotkey for listvars.

I use utilities.ahk in all scripts I write.

When I press the hotkey for listvars, I keep getting the variables for the ahk.ini file, not the script I'm running.

Here's an example of the files:

ahk.ini
Code:
#include utilities.ahk
Var1 = 123


How can I control which variables are retreived with listvars when multiple scrips are running?

myscript.ahk
Code:
#include utilities.ahk
Var2 = 345



utilities.ahk
Code:
^v::Listvars


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2008, 1:17 pm 
Online
User avatar

Joined: October 7th, 2006, 8:45 am
Posts: 3329
Location: Simi Valley, CA
Change ^v::ListVars to ~^v::ListVars, then use the little red buttons at the top right corner to reach the one you want ;)

_________________
Ternary (a ? b : c) guide     TSV Table Manipulation Library
Post code inside [code][/code] tags!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2008, 5:23 pm 
Offline

Joined: September 19th, 2005, 1:31 am
Posts: 115
[VxE] wrote:
use the little red buttons at the top right corner to reach the one you want ;)


I assume you mean the grey close "x" button?

I don't get it.... I'm only getting one window to open (seeme to be different each time... maybe depending on the order the scripts were launched?)

Actually, my included file line is

Code:
~^+v::ListVars


I added the "~" as you suggested, but it's only opening up one variable list window... :?

thx!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2008, 4:51 pm 
Offline

Joined: September 19th, 2005, 1:31 am
Posts: 115
bump


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2008, 5:44 pm 
See the OnMessage documentation and the last 2 examples. With only the hotkeyed PostMessage in your "always running" script, and the OnMessage -> ListVars in your scripts/include, combined with a small "which script's vars do you want to see" selection GUI on keypress, it would work.

If you include the hotkey in all scripts, only the last (I guess) will be active, and you'll only see those ListVars.

HTH
________________________________________________________
New here? Please, before you post...
1. Read the tutorial and try the examples. -> 2. Take a look at the command list to get an idea of what you could do. -> 3. Create your script. Consult the documentation and the FAQ if you get stuck. -> 4. Search the forum if you need help or examples, method 1 (forum), method 2 (site), method 3 (Google). -> 5. Post your code on the forum in the "Ask for Help" section if you still run into problems (but read this first). -> 6. There is more AHK on autohotkey.net and the Wiki and there is an AHK IRC chat.


Report this post
Top
  
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: [VxE], Bing [Bot], Google [Bot], iBob35555VR, Klark92 and 65 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