Can't figure out how to close Else

Advanced Macro Recorder/Editor.

Moderator: Pulover

sachalamp
Posts: 6
Joined: 08 Apr 2024, 12:47

Can't figure out how to close Else

Post by sachalamp » 11 Apr 2024, 14:56

Image

I am new to ahk and pulover and i managed to do quite a few tricks with imagesearch and ifs etc but i can not, for the life of me, figure out how to link elses to ifs or even do a simple if-else script

chained ifs work just fine but else just sits there. you can even see it in code, else just stays open {

User avatar
andymbody
Posts: 906
Joined: 02 Jul 2017, 23:47

Re: Can't figure out how to close Else

Post by andymbody » 11 Apr 2024, 18:00

I'm not sure what "end if" is (Basic syntax maybe?), but proper blocks should look like this...

Code: Select all

if (condition1)
{
	; do something
}
else if (condition2)
{
	; do alternate
}
else	; any other condition
{
	; do for all others
}

sachalamp
Posts: 6
Joined: 08 Apr 2024, 12:47

Re: Can't figure out how to close Else

Post by sachalamp » 12 Apr 2024, 06:13

Image

I figured it out. That it's how it's supposed to look in Pulover, the else is nested and before the [end if]. to be as a beginner it didn't make sense, i was putting the else after the [end if]

Post Reply

Return to “Pulovers Macro Creator”