INI Key Values into Variables

Get help with using AutoHotkey and its commands and hotkeys
cjsmile999
Posts: 11
Joined: 01 Feb 2017, 09:33

INI Key Values into Variables

16 Sep 2018, 14:58

Hello Everyone,

I'm trying to assign INI keys values (well a specific one) into variables so I can try and match a Window from it. I've tried a few different methods but I'm just not able to put it all together and was hoping to get some assistance.

Forget to mention the Type Key in the ini looks something like: Type=Payroll,Office,Admin

Here is what I have to obtain the key values. It works in obtaining the values, but I'm unsure how to assign each value to a new variables so I can use that to match a Window.

Code: [Select all] [Download] GeSHi © Codebox Plus

IniRead, OutputVar, D:\Temp\WindowType.ini, Work, Type
Values = %outputvar%
StringSplit, ValuesArray, Values, `,
Loop, %ValuesArray0%
{
this_value := ValuesArray%A_Index%
MsgBox, %A_Index% - %this_value%
}


After the Key Values are assigned I was hoping I could do something like:

Code: [Select all] [Download] GeSHi © Codebox Plus

IfWinNotActive,%KeyVALUE1% OR %KeyVALUE2%, , WinActivate,%KeyVALUE1% OR %KeyVALUE2%, ;Which ever one it found
winWaitActive, %KeyVALUE1% OR %KeyVALUE2%,,10


Thank you!

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 82 guests