Autoreplace for different situations Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
IvanVanko
Posts: 34
Joined: 14 Jul 2016, 11:40

Autoreplace for different situations

16 Oct 2016, 13:13

Hi, folks!

Is it possible to make autoreplace different in various conditions?

Not working example, so you would get an idea (it's important that it's relying on variable as I want to implement it in that way to my script)

Code: Select all

StartWindowName = Replace test1
Gui, Start:Add, Button, -Wrap Default w100 h30 gCondition1, Condition 1
Gui, Start:Add, Button, -Wrap Default w100 h30 gCondition2, Condition 2
Gui, Start:Add, Text,, Input Field
Gui, Start:Add, Edit, w400 h25 -Wrap vInput, 
Gui, Start:show,, %StartWindowName%
return

Condition1:
condition = 1 
goto, Replace

Condition2:
condition = 2
goto, Replace 

Replace: 
if condition = 1 
{
	::test::test1
}
else 
{
	::test::test2
}
return
Твой софт - говно!
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: Autoreplace for different situations  Topic is solved

16 Oct 2016, 13:29

Code: Select all

replace=test1
StartWindowName = Replace test1
Gui, Start:Add, Button, -Wrap Default w100 h30 gCondition1, Condition 1
Gui, Start:Add, Button, -Wrap Default w100 h30 gCondition2, Condition 2
Gui, Start:Add, Text,, Input Field
Gui, Start:Add, Edit, w400 h25 -Wrap vInput, 
Gui, Start:show,, %StartWindowName%
return

Condition1:
	replace=test1
return
Condition2:
	replace=test2
return

::test::
	Send % replace
Return
User avatar
IvanVanko
Posts: 34
Joined: 14 Jul 2016, 11:40

Re: Autoreplace for different situations

16 Oct 2016, 14:16

Wow, you're awesome!
Твой софт - говно!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: apeironn, Descolada, fiaztv1, Google [Bot], JKJadan, Pianist and 207 guests