| View previous topic :: View next topic |
| Author |
Message |
silentblood
Joined: 19 Jun 2004 Posts: 36
|
Posted: Fri Jun 25, 2004 3:18 am Post subject: Another Question! |
|
|
| 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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Fri Jun 25, 2004 3:24 am Post subject: |
|
|
| 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 |
|
 |
Guest
|
Posted: Fri Jun 25, 2004 5:35 pm Post subject: |
|
|
| 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
|
Posted: Fri Jun 25, 2004 6:12 pm Post subject: |
|
|
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 |
|
 |
silentbloood Guest
|
Posted: Sat Jun 26, 2004 6:49 am Post subject: |
|
|
| 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
|
Posted: Sat Jun 26, 2004 7:36 am Post subject: |
|
|
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 |
|
 |
silentblood
Joined: 19 Jun 2004 Posts: 36
|
Posted: Sat Jun 26, 2004 2:31 pm Post subject: |
|
|
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 Thanks for help on this. Now to get it to send the keystrokes. |
|
| Back to top |
|
 |
|