Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If statment help
#1

how do I keep this code from erroring out if notepad is not open.


Code:
Copy      Help
ifi(id(15 win("Untitled - Notepad" "Notepad")))
,out 1


.....

This code works but i would rather it be all in one if statment.

Code:
Copy      Help
int hwnd=id(15 win("Untitled - Notepad" "Notepad"));err
if hwnd>0
,out 1
#2
Code:
Copy      Help
int w=win(t c); if(w and id(x w))
#3

This worked also I forget all about it.


Code:
Copy      Help
ifi(id(15 win("Untitled - Notepad" "Notepad")))
,out 1
,;
err+
,ret


Forum Jump:


Users browsing this thread: 1 Guest(s)