Sign in to follow this  
Followers 0
LibertyMan

Very Easy Help me

6 posts in this topic

First thank you for looking at my topic,

and i've been delete this over and over

if $Whatever = 0 then
$whatever = 0
ElseIf $Whatever = -1 then
$Whatever = 25
ElseIf $Whater = -2 then
$whatever = 24
EndIf

Is there any way to speed this up?

Some more simple few lines and not 50+ lines?

Thanks, LibertyMan

Share this post


Link to post
Share on other sites



You did not tell what do you need, we can't look in cristal ball to finde out what the 50+ lines present

So put the script with the problem and explaind where is the problem.

Looking your 7 lines presentation the only thing that can hit my brain is

$Whatever = -8;put heare number for testing O_o
if $Whatever = 0 then
    $whatever = 0
Else
    $Whatever = $Whatever + 26
EndIf
MsgBox(0,"",$Whatever)

If it dont help you try next time to put some more info and you have link that can help you with your title in my sig.


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

It depends which values you want. If you mean that the resulting value should be:

0 if input is zero

25 if input is -1

24 if input is -2

23 if input is -3

22 if input is -4

and so on, you can simply do

If $Whatever < 0 Then $Whatever = 26 + $Whatever

Or is your actual problem different?

Edited by jchd

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thank you for trying to help me.

Na, I already have the numbers there

0,-1,-2,-3,-4,-5,-6,...(-25)

I want to change them like so,

If $whatever = 0 then $whatever = 0 ElseIf $whatever = -1 then $whatever = 25 endif

Do i have to do the same all the way through

or something more simple like..

"Jchd" - I think your right but..

If $whatever > 0 then $Whatever = 26 + $Whatever

Ill go test now.

Edited by LibertyMan

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Yes Jchd, your right, and thank you.

+ for you

trail's and error's gets the job done :(

Edited by LibertyMan

Share this post


Link to post
Share on other sites

It's the same that BogQ posted seconds before me.

But you changed the meaning of the test: if ___ > 0 won't work.

BTW, you can also write

If $whatever < 0 then $Whatever += 26

Programming isn't trial and error. It's about making it right the first time (most of the times :().


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

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  
Followers 0