Jump to content
Sign in to follow this  
Skrip

Adding numbers to equal a command?

Recommended Posts

Skrip

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]

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.