Jump to content

Adding numbers to equal a command?


Recommended Posts

How would you make something like this?

Like for different access powers on something.

1 = Low

2 = Med

3 = High

For the powers of:

LowHigh = 1+3 = 4

LowMedHigh = 1+2+3 = 6

High = 3

But the script would only read the = number and set the access.

EDIT:

SplashTextOn() has this

[optional] Add them up - default is 'center justified/always on top/with title'

0 = Center justified/always on top/with title (default)

1 = Thin bordered titleless window

2 = Without "always on top" attribute

4 = Left justified text

8 = Right justified text

16 = Windows can be moved

32 = Centered vertically text

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

How would you make something like this?

Like for different access powers on something.

1 = Low

2 = Med

3 = High

For the powers of:

LowHigh = 1+3 = 4

LowMedHigh = 1+2+3 = 6

High = 3

But the script would only read the = number and set the access.

EDIT:

SplashTextOn() has this

You make the values powers of 2

Const $Low = 1, $Med = 2, $High = 4

Then

$LowHigh = BitOr($Low,$High) or in this case it is the same as 1+4

$LowMedHigh = BitOr($Low,$Med,$High) again 1+2+4

Then to see if the number has Med

if BitAnd($num,$Med) = $Med then $MedSet = true

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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