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 

Another Question!

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



Joined: 19 Jun 2004
Posts: 36

PostPosted: Fri Jun 25, 2004 3:18 am    Post subject: Another Question! Reply with quote

In the top of my macros I have Variables that people can put there keybinds in, also there is a place to enter peoples names here for buffs. What I need to do is have the macro test to see if anything is entered into these variables. If there is nothing but blank space there what does %myVar% come back with? What ever it is I can put in an If command so when it comes back with it the macro will know that it needs to goto, label and will cause it to skip that section of the macro code. Any help would be appreciated.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Fri Jun 25, 2004 3:24 am    Post subject: Reply with quote

If you want this script restricted in access, you should compile it to an EXE and store all user settings in an INI file. See IniRead in the help file. One of the INI wizards here can help you if you have any specific questions.
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Fri Jun 25, 2004 5:35 pm    Post subject: Reply with quote

Ok I understand I need to do an Ini file. Was just reading the Help files. Let me state what I think I understand about INI files. I need to create a text document with [SECTION NAMES] and Keys= correct? I know the text file needs .ini extension. What I really need to know I guess is what command do I need to call in the exe to load the varables into memory.
Back to top
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Fri Jun 25, 2004 6:12 pm    Post subject: Reply with quote

IniRead - Reads a value from a standard format .ini file.
IniRead, OutputVar, Filename, Section, Key [, Default]

IniWrite - Writes a value to a standard format .ini file.
IniWrite, Value, Filename, Section, Key

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
silentbloood
Guest





PostPosted: Sat Jun 26, 2004 6:49 am    Post subject: Reply with quote

So instead of just using %myvar% I have to use a longer format to get my variables in?
Back to top
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Sat Jun 26, 2004 7:36 am    Post subject: Reply with quote

Here is an example of the start of a script I have. This will only read the variables at startup, but you can put these in a loop and have it constantly checking the INI file and doing stuff based on the variables.

Code:
inifile = %SystemRoot%\system32\ProxyED.ini ; Set inifile variable
IniRead, DNumLock, %inifile%, General, DNumLock ; Check INI value
IniRead, DCapsLock, %inifile%, General, DCapsLock ; Check INI value
IniRead, DScrollLock, %inifile%, General, DScrollLock ; Check INI value
if DCapsLock <> 0
  SetCapsLockState, AlwaysOff ; Turn CapsLock Off
if DNumLock <> 0
  SetNumLockState, AlwaysOff ; Turn NumLock Off
if DScrollLock <> 0
  SetScrollLockState, AlwaysOff ; Turn ScrollLock Off

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
silentblood



Joined: 19 Jun 2004
Posts: 36

PostPosted: Sat Jun 26, 2004 2:31 pm    Post subject: Reply with quote

Ok I got the INI working as far as I can tell its making configuration for the macro alot easier don't need to recompile it each time Smile Thanks for help on this. Now to get it to send the keystrokes.
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