Jump to content

Recommended Posts

Posted (edited)

Hello,

I have been digging through the help file and I can't find anything related to what I want.

I have in my code:

$i = 255

;blah blah

Func item1()
    WinSetTrans($hWnd, "", $i)
    $i -= 51
EndFunc

The point is to cycle through a new transparency with each call of the function. However, I need to set limits on $i to never be less than 0 or greater than 255. How is this achieved?

I am sure it's easy but I just don't see anything on it.

Edited by kjpolker
Posted

@Somerset I was checking that out and figured it would be related to that, I just was having trouble thinking of the logic. I couldn't think of how to implement a variable in a function that didn't loop (I initially was thinking on the lines of For To Step). Thank you for the help!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...