Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
if
#1
instead of...
if(IsWindowVisible(id(example "example")))
anyway you could do like ifwinisnotvisible lol
ty
#2
Read about else.


If ... else
Syntax
if expression
(tab) statement
(tab) ...
[else
(tab) statement
(tab) ...]
...

;

Can be single line:

if(expression) statement ...
[else statement ...]

;

or

if(expression) statement ... [else statement ...]

;

Parts
expression - any expression.

statements - any statements.

;

Remarks
If expression is true (not 0), execute statements after if and skip statements after else (if any). If expression is false (0), skip statements after if and execute statements after else.

;

else can be in the same line as if.

if can be in other block (if, for, ...).

After else (in the same line) can be other if...(this does not require double indentation of following lines).

;

See also: Operators ifa ifi iff ifk iff iif sel

;

Example
if i > 0
,out "i is greater than 0"
,if(s.endi(".exe")) ret i; else ret 0
else if(i < 0) out "i is less than 0"
else out "i is 0"
Taking on Quick Macros one day at a time
#3
Code:
Copy      Help
if(!IsWindowVisible(id(15 win("Untitled - Notepad" "Notepad"))))
,out "No ID 15"


Forum Jump:


Users browsing this thread: 1 Guest(s)