problem with multiple #If

Post a reply


In an effort to prevent automatic submissions, we require that you type the text displayed into the field underneath.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: problem with multiple #If

Re: problem with multiple #If

Post by SirRFI » 21 Oct 2017, 06:25

Yes, You can't nest #If, because it replaces the last one used. Code flow doesn't affect it, unlike regular If.

Re: problem with multiple #If

Post by b0bi » 21 Oct 2017, 03:54

solved !!!



Code: [Select all]GeSHi © Codebox Plus

#If on_top=1 and WinActive("ahk_class OneNote")

a::
MsgBox, Triggered
return



#If

problem with multiple #If

Post by b0bi » 21 Oct 2017, 03:48

I'm trying to get this to work

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





The problem is:
It doesn't really check if active window is really Notepad... As soon as on_top=1 and I press "a", it triggers.... Any way to make it respct both condiction (logical and) ?

Top